telephonymanager

Broadcast receiver for Phone State changed not working

一个人想着一个人 提交于 2020-08-25 07:42:15
问题 i have created a broadcast receiver for Phone state change. but the broadcast is not working. i have been trying from couple of hours and tried 2,3 solutions but still its not working. other guys over internet have same code and the is working fine for them. i don't know where i am making mistake. need your help! Here are my manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="veclar.map.callandsmsblocking"> <uses

How to remove country code , When Pick Phone Number from contacts

不羁岁月 提交于 2020-07-03 01:40:08
问题 I have doubt in that section. How to Remove country code, when I pick phone number from contact list? Ex: +91 999999999 instead of 9999999999 or +020 9696854549 instead of 9696854549 Can any one know the answer about my question. please give solution to this problem I attached my code and image here. private void contactPicked(Intent data) { Cursor cursor = null; try { String phoneNo = null ; // getData() method will have the Content Uri of the selected contact Uri uri = data.getData(); /

Since Android 6.0 listening to the PhoneStateListener.LISTEN_DATA_CONNECTION_STATE changes seems to no longer require READ_PHONE_STATE permission

亡梦爱人 提交于 2020-02-26 14:41:29
问题 I'm applying Android 6.0 runtime permissions into an app which listens to carrier data connection state changes. I first tried to just remove the READ_PHONE_STATE from the manifest to check where the app requires the permission. To my surprise the app didn't crash at all. After this I've tried the same installation on two pre 6.0 devices which did actually crash on it. To me it seems like Android 6.0 does no longer require the permission. Is there any way to confirm this? The line below is