Thrown when a security manager check fails.
Questions tagged [android-securityexception]
168 questions
6
votes
3 answers
Invalid activities specified in the ActivityTransitionRequest
I'm trying to use ActivityRecognition. However I get an error when i'm trying to get a transition update for DetectedActivity.TILTING or DetectedActivity.UNKNOWN. For all the other activity types I don't have problems.
Here is my code to create the…

Wirling
- 4,810
- 3
- 48
- 78
6
votes
1 answer
Granting uri permissions for FileProvider gives SecurityException
I have 2 apps - Demo and Pro. Demo has a content provider and when Pro is installed it needs to transfer all files from the demo provider.
Demo app (provider):

WindRider
- 11,958
- 6
- 50
- 57
5
votes
0 answers
"SecurityException: Permission Denial" when opening a calendar Intent
Background
In order to go to the calendar at a specific time, we use this (based on this link) :
@Nullable
public static Intent prepareIntentForCalendar(final Context context, final Date date) {
Intent intent = null;
final Uri.Builder…

android developer
- 114,585
- 152
- 739
- 1,270
5
votes
1 answer
SecurityException in google play services?
Fatal Exception: java.lang.SecurityException: Unknown calling package name 'com.my.package.name'.
at android.os.Parcel.readException(Parcel.java:1546)
at android.os.Parcel.readException(Parcel.java:1499)
at…

albeee
- 1,452
- 1
- 12
- 20
5
votes
2 answers
Send email through Intent : SecurityException
Here is how I'm sending email through Gmail App.
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail");
…

Santhosh
- 4,956
- 12
- 62
- 90
5
votes
0 answers
Android PdfRenderer throws SecurityException - cannot create document with error 4
I'm trying to render some pages using PdfRenderer android api. Some of my users started seeing this error:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1337, result=-1, data=Intent {…

John Smith
- 844
- 8
- 26
5
votes
1 answer
SecurityException: No persistable permission grants found for uri from ACTION_IMAGE_CAPTURE
My app use camera to take a photo and use it for long term.
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri resultUri = null;
resultUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
new…

Mingwei Lin
- 140
- 1
- 10
5
votes
4 answers
Music Player asking for Write External Storage Permission?
I'm creating a music player application in Android. It works fine but whenever I scroll in songs list it starts crashing and gives this exception
Process: com.example.lenovo.musicplayer, PID: 31100
java.lang.SecurityException: External path:…

Vivek Mishra
- 5,669
- 9
- 46
- 84
4
votes
2 answers
Android SecurityException accesing content
I've developed an Android app that reads a file from the device, copies it into the app's internal storage and analyzes it.
It has been working OK for almost 100% of my users/devices, but since a couple of months ago, for some specific users/devices…

Wonton
- 1,033
- 16
- 33
4
votes
1 answer
Monkey throwing security exception even though they are disabled
He everyone, I am getting this exception
java.lang.SecurityException: Permission Denial: android.intent.action.CLOSE_SYSTEM_DIALOGS
and Im not sure where its coming from as the app im testing doesnt use…

JRowan
- 6,824
- 8
- 40
- 59
4
votes
1 answer
java.lang.SecurityException: Permission Denial: opening provider com.estrongs.android.pop.app.FileContentProvider
Caused by java.lang.SecurityException: Permission Denial: opening provider com.estrongs.android.pop.app.FileContentProvider from ProcessRecord{341eeb8 5431:xx.xxxx.xxxx/u0a289} (pid=5431, uid=10289) that is not exported from uid 10188
at…

Maulik Santoki
- 532
- 4
- 14
4
votes
1 answer
SecurityException with PdfRenderer, comes with password protected pdfs, and than repeats even with normal pdfs
If trying to open Password Protected PDF with PdfRenderer API, gives SecurityException and handled accordingly, inside catch block and thenonDestroy basic clean up is done, and comes back to home activity and then navigating a simple non-protected…

ByteCountTim
- 66
- 7
4
votes
3 answers
Lock or turn off the screen programmatically
I want to turn off / lock the screen of my device programmatically.
For the moment, when I try :
DevicePolicyManager mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
mDPM.lockNow();
I have this error…

Jéwôm'
- 3,753
- 5
- 40
- 73
4
votes
3 answers
Fatal Exception: java.lang.SecurityException: Missing permission to insert badges
I am new in Android development, I am facing below exception on some of the device after publishing it on play store. It is completly unknown exception for me. This exception force stop/crash my application.
Complete stacktrace logged:
Exception…

Ankit Kumar Singh
- 240
- 1
- 6
- 18
4
votes
1 answer
Security Exception: android.permission.INTERACT_ACROSS_USERS
Just faced this exception under my application PID in the Android Monitor, while not doing anything special. First time I'm seeing such thing, any explanation/docs? Thanks
java.lang.SecurityException: Permission Denial:
broadcast from…

Evgeniy Mishustin
- 3,343
- 3
- 42
- 81