android-permissions

Can't answer incoming call in android marshmallow 6.0

雨燕双飞 提交于 2019-11-29 05:51:57
I'm creating a calling app. Here's Auto answer which works on android 4.0 and 5.0; whereas when i have an incoming call answer call button works but it doesn't work on android 6.0. I tested answer of this post but it doesn't work too : Answer Incoming Call in Android 6.0 IncomingActivity: @Override public void onClick(View v) { switch (v.getId()) { case R.id.imgaccept: { if (Build.VERSION.SDK_INT >= 21) { new Thread(new Runnable() { @Override public void run() { try { Runtime.getRuntime().exec( "input keyevent " + KeyEvent.KEYCODE_HEADSETHOOK ); Intent intent = new Intent(getApplicationContext

Android App not asking for permissions when installing

北战南征 提交于 2019-11-29 05:33:18
I work in the IT department of my university and we work on an app that installs the correct setup for the eduroam WiFi (maybe you have heard of it). However I have a problem running it on my own LG G4 with Android 6.0. When installing the compiled *.apk it doesn't ask for any permissions although they are set in the AndroidManifest.xml. It was working on all previous Android versions. Is it mandatory now to ask for permissions at run time? If your target SDK version is 23 then you need to ask for "dangerous" permissions at run time. If this is the case then you should be able to see that no

Android M: Programmatically revoke permissions

故事扮演 提交于 2019-11-29 05:29:35
I am currently playing around with android m's new permission system. What i am planning is to add a screen to my in-app settings where the user can grant or revoke permissions. The screen would look like the regular system settings screen, but will have additional information why my app needs the specific permission. This settings screen would be an addition to the regular permission handling as suggested in the Documentation . The workflow would be: granting permission: open the systems dialog to grant/revoke ( like suggested here ) revoking permission: revoke it programmatically So my

How to check if Android Permission is actually being used?

风格不统一 提交于 2019-11-29 04:30:36
问题 I am maintaining one existing (very-huge, very-sensitive) Android Application. The other day, I have received an email from my client that, the Application might be declaring the Permissions that are not actively being used. For example, they wants me to remove "WRITE_EXTERNAL_STORAGE" permission. I have removed it and compiled it and run the App. There is NO error at all. But, just because of that, I don't think I can assume that permission is not actively being used at all. My question is

Push notifications (GCM) permission at runtime?

不羁的心 提交于 2019-11-29 04:30:19
问题 I have read that it is necessary to ask the user for some permissions at runtime for API 23 and up. For example: android.permission.ACCESS_FINE_LOCATION . Is it necessary (or even possible) to ask for a runtime permission for using GCM/push notifications at runtime if API is 23 or higher? I have tried using the requestPermissions method at runtime, but it doesn't seem to work (nothing happens) when I use it with any GCM/push notification related permissions. I have the following permissions

Neither user nor current process has android.permission.ACCESS_COARSE_LOCATION

♀尐吖头ヾ 提交于 2019-11-29 03:37:43
I know it may be silly question and I have referred all the similar question before but unfortunately I could resolve this issue. Most probably it is problem in my Manifest.xml file. When I am trying to access location, app is crashing here is my manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.tt.test" > <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".sTest" android:label="@string/app

Why I am receiving Warning - this app does not meet Google Play permissions policy, even though my latest version doesn't require these permission?

人走茶凉 提交于 2019-11-29 03:31:41
It show this message This app does not meet the Google Play permissions policy relating to the use of SMS or CALL_LOG. You must fix this before March 9. 2019 or your app will be removed from Google Play. Note: if you have recently made a change, it can take up to 12 hours to update this message. My app on its previous version has this permission and apply for an exception when it was rejected I updated the app 2 weeks ago and removed this permission. But now I get this message. I also received this warning on my last app version. Explanation: You are receiving this warning because somehow

Does checking the Never ask again box when asking for a runtime permission disable future dialogs?

谁都会走 提交于 2019-11-29 03:12:47
If a user denies a runtime permission with Never ask again checked, does this disable any future ability to ask for the same permission? Does the user have to go through settings to enable that permission? In my application, when I call ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE}, 0) and that permission has previously been denied with Never ask again checked, it won't show a dialog box at all. Is this the expected behavior? This is expected behaviour. From the documentation : When the system asks the user to grant a permission, the user has the

Wait for user permission

陌路散爱 提交于 2019-11-29 01:14:55
I building an application that sampling GPS on starting. As you probably know, permissions are requested during run-time from Android M and above. So, in my case I'm starting with checking if permissions are needed, like this: private void permissionForAndroidM() { if (Build.VERSION.SDK_INT > 22) { String[] allPermissionNeeded = { Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO}; List<String> permissionNeeded = new ArrayList<>(); for (String permission

Restricting Android Broadcast Receiver from specific app

北城以北 提交于 2019-11-29 00:14:59
I have 2 applications. If I use service, I can set permission so only app1 can send intent to app2 : Define permission in app2 ( protection level: signature ), and use that permission in app1 . Service in app2 is protected by that permission. In this way, only app1 can send an intent to a service on app2 , and no other app (unless my signature is leaked) can send intent to service on app2 . Can I do the same with Broadcast Receiver? app1: sendBroadcast(intent, permission) app2: define permission, use that permission. To my understanding for using sendBroadcast(intent, permission), the