android-permissions

Will this app show up in the Play Store?

南楼画角 提交于 2019-12-10 15:51:29
问题 I have heard in many places that if my app uses a permission not applicable to a certain device, it will not show up in the play store for that device. Now, in my code, I am playing audio. I mute that audio whenever there is a phone call by doing this: private PhoneStateListener phoneStateListener = new PhoneStateListener() { @Override public void onCallStateChanged(int state, String incomingNumber) { if (state == TelephonyManager.CALL_STATE_RINGING) { onPhoneCallInterrupt(); //Method I made

How to ask permission (RunTime) again if the user deny for the first time

时间秒杀一切 提交于 2019-12-10 15:40:17
问题 I want to re ask the permission to the user in the situation if he/she deny for the first time. I have set the permission but my app runs even if I press deny option. I have a code which should do the things which I want to do but I get Cant resolve symbol Snackbar when I hit Alt+Enter it created another activity and remaining -make and -permision_available_camera gets red error. @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[]

Android Marshmallow: permissions change for running app

人盡茶涼 提交于 2019-12-10 14:48:44
问题 I know, with Android Marshmallow, we have to ask permissions every time we need a functionality that require a permission. I do this for new App, but for old BIG App is more complicated. For old BIG App, I ask all permissions in "MainActivity". So, my app is started and shows a Map Fragment. I ask for Location Permission with no problem. The user agrees. The user puts it in background, goes in the App Settings and denies permission. Then he puts the App in foreground: App crashes!! I know,

All the permissions of my app are revoked after pressing “Reset app preferences”

时间秒杀一切 提交于 2019-12-10 14:42:28
问题 I develop an app and support Android 6.0. When I reset app preferences in Settings -> Apps -> Reset app preferences, all permissions of my app are revoked and the app is not restarted. Failure to restart the app after revoking its permissions can cause many unexpected crashes. How should I handle this case? The app is restarted when I revoke its permissions manually (Settings -> Apps -> My app -> Permissions). 回答1: I can reproduce the problem. I have filed an issue in regards to it. How

Basic error in AndroidManifest.xml for SMS receiving permission

≡放荡痞女 提交于 2019-12-10 14:17:22
问题 I know that this has been asked a dozen times before, but I still get the permission error with this xml config. I have scoured the other responses on this. I am using API level 23. Can someone please point out the mistake ? The error is the obvious: 09-12 09:13:40.016 1295-1309/? W/BroadcastQueue﹕ Permission Denial: receiving Intent { act=android.provider.Telephony.SMS_RECEIVED flg=0x8000010 (has extras) } to com.example.richard.simplesmstoast/.SmsReceiver requires android.permission.RECEIVE

My Android app suddenly requires permissions not set in AndroidManifest.xml. Why?

青春壹個敷衍的年華 提交于 2019-12-10 14:05:11
问题 I have an app that have only had minor changes the last couple of years. Yesterday I released a bugfix to Google Play, and noticed that my app suddenly requires 5 new permissions: android.permission.ACCESS_COARSE_LOCATION android.permission.GET_ACCOUNTS android.permission.READ_EXTERNAL_STORAGE maxSdkVersion=18 android.permission.USE_CREDENTIALS android.permission.WRITE_EXTERNAL_STORAGE I have not made any changes to AndroidManifest.xml, so these 5 permissions are not listed there. I'm using

Permission Requests causes infinite loop in OnResume

Deadly 提交于 2019-12-10 13:07:04
问题 In API >= 23, we are required to ask users for permission at run-time. But for some reason, the permissions are causing onResume to be called infinitely. What causes this? @Override protected void onResume() { super.onResume(); ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.ANYPERMISSION},1); } @Override public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { } 回答1: When you show dialog of permission question,

Android Marshmallow Permission for my eclipse project not working

感情迁移 提交于 2019-12-10 12:22:33
问题 I have created an application using eclipse IDE. And now its crashing on Marshmallow for various permissions say contact. After lot of searching I come up with no result. It is showing error in checkSelfPermission , requestPermissions etc. on CONTACT from Manifest.permission.CONTACTS. I think the solutions are working on android studio projects. So let me know same for eclipse project if any one know it. 回答1: Full working demo You are making mistake of here there is no permission like

How to Restart the app in android marshmallow when permission changed manually

天涯浪子 提交于 2019-12-10 12:13:13
问题 I have an android application which was supporting till lollipop. Now I'm migrating it to support Marshmallow. I am stuck in a case where if we manually changed the app permission in marshmallow it kills all the process. I get it as explained by @CommonsWare in similar question here. But in my case I have to kill the app and need to restart the app. Because my app each activity is dependent on previous activity some data is shared. I just need to know when we manually change the permission is

How to receive UDP broadcasts on an Android device

你离开我真会死。 提交于 2019-12-10 11:55:43
问题 How can I make my Android phone receive UDP broadcasts? At the moment i am testing my app using a tablet and a phone. The problem is that only the tablet can work as a server, not the phone. The scenario of my app where the problem is: - Client is sending broadcast in a local network - Server is receiving this broadcast and sending a response to the client directly I am pretty sure I think I know what's wrong as the app only works when the server is running on the tablet and that is that the