android-permissions

Android: Putting a custom permission on the main activity - bad practice?

末鹿安然 提交于 2019-12-11 11:21:50
问题 I have a simple application that runs a webview and I want it to be launchable by other applications sending a few parameters that I will include in the URL string. To accomplish this, I created a new intent-filter on the main activity to go with the main/launcher intent-filter like so: <intent-filter> <action android:name="com.mycompany.myapp.intents.START_APP" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent

Require dangerous permissions during installation

我们两清 提交于 2019-12-11 10:49:17
问题 Since API level 23, android introduced a new approach to grant 'dangerous' permissions , while the app is running. That means that permissions such as camera access, phone call access and such will have to be given during run time. I can completely understand why this can often be very useful, and less intimidating to users in the installation process. However, an app which uses many such 'dangerous' permissions (for all the right reasons) can easily annoy a user with so many requests in

Unable to upload new APK file to Android Play store (google pay)

别说谁变了你拦得住时间么 提交于 2019-12-11 10:46:53
问题 When I try to upload a new apk version of my app, i get this message: "La aplicación que has enviado recientemente se ha rechazado por infringir las Políticas del Programa para Desarrolladores de Google Play. Si has enviado una actualización, la versión anterior sigue estando disponible en Google Play." After that, i receive and e-mail talking about "Google Pay" but i never used google pay. We detected that at least one APK version in your recent upload isn’t using Android Pay correctly.

Google Play restricts the use of the SMS and Call Log permissions

空扰寡人 提交于 2019-12-11 06:47:10
问题 If I have an app which is still in the development and not yet published but I am planning to launch it through Google play store. My App is introducing a feature where the user can retrieve his latest SMS and Call logs so the app requires granting the SMS and call log permissions. As per the application is not yet published, Am I required to fill the google form? Are these restrictions applied by google play store itself, not the Android OS so if I distributed the app through any other tool

Marshmallow permission

帅比萌擦擦* 提交于 2019-12-11 06:37:53
问题 I'm trying to check permission in activity as below, int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNT); But I'm getting error at GET_ACCOUNT as Cannot resolve symbol 'GET_ACCOUNT' . Kindly help what code should I add to fix this? Thanks in advance. 回答1: It should be Manifest.permission.GET_ACCOUNTS instead of Manifest.permission.GET_ACCOUNT Try like this int permission = ContextCompat.checkSelfPermission(this,Manifest.permission.GET_ACCOUNTS); Don't

Android permission doesn't work even if I have declared it

泄露秘密 提交于 2019-12-11 06:07:38
问题 I'm trying to write code to send an SMS from an Android app, but when I try to send the SMS it sends me back the error: 09-17 18:37:29.974 12847-12847/**.**.****E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: **.**.****, PID: 12847 java.lang.SecurityException: Sending SMS message: uid 10092 does not have android.permission.SEND_SMS. at android.os.Parcel.readException(Parcel.java:1599) at android.os.Parcel.readException(Parcel.java:1552) at com.android.internal.telephony.ISms$Stub$Proxy

Determine whether a permission is present in the manifest with Android 23+

自作多情 提交于 2019-12-11 05:31:20
问题 I am creating a library that needs to check runtime permissions. I have got runtime permissions working fine and understand the use cases without issues. However I would like to confirm that the developer using our library has added the permission to their manifest. The library is a location based library and the developer can either enter ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION into the manifest and I need to be able to determine which they have used (or both) at runtime. I though

Permissions needed for NotificationManager

安稳与你 提交于 2019-12-11 05:13:57
问题 I'm trying to set the Ringer to Silent and Do not Disturb to Priority Only using the following AudioManager myAudioMgr = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); NotificationManager myNOtificationMgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); myAudioMgr.setRingerMode(AudioManager.RINGER_MODE_SILENT); myNOtificationMgr.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_PRIORITY); I keep getting a security error java.lang

The application does not have sufficient geolocation permissions

眉间皱痕 提交于 2019-12-11 05:02:49
问题 I thought this would be a simple solution but a day later I'm still unable to solve it. Im creating a hybrid webview app and my site has a button that gets the users current location. This is working in chrome browser fine but in webview I get the following error: E/cr_LocationProvider: Caught security exception while registering for location updates from the system. The application does not have sufficient geolocation permissions. I've added permissions to the manifest: <uses-permission

Redmi phones not asking SMS permissions and hence not reading sms

a 夏天 提交于 2019-12-11 04:17:51
问题 Following is my code: <!-- Data SMS Receiver --> <receiver android:name=".otp.OTPReceiver" android:enabled="true" android:exported="true" > <intent-filter> <action android:name="android.intent.action.DATA_SMS_RECEIVED" /> <data android:scheme="sms" /> <data android:port="9027" /> </intent-filter> </receiver> otp.OTPReceiver is the associated BroadcastReceiver This works in all other phones except Redmi devices. In Redmi phones you have to manually switch on autostart & other permissions in