eeui plugin install https://github.com/aipaw/eeui-plugin-deviceInfo
eeui plugin uninstall https://github.com/aipaw/eeui-plugin-deviceInfo
const deviceInfo = app.requireModule("eeui/deviceInfo");
- [
callback
] (Function)
result
(Object)-
model
(String) -
vendor
(String) -
uuid
(String) -
platform
(String) (Android
|iOS
) -
version
(String) -
language
(String) -
isVirtual
(Boolean) ( iOS Only )
-
deviceInfo.info((ret) => {
console.log(ret)
})
- [
callback
] (Function)
result
(Object)type
(String) (wifi
|3g
|4g
|2g
|unkown
)
deviceInfo.netStatus((ret) => {
console.log(ret)
})
- [
time
] (Int) (ms, default:500
) ( Android Only )
deviceInfo.setVibrate()
deviceInfo.setVibrate(2000)
- [
callback
] (Function)
result
(Object)-
height
(Int) -
width
(Int) -
scale
(Float) -
dpiX
(Int) -
dpiY
(Int)
-
deviceInfo.screenInfo((ret) => {
console.log(ret)
})
- [
callback
] (Function)
result
(Object)brightness
(Float) (0~1)
deviceInfo.getBrightness((ret) => {
console.log(ret)
})
-
value
(Float) (0~1) -
[
callback
] (Function)
result
(Object)brightness
(Float) (0~1)
deviceInfo.setBrightness(1)
deviceInfo.setBrightness(1, (ret) => {
console.log(ret)
})
- [
callback
] (Function)
result
(Object)orientation
(String) (portrait
|landscape
|landscape-left
|landscape-right
|portrait-down
)
deviceInfo.getOrientation((ret) => {
console.log(ret)
})
- [
callback
] (Function)
result
(Object)volume
(Float) (0~1)
deviceInfo.getVolume((ret) => {
console.log(ret)
})
-
value
(Float) (0~1) -
[
callback
] (Function)
result
(Object)volume
(Float) (0~1)
deviceInfo.setVolume(1)
deviceInfo.setVolume(1, (ret) => {
console.log(ret)
})
- [
callback
] (Function)
result
(Object)-
level
(Int) (0~100) -
isPlugged
(Boolean)
-
deviceInfo.batteryStatus((ret) => {
console.log(ret)
})