Questions tagged [android-permissions]

1

votes
3

answer
31

Views

Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag? nabinbhandari/Android-Permissions library

While using nabinbhandari/Android-Permissions library: Link Getting error when I'm running app on Android device API Level > 20 It's non-activity class. MainApp.getmContext() return the Application context: String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS...
Ali Azaz Alam
1

votes
0

answer
24

Views

when i try to install my apk its doesn't show the list of permission

I created an apk using the android studio and it is working successfully but when the time of installing it shows 'It does not require any special access' but in the manifest, there is PROCESS_OUTGOING_CALL
1

votes
2

answer
1.4k

Views

Exception java.lang.SecurityException: reading ..MediaDocumentsProvider … requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()

I found this issue only in some devices when trying to pick the picture for the profile image. While checking in the emulator these issue are not seen but on live version of the app this issues are facing by this users. Screenshot captured from the firebase crash report. Please help me to figure out...
jazzbpn
1

votes
1

answer
865

Views

Why is the checkSelfPermission method missing?

My client requested to test their APK. I installed that app my Android 6 and Android 4. But it crashed when it started. Error java.lang.NoSuchMethodError: android.support.v4.app.ActivityCompat.checkSelfPermission Implementation if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_...
shinjukujohnny
1

votes
1

answer
157

Views

Multiple APK signing - signature protectionLevel behavior

Suppose the following situation: I have 2 apps: A1 & A2. A1 defines a signature level permission, lets say 'com.example.myapp.PERMISSION'. A2 claims the permission defined by A1. I have 2 signing keys: K1 & K2. A1 is signed with both K1 & K2. A2 is signed with only K1. If A1 exposes a service that i...
loogie82
1

votes
2

answer
42

Views

Android: preventing only a single activity from accessing internet

Android apps declare what permissions they need to work, so the user is informed. Let's say my Android app declares internet permission but it just uses internet access in a single activity and wants to prevent another activity from accessing the internet instead. Let's say the activity that is not...
P5music
1

votes
1

answer
316

Views

Android SnappyDB dangerous permissions

I'm updating app to android targetSdk = 23 and now working on permission requests. Do I need to get some some of dangerous permission for the snappyDB library (it uses kryo library inside)? I mean exactly this permissions: READ_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE Thank you!
Kirill Vashilo
1

votes
4

answer
1.2k

Views

Caused by: java.lang.SecurityException:android.permission.READ_PHONE_STATE

I am trying support my app android M?I have some permission need to ask explicitly at run time.I am was able access other permissions at run time but 'android.permission.READ_PHONE_STATE' causing SecurityException. Here is my manifest file:
Joe
1

votes
1

answer
669

Views

Android Marshmallow - Why dangerous permission is granted without asking user

My SMS App uses several dangerous permissions like Send SMS, Read Contacts etc and I am trying to test new permission system for android 6.0 But when I install it on Android 6.0 device, it has already granted those permissions without asking at run time. Why is this? I have uninstalled and installed...
Riz
1

votes
2

answer
685

Views

Permission denial when calling from Android fragment. Uses-permission IS set

I got a little problem here and it is driving me crazy. I want to call a person with the ACTION_CALL intent in Android and I do it with the following code in a fragment: Intent callIntent = new Intent(Intent.ACTION_CALL); Ansat a = container.adapter.getItem(position); callIntent.setData(Uri.parse('t...
MartinMojito
1

votes
1

answer
2.2k

Views

How to fetch txt file from whatsapp fileprovider

I trying to get whatsapp chat txt file. As i saw on Android documentation: private void handleSentMultipleAttached(Intent intent) { ArrayList attachedFilesUris = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM); if (attachedFilesUris != null) { for (Uri uri : attachedFilesUris) { File f = new...
motis10
1

votes
1

answer
886

Views

Android M Error on api 22, and requestPermissions() method not found

I'm working in API 22, but I want to compile my project in Android M 6.0, I have this code: Declared at the top: private static final String[] REQUIRED_PERMISSIONS = new String[]{'READ_EXTERNAL_STORAGE'}; private static final int REQUEST_PERMISSIONS = (Integer) null; And on my onCreate(): if(Build.V...
Jose
1

votes
2

answer
755

Views

File not found exception when reading external storage

Earlier the code was working totally fine, and even now it works fine for pre Android 6 devices, but in my Nexus 5, 6.0.1, I am unable to access data from external storage. It shows File not Found Exception java.io.FileNotFoundException: /storage/emulated/0/Download/********/*****: open failed: ENOE...
frgr
1

votes
1

answer
827

Views

Android Studio add some permissions automatically?

I have a weird question. I built my app on Android Studio. There is no problem however something take my attention. Even I didn't add WAKE_LOCK permission or related code, built apk contains WAKE_LOCK permission. I check manifest, gradle, java, xml... There is no code related with WAKE_LOCK. I suppo...
Aykut Uludağ
1

votes
2

answer
693

Views

Android API 19 and up. Write to microSD card (external sdcard)

Some Android devices have microSD (or other memory card) slot, usually mounted as /storage/sdcard1 AFAIK since Android 4.4 Google restricted access to this memory, and re-enabled it in Android 5.0 using Storage Access Framework (SAF). My question is how to gain write permission to this storage in AP...
1

votes
1

answer
556

Views

Android6.0 WifiManager.getScanResults()

The size of list is 0, which is the return of WifiManager.getScanResults() in Android6.0 I had given the permission(ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION) to him, but the size of list is still 0. I sure the app has these permission in my phone Setting -> Apps. Do you know the reson? Any So...
DNwalter
1

votes
2

answer
185

Views

Can i give dangerous permissions from settings?

so far I've run the situation on a rooted device and an emulator. I can't find clear information on whether i can run my application without writing code to handle runtime permissions. On Android M, you can go to settings/app/yourapp/permissions. There i can see permission on phone, which upon inspe...
Liquid Penguin
1

votes
1

answer
1.3k

Views

Android API 23 Requesting Multiple Permissions

I am trying to request permissions on my Launcher Activity. For API < 23, it works perfect. However, when I test the app on a device running API 23, it says: 'PostPaid Balance has stopped.' I hit the 'close App button,' the app closes and immediately asks for one permission. I hit accept. Then I tap...
Gerardo Soriano
1

votes
2

answer
761

Views

Android permission : android.permission.INTERACT_ACROSS_USERS_FULL

I am trying to execute a system command to open a terminal(using am instruction) from eclipse. The below is my c++ code from eclipse (used through JNI): JNIEXPORT jstring JNICALL Java_com_example_vulnapp_NewActivity_stringFromJNICPP(JNIEnv * env, jobject obj) { LOGI('sys cmd:%x', system); system('am...
Akshaya
1

votes
1

answer
45

Views

Android - Does requesting permission to write external storage make devices incompatible in the Play Store that do not have external storage options?

If an application uses permission WRITE_EXTERNAL_STORAGE will devices that do not have an external storage option, such as an sd card, be listed as incompatible once the application is uploaded to the Google Play Store? We have a user with a Nexus 7 (2012) who sees our application as being incompati...
Garrett
1

votes
1

answer
514

Views

Request permission for another application

I have an application, that has only a service (no UI at all). Other applications can use this service, but service requires permission to run. Is it possible to request permission from one application for another (so application, that uses service, can request permission). Or the only way to suppo...
Artyom
1

votes
2

answer
1.4k

Views

Failed to create directory in Android (on MarshMallow and above) devices

I am trying to create a folder on my sdcard using the following code but it fails. This is my code written in onCreate(): File test = new File(Environment.getExternalStorageDirectory(),'my_directory'); if(!test.exists()) { try { if (test.mkdir()) { Log.d('xxx', 'directory created'); } else { Log...
Parag Kadam
1

votes
1

answer
1.2k

Views

Can't write file on SD-card

I'm trying to write a photo on the SD card without success. I've got the permissions to write in the removable storage and the sd card is mounted. Also, I checked that the path to the SD card exists and I have obtained a positive result. Where it fails is when I use the mkdir() function. It re...
Marco Menardi
1

votes
1

answer
1k

Views

What is the difference between RECEIVE_MMS nad RECEIVE_WAP_PUSH?

What is the difference between RECEIVE_MMS and RECEIVE_WAP_PUSH?
smok95
1

votes
1

answer
198

Views

IllegalStateException after revoking permissions

After the user revokes a permission in settings, and is brought back from the background, my app crashes with IllegalStateException: Can not perform this action after onSaveInstanceState. I see that the OS tries to recreate the fragment stack from the background (restarting the app will not result i...
galaxigirl
1

votes
2

answer
1.9k

Views

Android permission dialog not showing in Xamarin.Forms

I am developing a Xamarin.Forms app using the microphone. My app uses Android 7.1 (Nougat) on a Huawei P9-Phone. My android manifest includes: Still the permission dialog is not showing if i try to use the microphone. I can set the permission manually in the phone settings (the app works if i do so)...
1

votes
3

answer
799

Views

Automatically grant ACTION_MANAGE_OVERLAY_PERMISSION via setPermissionGrantState or similar

I'm trying to grant some runtime permissions to my app automatically, these include ACCESS_FINE_LOCATION, READ_PHONE_STATE as well as ACTION_MANAGE_OVERLAY_PERMISSION. Do note that this requires at least Device Administrator access rights, which I have. While the first two work flawlessly via dpm.s...
Syzygy
1

votes
1

answer
2.8k

Views

Android: the app crashes if I run it on a device with API 24 or 25 (Nougat)

I'm a novice Android developer experiencing some difficulties in cross-version support: I'm developing an app (the name is RECIPE) with minimum SDK version requirement of 21 (from Lollipop and on). For now the app has just few features: it switches activities via intents, open the camera by sending...
1

votes
3

answer
375

Views

FileNotFoundException(permission) when trying to write string from web to file

i am trying to build an application that downloads files (e.g. '.jpg', '.txt') from the web when given a url. its not really meant to be a real world application, more just an exercise to help me become more comfortable with network and io based code. for now i am just pulling the bytes from the url...
Mox_z
1

votes
2

answer
141

Views

How to resolve ActivityNotFoundException in my code when using implicit intents?

MainActivity.java public class MainActivity extends AppCompatActivity { EditText edit; Button btn; boolean b = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); edit = (EditText) findViewById(R.id.phone);...
1

votes
1

answer
4.7k

Views

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

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 an...
Arjun Thakuri
1

votes
2

answer
1.1k

Views

Can't create folder and file

I'm trying to create folder in internal storage of the device, and have some problems with that. I can't create directory using : String rootPath=Environment.getExternalStorageDirectory().getPath()+'/test'; File file=new File(rootPath); if(!file.exists()){ file.mkdir(); } file.mkdir return false I h...
MDobroch
1

votes
1

answer
880

Views

Send sms without user permission in Android API version > 6.0 (API 23)

I searched for a week to find a ways to send sms without user allow/deny permission request in android version above 6. Most of the tutorials says that create a dialog and explain why u need permission and some of them says make explode. I created an app in react native which send sms without any pe...
Sandro
1

votes
2

answer
66

Views

App will crashed in samsung SM-P585 device Version 6.0 marshmallow

Hi my application is working fine with all device but its giving error only on samsung SM-P585 device.i mentioned below error report please help... here is gradle file apply plugin:'com.android.application' android { compileSdkVersion 25 buildToolsVersion '25.0.0' defaultConfig {...
androidnewbee
1

votes
1

answer
627

Views

What's role of Device-File-Explorer in Android-Studio

Android Studio 3.0 has a feature about Device-File-Explorer which can help us view files on Android device. it's exciting for non-rooted devices.I know Android Studio actually uses such as adb exec-out run-as command to extract files. Here is a capture: As you see, there is a column called Permissio...
CoXier
1

votes
1

answer
298

Views

install failed due duplicate permission

UPDATE Thanks for the help guys, I made a mistake and I thought I have to have SCREEN_OFF permission in order to receive that intent. After I removed from the manifest, everything was fine. Thanks anyway! ORIGINAL POST: So I have the following error message when I am trying to install the release ve...
Karoly
1

votes
1

answer
527

Views

onRequestPermissionsResult does not get called in a non-Activity and non-Fragment class

In my non-Activity class i requested for a Fine location permission but the call back onRequestPermissionsResult 'never gets called' .now i have seen some questions related to this but they all considered that request is being made from an Activity or the fragment, non of them considered making a re...
Asim Khan
1

votes
2

answer
131

Views

Can't upload APK file to google play because it's using restricted APIs

When I try to upload an APK file to google play I get the following error: I can't find any source talking about this error.
Jason Bourne
1

votes
1

answer
287

Views

Android - and get permission WRITE_SETTINGS?!

I have problems with getting permission and I cant seem to understand as to why I don't get the permission to change the screen brightness. My manifest looks like this: And in my activity it looks like this: public void changeScreenBrightness(float brightness) { mBrightness = brightness; if(Settin...
1

votes
1

answer
252

Views

how to restart a non-rooted device?

After reading a lot of answers at SO and the android docs, it seems to be impossible to restart a device without root permission. The app doesn't even ask me if I'd like to grand the permission. // 1. Use permission in Manifest // 2. Request permission in MainActivity if (ContextCompat.checkSelfPerm...
Mr. B.

View additional questions