- 博客(3)
- 资源 (5)
- 收藏
- 关注
原创 android 中判断网络是否可用
在很多android应用程序运行的前提条件是网络状态可用,或者很多开发工程师想检查一下当前的网络状态是否可用,下面这段简单代码可以轻松实现。 /** * @param ctx * @return True: the network is available * False: the network is unavailable */ public boolean i
2013-02-22 15:44:17 518
原创 android中判断SIM卡状态
TelephonyManager mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); int simState = mTelephonyManager.getSimState(); String hintMessage = ""; switch (simState) {
2013-02-16 13:51:16 6973
原创 Android下getService和getSystemService
1. getServicegetService与addService函数配对使用,一般使用在Android的C/C++层,一般会指定一个16字节大小的Service名称IBinder b = ServiceManager.getService(serviceName);2.getSystemServicegetSystemService只能获取在Context.java
2013-02-05 16:52:22 4182
linux Android基础知识总结.pdf
2012-07-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人