摘要: public static boolean isGooglePlayServiceAvailable (Context context) { int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context); if  阅读全文
posted @ 2017-03-24 14:57 Alter 阅读(3005) 评论(0) 推荐(0)
摘要: 实时检测耳机插入和拔出: 每当插入和拔出耳机时,系统都会发送Intent广播, 所以,只需要用一个receiver把这个广播intent(获取的action是:“android.intent.action.HEADSET_PLUG”)截获就好。 这个receiver必须要用代码注册,而不能写在man 阅读全文
posted @ 2017-03-24 11:56 Alter 阅读(1364) 评论(0) 推荐(0)