Thrown when a security manager check fails.
Questions tagged [android-securityexception]
168 questions
4
votes
0 answers
RuntimeException caused due to securityException
I am using this code to create the account. But it throws the security exception. And the account doesn't get created.
public static Account getSyncAccount(Context context) {
AccountManager accountManager =(AccountManager)…

Yogesh Ghaturle
- 307
- 3
- 17
4
votes
0 answers
SecurityException on AccountManager.addAccountExplicitly() for shared android module
I've been following Android's Creating a Sync Adapter (BasicSyncAdapter) to start out my own sync service logic.
The problem: Upon invoking AccountManager.addAccountExplicitly(), a SecurityException is raised, claiming a mismatch between caller and…

scooz
- 828
- 2
- 7
- 24
4
votes
2 answers
Adding new uses-policies to existing device administrator on Android
I have a device admin app that uses the following device-admin.xml
…

lyc001
- 777
- 1
- 10
- 25
3
votes
0 answers
Problems encountered when developing apps with Android 14
I found that after my app reached a fair size (e.g. by adding multiple libraries), running the app threw java.lang.SecurityException: writable dex file '.../code_cache/.overlay/base.apk/classes2.dex' is not allowed.
If I then remove most of the…

Wei Wen
- 133
- 1
- 9
3
votes
1 answer
Permission Denial: Security Exception while sharing file with FileProvider Android 11 phone
I am getting below exception on the Android 11 device but able to share those files in the email without any issue.
Java:Lang:SecurityException: Permission Denial:Reading androidx.core.content.FileProvider.uri…

ketan muttha
- 296
- 2
- 7
3
votes
1 answer
java.lang.SecurityException: Binder invocation to an incorrect interface on Android 6
Recently started getting crashes due to java.lang.SecurityException: Binder invocation to an incorrect interface in our app which only happens on 6.0 and 6.0.1 OS.
The stack trace is pulled from a crash reporting service and could not be replicated…

Ziad Halabi
- 964
- 11
- 31
3
votes
1 answer
Caused by: java.security.NoSuchProviderException: no such provider: Crypto - Android N
Seems like "Crypto" provider has been removed in Android N.
My application crashing because of NoSuchProviderException.
If I change the provider and Algorithm then it will affect user who are all using the app currently. Any one have a idea? …

Ananth
- 115
- 3
- 18
3
votes
1 answer
How to fix apps containing an unsafe implementation of TrustManager
I am trying to make my Android apps comply with Android's new policy of having secure apps per this requirement and instructions.
1) I first added SSL and https to the urls in my app
2) Then I started using the class HttpsURLConnection instead of…

Genadinik
- 18,153
- 63
- 185
- 284
3
votes
1 answer
PickContact requires android.permission.READ_CONTACTS, or grantUriPermission()
Some info first:
I first created the app in Cordova: see Cordova permissions requires android.permission.READ_CONTACTS, or grantUriPermission()
Now i created the app as a native Android app using Android Studio Builder, it has the same error.
I'm…

NicoJuicy
- 3,435
- 4
- 40
- 66
3
votes
0 answers
getting strange SecurityException: READ_SECRET_CONTACTS on Sharp devices
I'm readingcontacts as per the Android documentation
Works ok on all devices, but seems like the app crashes on some or all Sharp Android devices with a SecurityException:
java.lang.SecurityException: Permission Denial: reading…

marmor
- 27,641
- 11
- 107
- 150
3
votes
1 answer
Why do I need the permission READ_CONTACTS to read the call log?
The App is reading the call log. On most devices that is fine, some others get SecurityException for READ_CONTACTS (which I don't have and don't want in my AndroidManifest.xml.
Why is that and can I do something about that? Perhaps through a…

Michael Schmidt
- 1,199
- 4
- 14
- 18
3
votes
1 answer
java.lang.SecurityException-Not allowed to start activity Intent { flg=0x4000000 cmp=[MY_ACTIVITY] (has extras) }
I am getting the following exception when starting my activity.
java.lang.SecurityException-Not allowed to start activity Intent { flg=0x4000000 cmp=[MY_ACTIVITY] (has…

Jane
- 43
- 1
- 4
2
votes
1 answer
NotificationManager.notify() throwing securityException only on android 11 and 12
On my alarm clock app, I have 180 crashes (impacted 42 users) of java.lang.SecurityException caused by NotificationManager.notify().
Since I have around 50K active users I guess it happens only under specific circumstances.
This is how I init my…

Simple UX Apps
- 611
- 2
- 10
- 20
2
votes
1 answer
google play console - zip path traversal error
I've created a simple unity game and i don't use any kind of file or zip file structure in my game.
but google play notice this error:
Zip Path Traversal
Your app contains an unsafe unzipping pattern that may lead to a Path Traversal vulnerability.…

AmirHossein
- 21
- 2
2
votes
2 answers
Why does SHOW_ALARMS need SET_ALARMS permission on GALAXY S21?
Here is my code:-
public void onClick(View v) {
try {
startActivity(new Intent(
"android.intent.action.SHOW_ALARMS"));
} catch…

Richard Parkins
- 347
- 2
- 13