android-permissions

Android 8 requires READ_PHONE_STATE when calling SmsManager.sendTextMessage()

蓝咒 提交于 2019-12-18 11:47:19
问题 My application can't send sms on new android 8 update. I get error that I don't have READ_PHONE_STATE permission. java.lang.SecurityException: Neither user 10179 nor current process has android.permission.READ_PHONE_STATE. at android.os.Parcel.readException(Parcel.java:1942) at android.os.Parcel.readException(Parcel.java:1888) at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:789) at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:329) at

Call requires API level 23 (current min is 14): android.app.Activity#requestPermissions,checkSelfPermission [duplicate]

孤街浪徒 提交于 2019-12-18 10:52:11
问题 This question already has answers here : The method checkSelfPermission(Context, String) is undefined for the type ContextCompat (3 answers) Closed 3 years ago . I am trying add run time permissions android(6.0.1) API 23,If I use SDK version( min and target version both 23 ) it woks fine, like below, <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" /> If I change android:minSdkVersion(less then 23) For example: I am getting error below: Call requires API level 23 (current

Permisssion denied while attaching apk file with GMail app android

南笙酒味 提交于 2019-12-18 09:48:06
问题 I have a requirement to send a apk file through share Intent and I have also implemented without any hassle. But the problem arises only while sending apk via GMail, I am getting permission denied while i try to attach. I really dont know what is happening with GMail. Kindly help me through your answers and solutions. Any Small hint and tips would also be useful for me. Thanks in advance I am using following code to send APK using shared intents: public static void appSend(ArrayList<File>

How to correctly fill the permission declaration form in the google play console?

China☆狼群 提交于 2019-12-18 09:18:24
问题 I have one application which used to be taking sensitive SMS permissions. But I removed them and tried to upload a new APK without those permissions. But when submitting the app we are required to choose at least one of the options from the list. But am clear that we do not have to choose any of the below options. Is there any ways to override the permission declaration form as I'm not able to find the option "I don't use any of the options above". Here is the list of permissions. If anyone

Access external storage in File Chooser

怎甘沉沦 提交于 2019-12-18 07:13:04
问题 I am trying to implement a File Chooser. I am using Android File Explore for file chooser in my app. When I run the app, it shows me Internal storage and returns me the file path, but it doesn't show External Storage at all. This is my AndroidManifest.xml file. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unicloud.mittal" > <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name=

The method checkSelfPermission(Context, String) is undefined for the type ContextCompat

淺唱寂寞╮ 提交于 2019-12-18 06:49:30
问题 Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Context context = (Permission) this; // In an actual app, you'd want to request a permission when the user // performs an action // that requires that permission. if (Build.VERSION.SDK_INT >= 23) { getPermissionToReadUserContacts(); } } // Identifier for the permission request private static final int READ_CONTACTS_PERMISSIONS_REQUEST = 1;

Can't answer incoming call in android marshmallow 6.0

荒凉一梦 提交于 2019-12-18 04:36:06
问题 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()

Neither user nor current process has android.permission.ACCESS_COARSE_LOCATION

不问归期 提交于 2019-12-18 03:57:23
问题 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

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

血红的双手。 提交于 2019-12-18 03:55:01
问题 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? 回答1: This is expected

java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EACCES (Permission denied)

你。 提交于 2019-12-17 22:36:34
问题 I've been trying to encrypt files and write those files back on to the same place. But I got the error message saying "java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EACCES (Permission denied)". My Manifest file is this <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tdk.mytestapplication2"> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE