private class MyExceptionHandler implements UncaughtExceptionHandler{
//当发现了未捕获异常的时候调用的方法
@Override
public void uncaughtException(Thread thread, Throwable ex) {
System.out.println("发生了异常,但是被哥捕获了。。。");
//自杀的方法. 早死早超生
android.os.Process.killProcess(android.os.Process.myPid());
}
}
}
提取设备硬件和版本信息
内部类:
1、Build.VERSION 版本相关常量字符串
2、Build.VERSION_CODES 目前已知的版本代码的常量类
静态属性
1、BOARD 主板:The name of the underlying board, like goldfish.
2、BOOTLOADER 系统启动程序版本号:The system bootloader version number.
3、BRAND 系统定制商:The consumer-visible brand with which the product/hardware will be associated, if any.
4、CPU_ABI cpu指令集:The name of the instruction set (CPU type + ABI convention) of native code.
5、CPU_ABI2 cpu指令集2:The name of the second instruction set (CPU type + ABI convention) of native code.
6、DEVICE 设备参数:The name of the industrial design.
7、DISPLAY 显示屏参数:A build ID string meant for displaying to the user
8、FINGERPRINT 唯一识别码:A string that uniquely identifies this build. Do not attempt to parse this value.
9、HARDWARE 硬件名称:The name of the hardware (from the kernel command line or /proc).
10、HOST
11、ID 修订版本列表:Either a changelist number, or a label like M4-rc20.
12、MANUFACTURER 硬件制造商:The manufacturer of the product/hardware.
13、MODEL 版本即最终用户可见的名称:The end-user-visible name for the end product.
14、PRODUCT 整个产品的名称:The name of the overall product.
15、RADIO 无线电固件版本:The radio firmware version number. 在API14后已过时。使用 getRadioVersion()代替。
16、SERIAL 硬件序列号:A hardware serial number, if available. Alphanumeric only, case-insensitive.
17、TAGS 描述build的标签,如未签名,debug等等。:Comma-separated tags describing the build, like unsigned,debug.
国外:
StartAPP:[http://www.startapp.com/]( )
Google:[http://www.google.cn/admob/]( )
国内:
百度:[http://app.baidu.com/index/appx]( )
友盟,有米,万普等等
project.properties里配置proguard.config=proguard-android.txt
注意事项:
最后这里放上我这段时间复习的资料,这个资料也是偶然一位朋友分享给我的,里面包含了腾讯、字节跳动、阿里、百度2020-2021面试真题解析,并且把每个技术点整理成了视频和PDF(知识脉络 + 诸多细节)。
还有?高级架构技术进阶脑图、高级进阶架构资料?帮助大家学习提升进阶,这里我也免费分享给大家也节省大家在网上搜索资料的时间来学习,也可以分享给身边好友一起学习。
有需要的朋友可以点击:Android面试资料免费领取~
一起互勉~
标签: