├── about.html ├── audio ├── alice.mp3 └── shake.wav ├── css └── common.css ├── doc ├── accelerometer.html ├── android.html ├── audio.html ├── barcode.html ├── cache.html ├── camera.html ├── console.html ├── contacts.html ├── device.html ├── downloader.html ├── events.html ├── fingerprint.html ├── gallery.html ├── geolocation.html ├── interface-orientation.html ├── io.html ├── ios.html ├── key.html ├── maps.html ├── messaging.html ├── native.js.html ├── nativeUI.html ├── nativeobj.html ├── navigator.html ├── oauth.html ├── orientation.html ├── payment.html ├── proximity.html ├── push.html ├── res │ ├── doc.css │ ├── doc.js │ ├── prettify.js │ └── prettify.sons.css ├── runtime.html ├── share.html ├── speech.html ├── splashscreen.html ├── statistic.html ├── storage.html ├── uploader.html ├── video.html ├── webview.html ├── xhr.html └── zip.html ├── icon.png ├── img ├── 5.jpg ├── add.png ├── arecord.png ├── astop.png ├── barcode.png ├── fdir.png ├── fdisk.png ├── ffile.png ├── fup.png ├── h5p.jpg ├── helloh5.jpg ├── mp.png ├── orientationa.png ├── orientationb.png ├── orientationbg.png ├── orientationc.png ├── orientationl.png ├── pull_arrow.png ├── pull_fresh.png ├── qr.png ├── shake │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ └── 4.jpg ├── shakedown.png ├── shakeup.png ├── ui.png └── waiting.png ├── index.html ├── js ├── common.js ├── immersed.js ├── shortcut.js ├── update.js └── update.json ├── logo.png ├── manifest.json ├── plus ├── accelerometer.html ├── accelerometer_shake.html ├── audio.html ├── barcode.html ├── barcode_scan.html ├── barcode_scan2.html ├── camera.html ├── camera_image.html ├── camera_video.html ├── device.html ├── doc.html ├── downloader.html ├── events.html ├── file.html ├── gallery.html ├── geolocation.html ├── maps.html ├── maps_map.html ├── maps_map_sub.html ├── message.html ├── nativeobj.html ├── nativeobj_animation.html ├── nativeui.html ├── nativeui_waiting.html ├── navigator.html ├── navigator_status.html ├── njs.html ├── njs_android_shortcut.html ├── njs_efficient.html ├── njs_ios_gamecenter.html ├── oauth.html ├── orientation.html ├── orientation_compass.html ├── orientation_level.html ├── payment.html ├── payment_iap.html ├── proximity.html ├── push.html ├── runtime.html ├── runtime_launch.html ├── share.html ├── share_qq.html ├── share_sinaweibo.html ├── share_weixin.html ├── speech.html ├── speech_custom.html ├── statistic.html ├── storage.html ├── uploader.html ├── uploader_ret.html ├── video.html ├── video_livepusher.html ├── video_videoplayer.html ├── video_videoplayer_sub.html ├── webview.html ├── webview_animation.html ├── webview_embed.html ├── webview_float.html ├── webview_mask.html ├── webview_mask_side.html ├── webview_new.html ├── webview_pullhead.html ├── webview_pullhead_custom.html ├── webview_pullrefresh.html ├── webview_pullrefresh_custom.html ├── webview_pulltorefresh.html ├── xhr.html └── zip.html ├── sa.png ├── sa@2x.png └── sa@3x.png /audio/alice.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/audio/alice.mp3 -------------------------------------------------------------------------------- /audio/shake.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/audio/shake.wav -------------------------------------------------------------------------------- /doc/accelerometer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

accelerometer

15 |

Accelerometer模块管理设备加速度传感器,用于获取设备加速度信息,包括x(屏幕水平方向)、y(垂直屏幕水平方向)、z(垂直屏幕平面方向)三个方向的加速度信息。通过plus.accelerometer获取设备加速度传感器管理对象。

16 |

方法:

17 | 25 |

对象:

26 | 32 |

回调方法:

33 | 39 |

权限:

40 |

5+功能模块(permissions)

41 |
 42 | {
 43 | // ...
 44 | "permissions":{
 45 | 	// ...
 46 | 	"Accelerometer": {
 47 | 		"description": "加速度传感器"
 48 | 	}
 49 | }
 50 | }
 51 | 			
52 |

Acceleration

53 |

设备加速度信息对象

54 |
 55 | interface Acceleration {
 56 | 	readonly attribute Number xAxis;
 57 | 	readonly attribute Number yAxis;
 58 | 	readonly attribute Number zAxis;  
 59 | }
 60 | 				
61 |

说明:

62 |

63 | JSON对象,保存获取设备的加速度信息,包括x、y、z三个方向的加速度信息。 64 |

65 |

属性:

66 | 80 |

AccelerometerOption

81 |

监听设备加速度感应器参数

82 |
 83 | interface Acceleration {
 84 | 	readonly attribute DOMString frequency;
 85 | }
 86 | 				
87 |

说明:

88 |

89 | JSON对象,用于设置获取设备加速度信息的参数。 90 |

91 |

属性:

92 | 96 |

AccelerometerSuccessCallback

97 |

获取设备加速度信息成功的回调函数

98 |
 99 | void onSuccess( acceleration ) {
100 | 	// Get acceleration code.
101 | }
102 | 				
103 |

参数:

104 | 111 |

返回值:

112 | void 113 | : 无

AccelerometerErrorCallback

114 |

获取设备加速度信息失败的回调函数

115 |
116 | function void onAccelerometerError( Exception error ) {
117 | 	// Handle error
118 | 	var code = error.code; // 错误编码
119 | 	var message = error.message; // 错误描述信息
120 | }
121 | 				
122 |

参数:

123 | 131 |

返回值:

132 | void 133 | : 无

134 |
135 | 136 | -------------------------------------------------------------------------------- /doc/android.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

android

15 |

Native.js for Android封装一条通过JS语法直接调用Native Java接口通道,通过plus.android可调用几乎所有的系统API。

16 |

方法:

17 | 35 |

对象:

36 | 42 |

权限:

43 |

5+功能模块(permissions)

44 |
 45 | {
 46 | // ...
 47 | "permissions":{
 48 | 	// ...
 49 | 	"Invocation": {
 50 | 		"description": "Native.js"
 51 | 	}
 52 | }
 53 | }
 54 | 			
55 |

ClassObject

56 |

Java类对象

57 |
 58 | interface ClassObject {
 59 | 	// ...
 60 | 	function Object plusGetAttribute( String name );
 61 | 	function Object plusSetAttribute( String name, Object value );
 62 | 	// ...
 63 | }
 64 | 				
65 |

说明:

66 |

67 | Java类对象,可通过其属性获取类的常量,可通过方法来操作类的静态变量和方法,也通过new方法来创建类的实例对象。 68 | 对于类的常量,则直接通过.后面跟随常量名称调用即可。 69 |

70 |

方法:

71 | 77 |

InstanceObject

78 |

Java实例对象

79 |
 80 | interface InstanceObject {
 81 | 	// ...
 82 | 	function Object plusGetAttribute( String name );
 83 | 	function Object plusSetAttribute( String name, Object value );
 84 | 	// ...
 85 | }
 86 | 				
87 |

说明:

88 |

89 | Java实例对象,可通过其方法来操作实例的变量和方法。 90 | 注意:必须通过plusGetAttribute()方法读取实例对象的属性值,通过plusSetAttribute()方法设置实例对象的属性值。 91 |

92 |

方法:

93 | 99 |

100 |
101 | 102 | -------------------------------------------------------------------------------- /doc/cache.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

cache

15 |

Cache模块用于管理应用缓存,通过plus.cache获取缓存管理对象。

16 |

方法:

17 | 25 |

回调方法:

26 | 32 |

权限:

33 |

5+功能模块(permissions)

34 |
35 | {
36 | // ...
37 | "permissions":{
38 | 	// ...
39 | 	"Cache": {
40 | 		"description": "应用缓存"
41 | 	}
42 | }
43 | }
44 | 			
45 |

CacheClearCallback

46 |

清除应用缓存完成回调

47 |
48 | void onCompleted() {
49 | 	// Clear cache completed code.
50 | }
51 | 				
52 |

说明:

53 |

清除应用缓存回调函数,调用plus.cache.clear清除缓存操作时作为参数传入,在清除缓存操作完成时触发回调。

54 |

参数:

55 | 56 |

返回值:

57 | void 58 | : 无

CacheCalculateCallback

59 |

计算应用使用缓存容量回调

60 |
61 | void onCompleted( size ) {
62 | 	// Calculate cache complete code.
63 | }
64 | 				
65 |

说明:

66 |

计算应用当前使用缓存容量回调函数,调用plus.cache.calculate计算缓存容量操作时作为参数传入,在计算缓存容量大小完成时触发回调。

67 |

参数:

68 | 74 |

返回值:

75 | void 76 | : 无

77 |
78 | 79 | -------------------------------------------------------------------------------- /doc/console.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

console

15 |

Console模块用于跟踪调试的API,可根据调试需求输出日志,协助开发人员定位业务逻辑问题。

16 |

方法:

17 | 29 |

权限:

30 |

5+功能模块(permissions)

31 |
32 | {
33 | // ...
34 | "permissions":{
35 | 	// ...
36 | 	"Console": {
37 | 		"description": "日志,跟踪调试输出日志信息"
38 | 	}
39 | }
40 | }
41 | 			
42 |

43 |
44 | 45 | -------------------------------------------------------------------------------- /doc/device.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

device

15 |

Device模块管理设备信息,用于获取手机设备的相关信息,如IMEI、IMSI、型号、厂商等。通过plus.device获取设备信息管理对象。

16 |

属性:

17 | 29 |

方法:

30 | 46 |

对象:

47 | 57 |

权限:

58 |

5+功能模块(permissions)

59 |
 60 | {
 61 | // ...
 62 | "permissions":{
 63 | 	// ...
 64 | 	"Device": {
 65 | 		"description": "设备信息"
 66 | 	}
 67 | }
 68 | }
 69 | 			
70 |

screen

71 |

Screen模块管理设备屏幕信息

72 |

属性:

73 | 85 |

方法:

86 | 96 |

display

97 |

Display模块管理应用可使用的显示区域信息

98 |

属性:

99 | 105 |

networkinfo

106 |

networkinfo模块用于获取网络信息

107 |

常量:

108 | 124 |

方法:

125 | 127 |

os

128 |

OS模块管理操作系统信息

129 |

属性:

130 | 140 |

141 |
142 | 143 | -------------------------------------------------------------------------------- /doc/events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

Events

15 |

Events模块管理客户端事件,包括系统事件,如扩展API加载完毕、程序前后台切换等。

16 |

常量:

17 | 41 |

方法:

42 | 44 |

回调方法:

45 | 51 |

EventTrigCallback

52 |

事件触发回调函数

53 |
54 | 				
55 | void onTrig(){
56 | 	// Event trig code
57 | }
58 | 				
59 | 				
60 |

说明:

61 |

62 | 指定事件触发时的回调函数,在指定的事件已经发生时调用。 63 |

64 |

参数:

65 |

66 |

返回值:

67 | void 68 | : 无

ErrorEventTrigCallback

69 |

页面加载错误事件回调函数

70 |
71 | 				
72 | void onErrorTrig(Event event){
73 | 	// Event trig code
74 | 	var url = event.url;  // 加载错误的页面路径,API中传入的url值
75 | 	var href = event.href;  // 加载错误的页面完整路径,通常以“file://”开头的路径
76 | }
77 | 				
78 | 				
79 |

说明:

80 |

81 | 当Webview窗口加载页面失败后打开错误页面时触发此事件。 82 |

83 |

参数:

84 | 92 |

返回值:

93 | void 94 | : 无

95 |
96 | 97 | -------------------------------------------------------------------------------- /doc/fingerprint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

fingerprint

15 |

Fingerprint模块管理指纹识别。

16 |

方法:

17 | 29 |

对象:

30 | 36 |

回调方法:

37 | 43 |

权限:

44 |

5+功能模块(permissions)

45 |
 46 | {
 47 | // ...
 48 | "permissions":{
 49 | 	// ...
 50 | 	"Fingerprint": {
 51 | 		"description": "指纹识别"
 52 | 	}
 53 | }
 54 | }
 55 | 			
56 |

AuthenticateOptions

57 |

JSON对象,指纹识别认证参数

58 |
 59 | interface AuthenticateOptions {
 60 | 	readonly attribute String message;
 61 | }			
 62 | 				
63 |

说明:

64 |

65 | 用于设置指纹识别认证界面显示的提示信息等。 66 |

67 |

属性:

68 | 74 |

FingerprintError

75 |

JSON对象,指纹识别错误信息

76 |
 77 | interface FingerprintError {
 78 | 	const Number UNSUPPORT = 1;
 79 | 	const Number KEYGUARD_INSECURE = 2;
 80 | 	const Number FINGERPRINT_UNENROLLED = 3;
 81 | 	const Number AUTHENTICATE_MISMATCH = 4;
 82 | 	const Number AUTHENTICATE_OVERLIMIT = 5;
 83 | 	const Number CANCEL = 6;
 84 | 	const Number UNKNOWN_ERROR = 7;
 85 | 	readonly attribute Number code;
 86 | 	readonly attribute String message;
 87 | }			
 88 | 				
89 |

属性:

90 | 104 |

FingerprintSuccessCallback

105 |

指纹识别认证成功回调函数

106 |
107 | void onSuccess() {
108 | 	// Authenticate success code.
109 | }
110 | 				
111 |

参数:

112 |

113 |

返回值:

114 | void 115 | : 无

FingerprintErrorCallback

116 |

指纹识别认证失败的回调函数

117 |
118 | function void onError(FingerprintError error) {
119 | 	// Handle error
120 | 	var code = error.code; // 错误编码
121 | 	var message = error.message; // 错误描述信息
122 | }
123 | 				
124 |

参数:

125 | 133 |

返回值:

134 | void 135 | : 无

136 |
137 | 138 | -------------------------------------------------------------------------------- /doc/interface-orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

InterfaceOrientation

15 |

获取应用的横竖屏信息

16 |

方法:

17 | 19 |

事件:

20 | 22 |

23 |
24 | 25 | -------------------------------------------------------------------------------- /doc/ios.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

ios

15 |

Native.js for iOS封装一条通过JS语法直接调用Native Objective-C接口通道,通过plus.ios可调用几乎所有的系统API。

16 |

方法:

17 | 31 |

对象:

32 | 38 |

权限:

39 |

5+功能模块(permissions)

40 |
41 | {
42 | // ...
43 | "permissions":{
44 | 	// ...
45 | 	"Invocation": {
46 | 		"description": "Native.js"
47 | 	}
48 | }
49 | }
50 | 			
51 |

ClassObject

52 |

Objective-C类对象

53 |
54 | interface ClassObject {
55 | 	// ...
56 | }
57 | 				
58 |

说明:

59 |

60 | Objective-C类对象,可通过其属性获取类的常量,可通过方法来操作类的静态方法,也通过new方法来创建类的实例对象。 61 | 对于类的静态方法,则直接通过.后面跟随方法名称调用。 62 |

63 |

InstanceObject

64 |

Objective-C实例对象

65 |
66 | interface InstanceObject {
67 | 	// ...
68 | 	function Object plusGetAttribute( String name );
69 | 	function Object plusSetAttribute( String name, Object value );
70 | 	// ...
71 | }
72 | 				
73 |

说明:

74 |

75 | Objective-C实例对象,可通过其方法来操作示例的变量和方法。 76 | 注意:必须通过plusGetAttribute()方法读取示例对象的属性值,通过plusSetAttribute()方法设置示例对象的属性值。 77 |

78 |

方法:

79 | 85 |

86 |
87 | 88 | -------------------------------------------------------------------------------- /doc/key.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

key

15 |

Key管理设备按键事件

16 |

方法:

17 | 29 |

对象:

30 | 36 |

回调方法:

37 | 39 |

权限:

40 |

5+功能模块(permissions)

41 |
 42 | {
 43 | // ...
 44 | "permissions":{
 45 | 	// ...
 46 | 	"Webview": {
 47 | 		"description": "窗口管理"
 48 | 	}
 49 | }
 50 | }
 51 | 			
52 |

KeyType

53 |

按键类型

54 |

常量:

55 | 108 |

KeyEvent

109 |

按键事件

110 |

属性:

111 | 117 |

KeyEventCallback

118 |

按键事件的回调函数

119 |
120 | void onKeyEvent( KeyEvent event ){
121 | 	// Event handled code.
122 | 	var key=event.keyCode; // 用户按键的键值
123 | }
124 | 				
125 |

参数:

126 | 133 |

返回值:

134 | void 135 | : 无

136 |
137 | 138 | -------------------------------------------------------------------------------- /doc/messaging.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

messaging

15 |

Messaging模块管理设备通讯功能,可用于短信、彩信、邮件发送等。通过plus.messaging可获取设备通讯管理对象。另外也可以直接通过html中的href直接快速发送短信、拨打电话、发送邮件等。

16 |

常量:

17 | 25 |

方法:

26 | 32 |

对象:

33 | 39 |

回调方法:

40 | 46 |

权限:

47 |

5+功能模块(permissions)

48 |
 49 | {
 50 | // ...
 51 | "permissions":{
 52 | 	// ...
 53 | 	"Messaging": {
 54 | 		"description": "短信彩信邮件消息"
 55 | 	}
 56 | }
 57 | }
 58 | 			
59 |

Message

60 |

消息对象

61 |

属性:

62 | 80 |

方法:

81 | 83 |

BodyType

84 |

消息体内容类型

85 |

说明:

86 |

用于设定消息的消息体内容。

87 |

MessageSendSuccessCallback

88 |

消息发送成功的回调函数

89 |
 90 | void onSuccess() {
 91 | 	// Send message success code.
 92 | }
 93 | 					
94 |

参数:

95 |

96 |

返回值:

97 | void 98 | : 无

MessageErrorCallback

99 |

消息发送失败的回调函数

100 |
101 | void onError( error ) {
102 | 	// Error code.
103 | }
104 | 				
105 |

参数:

106 | 112 |

返回值:

113 | void 114 | : 无

115 |
116 | 117 | -------------------------------------------------------------------------------- /doc/native.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 | 14 |
15 |

Native.js

16 |

Native.JS一种把操作系统的原生对象转义,映射为JS对象,在JS里编写原生代码的技术。可通过plus.android.*和plus.ios.*提供的API分别调用Android和iOS平台的Native API。

17 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /doc/orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

orientation

15 |

Orientation模块管理设备的方向信息,包括alpha、beta、gamma三个方向信息,通过plus.orientation可获取设备方向管理对象。

16 |

方法:

17 | 25 |

对象:

26 | 32 |

回调方法:

33 | 39 |

权限:

40 |

5+功能模块(permissions)

41 |
 42 | {
 43 | // ...
 44 | "permissions":{
 45 | 	// ...
 46 | 	"Orientation": {
 47 | 		"description": "方向传感器"
 48 | 	}
 49 | }
 50 | }
 51 | 			
52 |

OrientationOption

53 |

JSON对象,监听设备方向感应器参数

54 |

属性:

55 | 59 |

Rotation

60 |

JSON对象,设备方向信息数据

61 |
 62 | interface Rotation {
 63 | 	readonly attribute float alpha;
 64 | 	readonly attribute float beta;
 65 | 	readonly attribute float gamma;
 66 | 	readonly attribute float magneticHeading;
 67 | 	readonly attribute float trueHeading;
 68 | 	readonly attribute float headingAccuracy;
 69 | }
 70 | 				
71 |

属性:

72 | 98 |

OrientationSuccessCallback

99 |

获取设备方向信息成功的回调函数

100 |
101 | void onSuccess( rotation ){
102 | 	// Get orientation success code.
103 | }
104 | 				
105 |

参数:

106 | 112 |

返回值:

113 | void 114 | : 无

OrientationErrorCallback

115 |

获取设备方向信息失败的回调函数

116 |
117 | void onError( error ) {
118 | 	// Get orientation error code. 
119 | }
120 | 				
121 |

参数:

122 | 128 |

返回值:

129 | void 130 | : 无

131 |
132 | 133 | -------------------------------------------------------------------------------- /doc/proximity.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

proximity

15 |

Proximity模块管理设备距离传感器,可获取当前设备的接近距离信息,通过plus.proximity可获取设备距离传感管理对象。

16 |

方法:

17 | 25 |

回调方法:

26 | 32 |

权限:

33 |

5+功能模块(permissions)

34 |
35 | {
36 | // ...
37 | "permissions":{
38 | 	// ...
39 | 	"Proximity": {
40 | 		"description": "距离感应器"
41 | 	}
42 | }
43 | }
44 | 			
45 |

ProximitySuccessCallback

46 |

获取设备接近距离信息成功的回调函数

47 |
48 | void onSuccess( distance ) {
49 | 	// Get distance success code.
50 | }
51 | 				
52 |

参数:

53 | 58 |

返回值:

59 | void 60 | : 无

ProximityErrorCallback

61 |

获取设备接近距离信息失败的回调函数

62 |
63 | void onError( error ) {
64 | 	// Get distance error code.
65 | }
66 | 				
67 |

参数:

68 | 74 |

返回值:

75 | void 76 | : 无

77 |
78 | 79 | -------------------------------------------------------------------------------- /doc/res/doc.css: -------------------------------------------------------------------------------- 1 | * { 2 | -webkit-user-select: none; 3 | -ms-touch-select: none; 4 | /* 5 | -ms-touch-action: none; 6 | */ 7 | } 8 | html { 9 | width: 100%; 10 | height: 100%; 11 | } 12 | body { 13 | color:#333; 14 | font-family: Verdana, Arial, Helvetica , "Microsoft YaHei" , sans-serif; 15 | font-size:14px; 16 | word-break: break-all; 17 | -webkit-touch-callout:none; 18 | -webkit-tap-highlight-color:rgba(0,0,0,0); 19 | -webkit-text-size-adjust:none; 20 | } 21 | .content { 22 | padding: 0 0.5em; 23 | } 24 | h1 { 25 | border-bottom:2px solid; 26 | font-size:1.6em; 27 | font-weight:bold; 28 | margin:2em 0px 0.5em 0px; 29 | 30 | } 31 | h2 { 32 | font-size:1.2em; 33 | font-weight:bold; 34 | margin:1em 0px 0.5em 0px; 35 | text-shadow:#FFFFFF 0px 1px 1px; 36 | } 37 | h3 { 38 | font-size:1.1em; 39 | font-weight:bold; 40 | margin:0.8em 0px 0.5em 0px; 41 | text-shadow:#FFFFFF 0px 1px 1px; 42 | } 43 | em { 44 | font-size: 0.8em; 45 | color: #999; 46 | } 47 | ul { 48 | margin: 0; 49 | padding: 0 0 0 2em; 50 | } 51 | a { 52 | color:#D84C29; 53 | text-decoration:none; 54 | } 55 | .des { 56 | text-indent: 2em; 57 | margin: 0; 58 | } 59 | .type{ 60 | color:#0A0;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0); 61 | } 62 | -------------------------------------------------------------------------------- /doc/res/doc.js: -------------------------------------------------------------------------------- 1 | (function(w){ 2 | // 空函数 3 | function shield(){ 4 | return false; 5 | } 6 | //取消浏览器的所有事件,使得active的样式在手机上正常生效 7 | document.addEventListener('touchstart',shield,false); 8 | document.oncontextmenu=shield; 9 | // DOMContentLoaded事件处理 10 | document.addEventListener('DOMContentLoaded',function(){ 11 | document.body.onselectstart=shield; 12 | prettyPrint(); 13 | },false); 14 | })(window); -------------------------------------------------------------------------------- /doc/res/prettify.sons.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Derived from einaros's Sons of Obsidian theme at 3 | * http://studiostyl.es/schemes/son-of-obsidian by 4 | * Alex Ford of CodeTunnel: 5 | * http://CodeTunnel.com/blog/post/71/google-code-prettify-obsidian-theme 6 | */ 7 | 8 | .str 9 | { 10 | color: #EC7600; 11 | } 12 | .kwd 13 | { 14 | color: #93C763; 15 | } 16 | .com 17 | { 18 | color: #66747B; 19 | } 20 | .typ 21 | { 22 | color: #678CB1; 23 | } 24 | .lit 25 | { 26 | color: #FACD22; 27 | } 28 | .pun 29 | { 30 | color: #F1F2F3; 31 | } 32 | .pln 33 | { 34 | color: #F1F2F3; 35 | } 36 | .tag 37 | { 38 | color: #8AC763; 39 | } 40 | .atn 41 | { 42 | color: #E0E2E4; 43 | } 44 | .atv 45 | { 46 | color: #EC7600; 47 | } 48 | .dec 49 | { 50 | color: purple; 51 | } 52 | pre.prettyprint 53 | { 54 | border: 0px solid #888; 55 | } 56 | ol.linenums 57 | { 58 | margin-top: 0; 59 | margin-bottom: 0; 60 | } 61 | .prettyprint { 62 | background: #000; 63 | border-radius: 3px; 64 | padding: 1em 0; 65 | overflow-x: scroll; 66 | -webkit-overflow-scrolling: touch; 67 | /*white-space: pre-wrap;*//*css-3*/ 68 | /*word-wrap: break-word;*//*Internet Explorer 5.5+*/ 69 | } 70 | li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 71 | { 72 | color: #555; 73 | list-style-type: decimal; 74 | } 75 | /*li.L1, li.L3, li.L5, li.L7, li.L9 { 76 | background: #222; 77 | }*/ 78 | @media print 79 | { 80 | .str 81 | { 82 | color: #060; 83 | } 84 | .kwd 85 | { 86 | color: #006; 87 | font-weight: bold; 88 | } 89 | .com 90 | { 91 | color: #600; 92 | font-style: italic; 93 | } 94 | .typ 95 | { 96 | color: #404; 97 | font-weight: bold; 98 | } 99 | .lit 100 | { 101 | color: #044; 102 | } 103 | .pun 104 | { 105 | color: #440; 106 | } 107 | .pln 108 | { 109 | color: #000; 110 | } 111 | .tag 112 | { 113 | color: #006; 114 | font-weight: bold; 115 | } 116 | .atn 117 | { 118 | color: #404; 119 | } 120 | .atv 121 | { 122 | color: #060; 123 | } 124 | } -------------------------------------------------------------------------------- /doc/splashscreen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

navigator

15 |

Splashscreen管理程序启动界面

16 |

方法:

17 | 19 |

权限:

20 |

21 | 5+功能模块(permissions)。 22 | 在plus节点下配置splashscreen节点信息设置程序启动界面参数。 23 |

24 |
25 | {
26 | // ...
27 | "permissions":{
28 | 	// ...
29 | 	"Navigator": {
30 | 		"description": "浏览器信息"
31 | 	}
32 | }
33 | // ...
34 | "plus":{
35 | 	// ...
36 | 	"splashscreen": {
37 | 		"autoclose": "true",	// 首页加载完成后自动关闭splash界面
38 | 		"delay": ""
39 | 	}
40 | }
41 | }
42 | 			
43 | 属性: 44 | 56 |

57 |
58 | 59 | -------------------------------------------------------------------------------- /doc/statistic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

statistic

15 |

Statistic模块管理统计功能,用于提供应用内统计的能力,支持统计和分析用户属性和用户行为数据。通过plus.statistic可获取统计管理对象。

16 |

方法:

17 | 27 |

权限:

28 |

permissions

29 |
30 | {
31 | // ...
32 | "permissions":{
33 | 	// ...
34 | 	"Statistic": {
35 | 		"description": "统计"
36 | 	}
37 | }
38 | }
39 | 			
40 |

41 |
42 | 43 | -------------------------------------------------------------------------------- /doc/storage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |
14 |

storage

15 |

Storage模块管理应用本地数据存储区,用于应用数据的保存和读取。应用本地数据与localStorage、sessionStorage的区别在于数据有效域不同,前者可在应用内跨域操作,数据存储期是持久化的,并且没有容量限制。通过plus.storage可获取应用本地数据管理对象。

16 |

方法:

17 | 31 |

权限:

32 |

5+功能模块(permissions)

33 |
34 | {
35 | // ...
36 | "permissions":{
37 | 	// ...
38 | 	"Storage": {
39 | 		"description": "本地存储,访问应用本地存储数据"
40 | 	}
41 | }
42 | }
43 | 			
44 |

45 |
46 | 47 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/icon.png -------------------------------------------------------------------------------- /img/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/5.jpg -------------------------------------------------------------------------------- /img/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/add.png -------------------------------------------------------------------------------- /img/arecord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/arecord.png -------------------------------------------------------------------------------- /img/astop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/astop.png -------------------------------------------------------------------------------- /img/barcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/barcode.png -------------------------------------------------------------------------------- /img/fdir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/fdir.png -------------------------------------------------------------------------------- /img/fdisk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/fdisk.png -------------------------------------------------------------------------------- /img/ffile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/ffile.png -------------------------------------------------------------------------------- /img/fup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/fup.png -------------------------------------------------------------------------------- /img/h5p.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/h5p.jpg -------------------------------------------------------------------------------- /img/helloh5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/helloh5.jpg -------------------------------------------------------------------------------- /img/mp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/mp.png -------------------------------------------------------------------------------- /img/orientationa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/orientationa.png -------------------------------------------------------------------------------- /img/orientationb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/orientationb.png -------------------------------------------------------------------------------- /img/orientationbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/orientationbg.png -------------------------------------------------------------------------------- /img/orientationc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/orientationc.png -------------------------------------------------------------------------------- /img/orientationl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/orientationl.png -------------------------------------------------------------------------------- /img/pull_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/pull_arrow.png -------------------------------------------------------------------------------- /img/pull_fresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/pull_fresh.png -------------------------------------------------------------------------------- /img/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/qr.png -------------------------------------------------------------------------------- /img/shake/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shake/1.jpg -------------------------------------------------------------------------------- /img/shake/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shake/2.jpg -------------------------------------------------------------------------------- /img/shake/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shake/3.jpg -------------------------------------------------------------------------------- /img/shake/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shake/4.jpg -------------------------------------------------------------------------------- /img/shakedown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shakedown.png -------------------------------------------------------------------------------- /img/shakeup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/shakeup.png -------------------------------------------------------------------------------- /img/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/ui.png -------------------------------------------------------------------------------- /img/waiting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/img/waiting.png -------------------------------------------------------------------------------- /js/immersed.js: -------------------------------------------------------------------------------- 1 | (function(w){ 2 | 3 | document.addEventListener('plusready',function(){ 4 | console.log("Immersed-UserAgent: "+navigator.userAgent); 5 | },false); 6 | 7 | var immersed = 0; 8 | var ms=(/Html5Plus\/.+\s\(.*(Immersed\/(\d+\.?\d*).*)\)/gi).exec(navigator.userAgent); 9 | if(ms&&ms.length>=3){ 10 | immersed=parseFloat(ms[2]); 11 | } 12 | w.immersed=immersed; 13 | 14 | if(!immersed){ 15 | return; 16 | } 17 | var t=document.getElementById('header'); 18 | //t&&(t.style.paddingTop=immersed+'px',t.style.background='-webkit-linear-gradient(top,rgba(215,75,40,1),rgba(215,75,40,0.8))',t.style.color='#FFF'); 19 | t&&(t.style.paddingTop=immersed+'px',t.style.background='#D74B28',t.style.color='#FFF'); 20 | t=document.getElementById('content'); 21 | t&&(t.style.marginTop=immersed+'px'); 22 | t=document.getElementById('scontent'); 23 | t&&(t.style.marginTop=immersed+'px'); 24 | t=document.getElementById('dcontent'); 25 | t&&(t.style.marginTop=immersed+'px'); 26 | t=document.getElementById('map'); 27 | t&&(t.style.marginTop=immersed+'px'); 28 | 29 | })(window); -------------------------------------------------------------------------------- /js/shortcut.js: -------------------------------------------------------------------------------- 1 | (function(w){ 2 | 3 | document.addEventListener('plusready',function(){ 4 | checkArguments(); 5 | },false); 6 | 7 | // 判断启动方式 8 | function checkArguments(){ 9 | console.log("Shortcut-plus.runtime.launcher: "+plus.runtime.launcher); 10 | if(plus.runtime.launcher=='shortcut'){ 11 | try{ 12 | var cmd = JSON.parse(plus.runtime.arguments); 13 | console.log("Shortcut-plus.runtime.arguments: "+plus.runtime.arguments) 14 | var type=cmd&&cmd.type; 15 | switch(type){ 16 | case 'share': 17 | openWebview('plus/share.html'); 18 | break; 19 | case 'about': 20 | openWebview('about.html','zoom-fade-out',true); 21 | break; 22 | default: 23 | break; 24 | } 25 | }catch(e){ 26 | console.log("Shortcut-exception: "+e); 27 | } 28 | } 29 | } 30 | // 打开页面 31 | function openWebview(id,a,s){ 32 | if(!_openw||_openw.id!=id){ 33 | clicked(id,a,s); 34 | } 35 | } 36 | 37 | // 处理从后台恢复 38 | document.addEventListener('newintent',function(){ 39 | console.log("Shortcut-newintent"); 40 | checkArguments(); 41 | },false); 42 | 43 | })(window); -------------------------------------------------------------------------------- /js/update.json: -------------------------------------------------------------------------------- 1 | { 2 | "appid":"HelloH5", 3 | "iOS":{ 4 | "version":"0.7.0", 5 | "title":"Hello H5+(0.7.0)版本更新", 6 | "note":"新增自动升级检测功能\n新增分享功能演示页面\n新增推送功能演示页面\n", 7 | "url":"itms-apps://itunes.apple.com/cn/app/hello-h5+/id682211190?l=zh&mt=8" 8 | }, 9 | "Android":{ 10 | "version":"0.7.0", 11 | "title":"Hello H5+(0.7.0)版本更新", 12 | "note":"新增自动升级检测功能\n新增分享功能演示页面\n新增推送功能演示页面\n", 13 | "url":"http://d.m3w.cn/helloh5p/HelloH5.apk" 14 | } 15 | } -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/logo.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "HelloH5", 3 | "name": "HelloH5", 4 | "version": { 5 | "name": "2.3.3", 6 | "code": "20303" 7 | }, 8 | "description": "HTML5 Plus能力演示", 9 | "icons": { 10 | "144": "icon.png" 11 | }, 12 | "launch_path": "index.html", 13 | "developer": { 14 | "name": "yanyilin", 15 | "email": "yanyilin@dcloud.io", 16 | "url": "http://www.dcloud.io" 17 | }, 18 | "orientation": [ 19 | "portrait" 20 | ], 21 | "permissions": { 22 | "Accelerometer": { 23 | "description": "加速度传感器" 24 | }, 25 | "Audio": { 26 | "description": "音频录制与播放" 27 | }, 28 | "Cache": { 29 | "description": "缓存管理" 30 | }, 31 | "Camera": { 32 | "description": "摄像头" 33 | }, 34 | "Console": { 35 | "description": "调试输出日志" 36 | }, 37 | "Contacts": { 38 | "description": "系统通讯录" 39 | }, 40 | "Device": { 41 | "description": "设备信息" 42 | }, 43 | "Downloader": { 44 | "description": "文件下载" 45 | }, 46 | "Events": { 47 | "description": "扩展事件" 48 | }, 49 | "File": { 50 | "description": "本地文件系统" 51 | }, 52 | "Gallery": { 53 | "description": "系统相册" 54 | }, 55 | "Geolocation": { 56 | "description": "位置信息" 57 | }, 58 | "Invocation": { 59 | "description": "Native.js能力" 60 | }, 61 | "Messaging": { 62 | "description": "消息通讯" 63 | }, 64 | "Orientation": { 65 | "description": "方向传感器" 66 | }, 67 | "Proximity": { 68 | "description": "距离传感器" 69 | }, 70 | "Storage": { 71 | "description": "本地数据存储" 72 | }, 73 | "Webview": { 74 | "description": "窗口管理" 75 | }, 76 | "NativeObj": { 77 | "description": "原生控件" 78 | }, 79 | "NativeUI": { 80 | "description": "原生UI控件" 81 | }, 82 | "Navigator": { 83 | "description": "浏览器信息" 84 | }, 85 | "Uploader": { 86 | "description": "文件上传" 87 | }, 88 | "Runtime": { 89 | "description": "运行环境" 90 | }, 91 | "XMLHttpRequest": { 92 | "description": "跨域网络请求" 93 | }, 94 | "Zip": { 95 | "description": "压缩与解压" 96 | }, 97 | "Barcode": { 98 | "description": "二维码扫描" 99 | }, 100 | "Maps": { 101 | "description": "地图" 102 | }, 103 | "OAuth": { 104 | "description": "登录授权" 105 | }, 106 | "Payment": { 107 | "description": "支付" 108 | }, 109 | "Push": { 110 | "description": "消息推送" 111 | }, 112 | "Share": { 113 | "description": "社交分享" 114 | }, 115 | "Speech": { 116 | "description": "语音识别" 117 | }, 118 | "Statistic": { 119 | "description": "统计" 120 | }, 121 | "VideoPlayer": { 122 | "description": "视频播放" 123 | }, 124 | "LivePusher": { 125 | "description": "直播推流" 126 | } 127 | }, 128 | "plus": { 129 | "splashscreen": { 130 | "autoclose": true, 131 | "waiting": true 132 | }, 133 | "statusbar": { 134 | "immersed": true, 135 | "background": "#D74B28" 136 | }, 137 | "popGesture": "close", 138 | "runmode": "liberate", 139 | "signature": "Sk9JTiBVUyBtYWlsdG86aHIyMDEzQGRjbG91ZC5pbw==" 140 | } 141 | } -------------------------------------------------------------------------------- /plus/accelerometer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Hello H5+ 10 | 11 | 42 | 43 | 44 | 45 | 50 |
51 |
52 |
53 | 摇一摇 54 |
55 |
56 | 61 |
62 |
63 | Accelerometer可获取设备加速度传感器信息,包括x轴(屏幕水平方向)、y轴(垂直屏幕水平方向)、z轴(垂直屏幕平面方向)三个方向的加速度信息。 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /plus/accelerometer_shake.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 84 | 85 | 86 | 87 | 91 |
92 |
93 | 94 |
95 |
96 | 97 |
98 |
99 | 100 | 101 | -------------------------------------------------------------------------------- /plus/barcode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 87 | 88 | 97 | 98 | 99 | 104 |
105 |
106 | 107 |
108 |
扫一扫
109 |
扫一扫(自定义)
110 |
111 | 114 |
115 |
清空历史记录
116 |
117 |
118 | Barcode提供二维码扫描识别功能,支持调用摄像头即时扫描二维码,也可直接输入图片进行扫描识别。 119 |
120 | 121 | 122 | -------------------------------------------------------------------------------- /plus/barcode_scan.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 72 | 73 | 106 | 107 | 108 |
109 |
110 |

...载入中...

111 |
112 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /plus/barcode_scan2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 73 | 74 | 107 | 108 | 109 |
110 |
111 |

...载入中...

112 |
113 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /plus/camera_image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 44 | 45 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /plus/camera_video.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 47 | 48 | 49 | 50 |
51 |
52 | 53 |
54 |
55 | 56 | -------------------------------------------------------------------------------- /plus/device.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 84 | 85 | 86 | 87 | 92 |
93 |
94 | 101 |
102 |
103 | Device可获取手机设备相关信息,包括硬件、软件、网络等信息。 104 |
105 | 106 | 107 | -------------------------------------------------------------------------------- /plus/doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 91 | 146 | 147 | 148 | 152 |



153 |

正在加载中...

154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /plus/downloader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 70 | 71 | 72 | 73 | 78 |
79 |
80 | 88 |
89 |
90 | Downloader用于管理文件的下载,可从网络下载各种文件,并支持跨域访问。 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /plus/events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 49 | 50 | 51 | 52 | 57 |
58 |
59 |

按“HOME”键切换应用触发“pause”和“resume”事件,在设置中改变网络配置触发“netchange”事件。

60 |
61 |
62 |
63 | Events模块管理客户端事件,包括系统事件,如扩展API加载完毕、程序前后台切换等。
64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /plus/geolocation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 68 | 69 | 70 | 71 | 76 |
77 |
78 | 83 |
84 |
获取定位信息
85 |

86 | Android平台推荐配置高德或百度定位,避免在部分设备(如三星、HTC等)可能无法获取位置信息的问题。 87 |

88 |
89 |
90 | Geolocation可获取设备位置信息,包括经度、纬度、高度等信息。 91 |
92 | 93 | 94 | -------------------------------------------------------------------------------- /plus/maps.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 33 | 34 | 35 | 36 | 41 |
42 |
43 |
调用第三方地图程序导航
44 |
应用内置地图
45 |
46 |
47 |
48 | Maps模块管理地图控件,用于在web页面中显示地图控件,提供各种接口操作地图控件,如添加标点、路线等。通过plus.maps可获取地图管理对象。 49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /plus/maps_map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 72 | 73 | 87 | 88 | 89 | 94 |
地图加载中...
95 | 96 | 97 | -------------------------------------------------------------------------------- /plus/maps_map_sub.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 14 | 15 | 20 | 21 | 22 |
重 置
23 | 24 | -------------------------------------------------------------------------------- /plus/message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 66 | 67 | 68 | 69 | 74 |
75 |
76 |
发送附件邮件
77 |
发送HTML邮件
78 |
后台发送短信
79 |
80 | 85 |
86 |
87 | Messaging管理设备通讯功能,可用于发送短信、彩信、邮件等。 88 |
89 | 90 | 91 | -------------------------------------------------------------------------------- /plus/nativeobj.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 12 | 13 | 15 | 16 | 17 | 22 |
23 |
24 |
原生View过渡动画示例
25 |
26 |
27 |
28 | NativeObj用于管理系统原生对象,如原生View控件、图片对象等。 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /plus/nativeui.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 98 | 99 | 100 | 101 | 106 |
107 | 117 |
118 |
等待框
119 |
120 |
121 | nativeUI管理系统原生界面,可用于弹出系统原生提示对话框窗口、时间日期选择对话框、等待对话框等。 122 |
123 | 124 | 125 | -------------------------------------------------------------------------------- /plus/navigator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 35 | 36 | 37 | 38 | 43 |
44 | 49 |
50 |
状态栏样式
51 |
52 |
53 | Navigator用于管理浏览器运行环境信息,可用于设置应用全屏显示等。 54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /plus/navigator_status.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Hello H5+ 10 | 11 | 35 | 36 | 37 | 38 | 42 |
43 |
44 |

45 | Android平台需要5.0及以上版本支持设置系统状态栏背景颜色。 46 |

47 |
系统状态栏黑色样式
48 |
系统状态栏白色样式
49 |
50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /plus/njs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 129 | 130 | 132 | 133 | 134 | 139 |
140 |
141 | 144 | 148 |
149 |
更多示例...
150 |
151 |
152 | Native.JS一种把操作系统的原生对象转义,映射为JS对象,在JS里编写原生代码的技术。可通过plus.android.*和plus.ios.*提供的API分别调用Android和iOS平台的Native API。 153 |
154 | 155 | 156 | -------------------------------------------------------------------------------- /plus/njs_efficient.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 100 | 101 | 103 | 104 | 105 | 109 |
110 |
111 |

虽然导入类对象(plus.android.importClass和plus.ios.importClass)后,可以方便的通过“.”操作符来访问对象的常量、调用对象的方法,但导入类对象也需要消耗较多的系统资源,所以在实际开发时应该尽可能的减少导入类对象,以提高程序效率。

112 |

NJS中“高级API”提供的方法可以在不导入类对象的情况下调用Native API:

113 |
114 | 117 |
118 | 119 | 120 | -------------------------------------------------------------------------------- /plus/oauth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 96 | 97 | 110 | 111 | 112 | 117 |
118 |
119 |

登录认证通道信息:

120 |

121 |
122 |
123 |
124 |
注销登录
125 |
126 |
127 | OAuth模块管理客户端的用户授权登录验证功能,允许应用访问第三方平台的资源。 128 |
129 | 130 | 131 | -------------------------------------------------------------------------------- /plus/orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 43 | 44 | 45 | 46 | 51 |
52 |
53 | 水平仪 54 |
55 |
56 | 指南针 57 |
58 |
59 | 64 |
65 |
66 | Orientation可获取设备的方向信息,包括alpha(以垂直地心轴旋转的角度)、beta(以水平轴旋转的角度)、gamma(以垂直水平轴旋转的角度)三个方向信息。 67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /plus/orientation_compass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 104 | 105 | 167 | 168 | 169 | 173 |
174 | 175 |
176 |
177 | 北0° 178 |
179 |
180 | 181 | 182 |
183 |
184 | 185 | 186 | -------------------------------------------------------------------------------- /plus/orientation_level.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 83 | 84 | 141 | 142 | 143 | 147 |
148 |
149 | 横向 150 |
151 |
152 | 纵向 153 |
154 |
155 | 0 156 |
157 | 0 158 |
159 |
160 | 161 | 162 | 163 |
164 | 165 | 166 | -------------------------------------------------------------------------------- /plus/payment_iap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | In-App Purchase 9 | 10 | 72 | 73 | 74 | 75 | 79 |
80 |

81 |

82 | DCloud 是W3C会员、中国HTML5产业联盟发起单位,致力于推进HTML5发展,构建HTML5生态。 83 |

84 |
85 | 86 | 支持HTML5开发工具HBuilder 87 | 88 |
89 | 捐赠1元 90 |
91 |
92 | 捐赠6元 93 |
94 | 97 |
98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /plus/proximity.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 54 | 55 | 56 | 57 | 62 |
63 |
64 |

距离传感器一般都在手机听筒的两侧或者是在手机听筒凹槽中,当有物体接近时(如将手机靠近耳朵接听或拨打电话),距离感应器可以检测并通知屏幕背景灯熄灭,拿开时再度点亮背景灯,这样可方便用户操作并节省电量。

65 |
66 | 71 |
72 |
73 | Proximity模块管理设备距离传感器,可获取当前设备的接近距离信息,通过plus.proximity可获取设备距离传感管理对象。 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /plus/runtime.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 94 | 95 | 96 | 97 | 102 |
103 |
104 |
105 | 调用第三方程序 106 |
107 |
108 | 118 |
119 |
120 | Runtime管理程序运行时环境,可用于获取程序的各种信息、与第三方程序通讯等。 121 |
122 | 123 | 124 | -------------------------------------------------------------------------------- /plus/share.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 66 | 67 | 89 | 90 | 91 | 96 |
97 |
98 |
微信分享
99 |
QQ分享
100 |
微博分享
101 | 102 |
103 |

分享内容:

104 | 105 |

106 |
系统分享
107 | 111 |
112 |
113 | Share模块管理客户端的社交分享功能,提供调用终端社交软件的分享能力。通过plus.share可获取社交分享管理对象。 114 |
115 | 116 | 117 | -------------------------------------------------------------------------------- /plus/speech.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 61 | 62 | 69 | 70 | 71 | 76 |
77 |
78 |
开始语音识别
79 |
80 |
开始语音识别(英语)
81 |
82 | 85 |
86 |
87 |
自定义语音识别
88 |
89 |
90 |
91 | Speech提供语音识别功能,可通过麦克风设备进行语音输入操作。 92 |
93 | 94 | 95 | -------------------------------------------------------------------------------- /plus/speech_custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 78 | 79 | 114 | 115 | 116 |
117 |

118 | 设置userInterface属性值为false则不使用默认语音识别界面,此时可通过H5自定义语音识别界面。 119 |

120 |
注意:仅百度语音识别支持自定义界面
121 |
122 |
123 | 124 |
125 |
126 |
127 |
128 |
...倾听中...
129 |
...
130 |
131 |
132 |
133 |
134 |
135 |
按下开始&松开结束
136 |
137 | 138 | -------------------------------------------------------------------------------- /plus/statistic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 62 | 63 | 85 | 86 | 87 | 92 |
93 |
94 |

应用会在后台统计打开此页面的次数及在此页面停留的时间,目前应用集成的是友盟统计插件,相关统计数据需要登录到友盟官网查看。

95 |
96 |
0
97 |
98 |
99 |
统计按下时长
100 |
101 |
102 |
103 | Statistic模块管理统计功能,用于提供应用内统计的能力,支持统计和分析用户属性和用户行为数据。 104 |
105 | 106 | 107 | -------------------------------------------------------------------------------- /plus/storage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 65 | 66 | 67 | 68 | 73 |
74 |
75 | 82 |
83 |
84 | Storage管理本地数据存储,用于保存应用的全局数据,可在程序内部跨页面(跨域)共享数据。 85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /plus/uploader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 75 | 76 | 77 | 78 | 83 |
84 |
85 |

上传文件列表:

86 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
拍照
相册选取
97 |
98 |
上 传
99 |
100 | 104 |
105 |
106 | Uploader用于管理文件的上传,用于从本地上传各种文件到网络服务器,支持跨域访问操作。 107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /plus/uploader_ret.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 61 | 62 | 86 | 87 | 88 | 89 | 94 |
95 |
96 | 97 | 98 | -------------------------------------------------------------------------------- /plus/video.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 25 | 26 | 27 | 28 | 33 |
34 |
35 |
VideoPlayer视频播放
36 |
LivePusher直播推流
37 |
38 |
39 |
40 | Video模块管理多媒体视频相关能力,可用创建视频播放控件,直播推流控件等。 41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /plus/video_livepusher.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 46 | 47 | 68 | 69 | 70 |
71 |
72 |
73 |
74 | 75 | 76 |
77 |
切换摄像头
78 | 79 | -------------------------------------------------------------------------------- /plus/video_videoplayer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 66 | 67 | 88 | 89 | 90 |
91 |
92 |
93 |
94 | 95 | 96 | 97 |
98 | 99 | 100 |
101 |
播放
102 |
全屏
103 |
控件上内容显示/隐藏
104 | 105 | -------------------------------------------------------------------------------- /plus/video_videoplayer_sub.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 11 | 12 | 17 | 18 | 19 |
20 |

这是视频控件上显示的文字内容

21 |
22 | 23 | -------------------------------------------------------------------------------- /plus/webview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 84 | 85 | 86 | 87 | 92 |
93 |
94 |
窗口动画
95 |
窗口嵌套
96 |
悬浮窗口
97 |
下拉刷新
98 |
自定义下拉刷新
99 |
窗口遮罩
100 |
101 |
102 |
103 | Webview模块管理应用窗口界面,实现多窗口的逻辑控制管理操作。 104 |
105 | 106 | 107 | -------------------------------------------------------------------------------- /plus/webview_animation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 39 | 40 | 41 | 42 | 46 |
47 |
48 | 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /plus/webview_embed.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 58 | 59 | 72 | 73 | 74 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /plus/webview_float.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 | 14 |
15 |
关 闭
16 |
17 | 18 | -------------------------------------------------------------------------------- /plus/webview_mask.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 47 | 48 | 49 | 50 | 54 |
55 |
56 |
打开侧滑窗口
57 |
打开侧滑窗口后,当前Webview窗口会显示遮罩层。
58 |
Webview的遮罩层会覆盖Webview中所有内容(包括子Webview),并且截获Webview窗口的所有触屏事件。
59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /plus/webview_mask_side.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 |


14 |
关 闭
15 |
16 | 这是侧滑页面 17 | 18 | -------------------------------------------------------------------------------- /plus/webview_new.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 11 | 12 | 13 | 17 |
18 |

欢迎进入窗口动画页面

19 |
20 | 21 |
22 |

此页面已关闭侧滑返回功能

23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /plus/webview_pullhead.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 35 | 36 | 37 | 38 | 42 | 43 | -------------------------------------------------------------------------------- /plus/webview_pullrefresh.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 51 | 52 | 61 | 62 | 63 | 75 | 76 | -------------------------------------------------------------------------------- /plus/webview_pullrefresh_custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 43 | 44 | 53 | 54 | 55 | 67 | 68 | -------------------------------------------------------------------------------- /plus/webview_pulltorefresh.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 56 | 57 | 66 | 67 | 68 | 72 |
73 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /plus/xhr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 76 | 77 | 78 | 79 | 84 |
85 |
86 | 91 |
92 |
93 | XMLHttpRequest管理网络请求操作,可进行跨域网络数据请求。 94 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /plus/zip.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Hello H5+ 9 | 10 | 93 | 94 | 108 | 109 | 110 | 115 |
116 |
117 |
压缩图片
118 | 123 |
124 |
125 | Zip管理压缩文件,用于Zip文件的压缩与解压缩。 126 |
127 |
128 | 129 |
130 | 131 | 132 | -------------------------------------------------------------------------------- /sa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/sa.png -------------------------------------------------------------------------------- /sa@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/sa@2x.png -------------------------------------------------------------------------------- /sa@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcloudio/HelloH5plus/e0d83786b0f7141871a310d2ffefae59b58a3635/sa@3x.png --------------------------------------------------------------------------------