获取手机CCID号
2016-01-27 17:30
435 查看
gradle-wrapper.properties是这样的 distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip 而build.gradle是这样的 buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } |
String imei = tm.getDeviceId(); //取出IMEI
String tel = tm.getLine1Number(); //取出MSISDN,很可能为空
String imei =tm.getSimSerialNumber(); //取出ICCID
String imsi =tm.getSubscriberId(); //取出IMSI
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
PropertyValuesHolder pvhX = PropertyValuesHolder.ofFloat("alpha", 1f, 0f);
ObjectAnimator oProValHolder = ObjectAnimator.ofPropertyValuesHolder(container, pvhX);
oProValHolder.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
container.setVisibility(View.GONE);
}
});
oProValHolder.setDuration(DURATION).start();
}
}, 80);
public static InputStream getStringStream(String sInputString) {
if (!Tools.isEmpty(sInputString)) { // !=null equals("")
ByteArrayInputStream tInputStringStream = new ByteArrayInputStream(
sInputString.getBytes());
return tInputStringStream;
}
return null;
}
public static String read(InputStream inStream) throws Exception {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len = 0;
while ((len = inStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, len);
}
inStream.close();
byte[] arry = outputStream.toByteArray();
String result = "";
if (arry != null) {
result = Arrays.toString(arry);
}
return result;
}
/**
* 从jar包中读取资源
*
* @param file
* @return
*/
public static InputStream getStream(Context context, String file) {
InputStream is = null;
try {
is = Tools.class.getResourceAsStream("/" + file);
} catch (Exception e) {
e.printStackTrace();
}
return is;
}
相关文章推荐
- nova中vmware的一些叫法
- Java文档:并发库(一)【接口:Exectuor接口族】
- Attribute "title" has already been defined 异常解决
- ListView显示信息列表
- 软件项目开发流程
- Java 入门 之 面向对象 封装、继承与多态(二)
- How to control your dust collection with an Arduino (it's easy)
- Xcode7打包,iOS9真机闪退,如何解决?
- 常用类封装
- 大道至简——书摘与思考
- 开发中常用颜色的 rgb 值
- amcl
- 第 9 章 单位和值
- Android仿微信照片选择器实现预览查看图片
- iOS 核心面试题
- 8. String to Integer (atoi)
- Hack6 为ViewGroup添加动画效果
- JDK1.8 HashMap源码分析
- mac 命令行常用命令
- iOS开发-进阶:图像进行压缩方法汇总