android-permissions

Why does my app has the READ_PHONE_STATE permission although it's not declared in manifest?

纵然是瞬间 提交于 2019-11-28 12:19:33
I noticed the READ_PHONE_STATE permission when I uploaded the apk to google play. I have not added it and it is not written anywhere in my manifest or any other file of my project. (I looked through all libraries for this permission) My app did not have this permission in my previous build with same libraries. Since last build I updated android studio to version 1, updated my android sdk and made a few changes (in code) to my app. I don't request the device ID in my app. My app has minSDK 14 and no ads. Here are my manifest permissions: <uses-permission android:name="android.permission.READ

Redmi phones not asking SMS permissions and hence not reading sms

风流意气都作罢 提交于 2019-11-28 12:06:37
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 the Permissions app (This app handles permissions in Redmi phones). I see Facebook, whatsapp, etc. when

Do I need android.permission.WAKE_LOCK for Google Play Services if I only release in Google Play Store?

与世无争的帅哥 提交于 2019-11-28 11:59:57
I am trying to integrate Google Analytics for Android. As per the documentation here , it asks to add android.permission.WAKE_LOCK (provides the comment note below). I dont understand it clearly. If I am releasing the app ONLY in the Google Play Store , do I still need this? I really do not want to ask users for an additional permission if this is not absolutely necessary. <!-- Optional permission for reliable local dispatching on non-Google Play devices --> <uses-permission android:name="android.permission.WAKE_LOCK" /> In particular, I do not understand what this note actually means here :

Permission denied for window type 2002 in Android Studio

孤街浪徒 提交于 2019-11-28 11:22:37
Today I installed latest version of Android Studio I am learning Floating Widgets in Android I started with applying this example https://www.spaceotechnologies.com/android-floating-widget-tutorial/ it compiles ok but when I run it in the emulator it crashes giving me this error 08-28 22:52:02.932 7400-7400/com.asmgx.MyApp.MyApp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.asmgx.MyApp.MyApp, PID: 7400 java.lang.RuntimeException: Unable to create service com.asmgx.MyApp.MyApp.FloatWidgetService: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl

signature protection level - clarifying [duplicate]

我只是一个虾纸丫 提交于 2019-11-28 09:56:13
This question already has an answer here: Regarding Android Permissions and Signature Protection level 2 answers As I am new to Android, I wanted to ask something which is not clear enough to me. I read the API guide about the permissions as a lot more Q&A considering this topic, still, I am not sure if I understand it correctly. So, signature protection level is: A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission

Why has the READ_PHONE_STATE permission been added?

我的梦境 提交于 2019-11-28 09:39:48
In the latest beta version I just published to the Play Store, I notice that the READ_PHONE_STATE has been added since the previous version. I haven't added this myself. All I can recall doing since the previous version is using v9.6.0 of various play-services libraries (was v9.4.0): compile 'com.google.android.gms:play-services-location:9.6.0' compile 'com.google.android.gms:play-services-places:9.6.0' compile 'com.google.android.gms:play-services-auth:9.6.0' Would this have done it? I can't see it documented. Can I get rid of the permission? And I've ensured that all the of the libraries I'm

How to grant permission Manifest.permission.MANAGE_DOCUMENTS android 6.0

你说的曾经没有我的故事 提交于 2019-11-28 09:30:52
问题 I want to grant the permission Manifest.permission.MANAGE_DOCUMENTS , but when I run the app, the dialog of the permission should appear but it doesn't. Here's my code: int hasCameraPermission = ContextCompat.checkSelfPermission(MemoryDetail.this, Manifest.permission.MANAGE_DOCUMENTS); if (hasCameraPermission != PackageManager.PERMISSION_GRANTED) { if (!ActivityCompat.shouldShowRequestPermissionRationale(MemoryDetail.this, Manifest.permission.MANAGE_DOCUMENTS)) { showDialogMessage("Need use

Get Android system permissions by putting app in /system/app?

て烟熏妆下的殇ゞ 提交于 2019-11-28 09:28:10
Experimenting with some newer Android APIs from the AOSP, I have found some that require the android.permission.BLUETOOTH_PRIVILEGED permission. According to the docs , the permission "is not available to third party applications." I have read elsewhere that you can get system level permissions on a rooted device by installing your app in the /system/app directory. I have tried this on my rooted Nexus 5, but my app still does not get the desired privilege. (See code and LogCat output below.) An alternative I have heard is to build your own custom Android ROM, then sign the app with the same

Null pointer exception when checking for permission with android.content.Context.checkPermission

半腔热情 提交于 2019-11-28 08:59:26
问题 I need to check for permissions before querying the Android calendar for events. To do it, Android studio is warning that I need to follow a check before querying. The auto generated code is this piece: if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_CALENDAR) != PackageManager.PERMISSION_GRANTED) { System.out.println("NO ACCESS TO CALENDAR!! Abort mission, abort mission!!"); } When trying to run it, I get this error: Attempt to invoke virtual method 'int android.content

Using osmdroid without getting access to external storage

断了今生、忘了曾经 提交于 2019-11-28 08:11:31
问题 In my app I am using osmdroid for working with map. Map tiles are downloaded and kept in /storage/osmdroid . The application requires permissions WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE . If I deny access to storage, map is not shown. Is any way to show map without access to phone memory? 回答1: https://github.com/osmdroid/osmdroid/wiki/FAQ Fresh off the wiki press. Yes you can change the location to application private storage, in which case it should work just fine. Pro tip: set