博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
获取手机CCID号
阅读量:4562 次
发布时间:2019-06-08

本文共 2140 字,大约阅读时间需要 7 分钟。

 

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
    }
}

 

 

TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);

        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;
}

转载于:https://www.cnblogs.com/july2015/p/5164025.html

你可能感兴趣的文章
CSS3动画库animate.css
查看>>
Type类型详解
查看>>
C#面向对象(一)
查看>>
Excel 求差集和并集
查看>>
设计抗住千万级流量的架构思路
查看>>
Service生命周期
查看>>
malloc 内存分配
查看>>
概率论
查看>>
实验四
查看>>
python,ModuleNotFoundError,is not a package
查看>>
mybatis 空字符串和0
查看>>
服务器上centos 7 配置静态IP
查看>>
C# unsafe模式内存操作深入探索
查看>>
Redis拾遗(一)
查看>>
js字符串转换为Json对象的三种写法
查看>>
Is it possible to display icons in a PopupMenu?
查看>>
Atitit.常见的4gl 第四代编程语言 与 dsl
查看>>
Atitit js es5 es6新特性 attilax总结
查看>>
JavaWeb学习记录(三)——网页中文编码问题
查看>>
$( document ).ready()&$(window).load()
查看>>