Android getphoneinfo

获取设备信息

使用adb shell 获取android设备信息

ADB 用法大全 

service call iphonesubinfo x
x是整数: android5.0-

getImsi:
service call iphonesubinfo 3

卡2
service call iphonesubinfo2 3

getIMEI:

service call iphonesubinfo 1
or:
imei=$(adb shell dumpsys iphonesubinfo | $GREP 'Device ID' | $GREP -o '[0-9]+')

x是整数: android5.1+
1 getDeviceId
2 getDeviceIdForSubscriber
3 getImeiForSubscriber
4 getDeviceSvn
5 getSubscriberId
6 getSubscriberIdForSubscriber
7 getGroupIdLevel1
8 getGroupIdLevel1ForSubscriber
9 getIccSerialNumber
10 getIccSerialNumberForSubscriber
11 getLine1Number
12 getLine1NumberForSubscriber
13 getLine1AlphaTag
14 getLine1AlphaTagForSubscriber
15 getMsisdn
16 getMsisdnForSubscriber
17 getVoiceMailNumber
18 getVoiceMailNumberForSubscriber
19 getCompleteVoiceMailNumber
20 getCompleteVoiceMailNumberForSubscriber
21 getVoiceMailAlphaTag
22 getVoiceMailAlphaTagForSubscriber
23 getIsimImpi
24 getIsimDomain
25 getIsimImpu
26 getIsimIst
27 getIsimPcscf
28 getIsimChallengeResponse
29 getIccSimChallengeResponse

发送短信:

service call isms 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText" //发送短信

转载于:https://my.oschina.net/jackywyz/blog/1535355

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在uniapp中,要解决App顶部刘海的问题,可以按照以下步骤进行操作: 1. 在main.js文件中,封装一个全局函数`getPhoneInfo`,用于获取手机系统信息,并设置状态栏高度。代码如下: ```javascript Vue.prototype.getPhoneInfo = function(){ const phoneInfo = uni.getSystemInfoSync();// 获取手机系统信息 let statusBarObj = { statusBarHeight: 20/* 状态栏默认高度 */ //如果自己有需要其他属性的话,可以往这里添加 } // 设置状态栏高度(H5顶部无状态栏小程序有状态栏需要撑起高度) statusBarObj.statusBarHeight = phoneInfo.statusBarHeight; return statusBarObj; } ``` 2. 在需要使用顶部刘海的页面中,使用`this.getPhoneInfo`函数获取状态栏高度,并设置顶部元素的高度来撑起刘海区域。代码如下: ```html <template> <!-- 顶部设置一个元素高度,撑开特定高度 --> <view :style="{height:statusBarHeight + 'px'}"></view> </template> <script> export default { data() { return { /* 设定状态栏默认高度 */ statusBarHeight:20 } }, created(){ let statusBarObj = this.getPhoneInfo() this.statusBarHeight = statusBarObj.statusBarHeight }, //计算属性:更新statusBarHeight computed:{ style() { var statusBarHeight = this.statusBarHeight; return statusBarHeight; }, }, } </script> ``` 总结:通过以上步骤,你可以在uniapp中解决App顶部刘海的问题。使用全局函数`getPhoneInfo`获取状态栏高度,并在需要的页面中设置顶部元素的高度来适应刘海区域。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值