查询余额以及流量
<uses-permission android:name="android.permission.WRITE_SETTINGS"></uses-permission>
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
public class GetPhones extends Activity{ protected void GetPhoneMoney() { TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String imsi = telManager.getSubscriberId(); if (imsi != null) { // //因为移动网络编号46000下的IMSI已经用完,所以虚拟了一个46002编号,134/159号段使用了此编号 if (imsi.startsWith("46000") || imsi.startsWith("46002")) { // 中国移动 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10086", null, "YE", null, null); } else if (imsi.startsWith("46001")) { // 中国联通 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10010", null, "102", null, null); } else if (imsi.startsWith("46003")) { // 中国电信 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10001", null, "101", null, null); } } } protected void GetPhoneGPRS() { TelephonyManager telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String imsi = telManager.getSubscriberId(); if (imsi != null) { // //因为移动网络编号46000下的IMSI已经用完,所以虚拟了一个46002编号,134/159号段使用了此编号 if (imsi.startsWith("46000") || imsi.startsWith("46002")) { // 中国移动 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10086", null, "CXGTC", null, null); } else if (imsi.startsWith("46001")) { // 中国联通 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10010", null, "107", null, null); } else if (imsi.startsWith("46003")) { // 中国电信 SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("10001", null, "421", null, null); } } } }
相关推荐
huha 2020-10-16
xfcyhades 2020-11-20
sgafdsg 2020-11-04
Michael 2020-11-03
fengyeezju 2020-10-14
ziyexiaoxiao 2020-10-14
业余架构师 2020-10-09
OuNuo0 2020-09-29
moses 2020-09-22
Angelia 2020-09-11
qinxu 2020-09-10
刘炳昭 2020-09-10
Nostalgiachild 2020-09-07
Nostalgiachild 2020-08-17
leavesC 2020-08-14
一青年 2020-08-13
AndroidAiStudy 2020-08-07
ydc0 2020-07-30
绿豆饼 2020-07-28