ITeye博客

2014 年文章归档

共 2 篇文章

android autoanswer

http://code.google.com/p/auto-answer/ Here is a code snippet to trigger an answer for the incoming call: private void answerPhoneAidl(Context context) throws Exception { // Set up communication with the telephony service (thanks to Tedd's Droid Tools!) TelephonyManager tm = (TelephonyManager) getSy…

2014-08-29 14:51

Java资源加载详解

Java资源加载详解 Java开发中常常要加载各种各样的资源文件,如property文件,xml配置文件,图片文件等等。 Java的资源加载策略选择比较多,很多资源加载方法都是基于不同的项目配置,没有一种资 源加载方法是万能的。首先来看看Java中的几种常见的资源加载方法: 一:通过ResourceBundle类来实现资源加载 这种方式通常被用来加载多语言支持的property文件,Java语言通过ResourceBundle可以非 常好的支持国际化。假设在默认为英文的系统中有语言资源文件mybundle_en.properties,则 调用代码如下: ResourceBundle myBu…

2014-02-05 11:18