android-permissions

Revoked permission android.permission.CALL_PHONE

懵懂的女人 提交于 2019-12-03 11:09:29
问题 I'm trying to programmatically call to a number with following code: String number = ("tel:" + numTxt.getText()); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(number)); startActivity(intent); I've set the permission in the Manifest: <uses-permission android:name="android.permission.CALL_PHONE"/> I'm working with real device for testing and debugging, it is Nexus 5 with Android M, my compileSdkVersion is 23. I'm getting the following Security Exception: error:

Can not find Symbol Manifest.permission.WRITE_EXTERNAL_STORAGE on v23

跟風遠走 提交于 2019-12-03 11:06:58
问题 I am compile code with following build.gradle file android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.example" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } For accessing saving photo into SDCARD i have opened permission Dialog box for V23 like below screenshot But I am

How Can the Settings App Start an App's Non-Exported Activity?

半城伤御伤魂 提交于 2019-12-03 10:59:14
Android N lets you link an activity of yours into your app's page in Settings. Just add an <intent-filter> for android.intent.action.APPLICATION_PREFERENCES . Android N's Settings app will look for the activity in your app that has that <intent-filter> . If Settings finds one, it will add a gear icon to your app's page in Settings, and if the user taps the gear, they will be taken to your designated activity. I was worried about security, and so I filed an issue , looking for a permission we could use with android:permission to allow Settings to start our activity, but not allow other apps to

Android permission.INTERACT_ACROSS_USERS denial

末鹿安然 提交于 2019-12-03 10:43:07
问题 I've a strange android permission denial, here is it: java.lang.SecurityException: Permission Denial: isUserRunning() from pid=1078, uid=10284 requires android.permission.INTERACT_ACROSS_USERS I haven't found anything about android.permission.INTERACT_ACROSS_USERS only android.permission.INTERACT_ACROSS_USERS_FULL Here is the full logcat: java.lang.SecurityException: Permission Denial: isUserRunning() from pid=25403, uid=10310 requires android.permission.INTERACT_ACROSS_USERS at android.os

How to get device's IMEI/ESN number with code programming But in android > 6

回眸只為那壹抹淺笑 提交于 2019-12-03 10:17:06
问题 My Android version is Marshmallow 6.0 How to Find / Get imei number in android > 6 programmatically. Note : I added READ_PHONE_STATE permission inside AndroidManifest.xml file. <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission> And inside MainActivity TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String deviceid = manager.getDeviceId(); //Device Id is IMEI number Log.d("msg", "Device id " + deviceid); 回答1: My

What kind of Android application will require android.permission.READ_PHONE_STATE permission?

£可爱£侵袭症+ 提交于 2019-12-03 09:34:44
I have seen some Android apps on my phone require this android.permission.READ_PHONE_STATE permission. I don't know if I could trust them. I know this permission will give the app access to many information. I'm particularly interested in what functionality in an Android app normally require the information like DeviceId , SimSerialNumber , SubscriberId ? Samuel Bolduc Phone state provides access to a lot of information about the phone. Usual usages will be for reading the IMEI of your phone and your phone number. This can be useful to identify you in their systems. It can also be needed if

Android: get user ID without requiring scary (for user) permissions?

ぃ、小莉子 提交于 2019-12-03 08:54:07
问题 In order to manage user preferences, at present I'm grabbing the google user name (effectively the email address they've registered to the device) and using (a hash of) that as a "user ID" to distinguish between different users. Something along the lines of what is described here. That all works fine, but some users are (understandably) scared off by any permission that seems to give the app some evil power to trawl through their account info or contacts. EDIT: this issue is even more acute

When should I use ACCESS_COARSE_LOCATION permission?

坚强是说给别人听的谎言 提交于 2019-12-03 07:21:14
问题 I am building an Android app that will track the user's geolocation and draw their route on a map. I am using the Google Play Services location API, as described here. It is intuitive that my application requires the ACCESS_FINE_LOCATION permission, which I put in the manifest: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> Do I also need the ACCESS_COARSE_LOCATION permission? What's the use case where I need the coarse location? 回答1: Do I also need the ACCESS

Android 6.0.1 couldn't enable wifi hotspot programmatically

▼魔方 西西 提交于 2019-12-03 07:02:12
When I tried to enable wifi tethering from the following code it throws the exception java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at com..... .... not granted this permission: android.permission.WRITE_SETTINGS But this works fine in android 6.0 and below versions. And also tried with giving android.permission.WRITE_SETTINGS too. Is there any limitation in accessing wifiAP in android 6.1? Follow I attached the code sample that I used to enable hotspot. WifiConfiguration netConfig = new WifiConfiguration(); netConfig.SSID = ssId; netConfig

How do I create a shortcut for any app on desktop?

隐身守侯 提交于 2019-12-03 07:01:39
问题 I think I've tried all the solutions I found on the internet, but no one worked - no force close, but nothing appears on desktop. Now, I have this: private void createShortcutOnDesktop(Application app) { Intent shortcutIntent = new Intent(); shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, app.getIntentShortcut()); shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, app.getName()); shortcutIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext