android-securityexception

Music Player asking for Write External Storage Permission?

风流意气都作罢 提交于 2019-12-05 10:52:08
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: /storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/1460104607336: Neither user 10294 nor current process has android.permission.WRITE_EXTERNAL_STORAGE. at android.os.Parcel.readException(Parcel.java:1555) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) at android.database.DatabaseUtils

Caused by: java.security.NoSuchProviderException: no such provider: Crypto - Android N [duplicate]

孤人 提交于 2019-12-01 21:35:24
This question already has an answer here: SecureRandom provider “Crypto” unavailable in Android N for deterministially generating a key 3 answers 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? KeyGenerator kGen = KeyGenerator.getInstance(KEY_GENERATOR_ALGORITHM); SecureRandom sr = SecureRandom.getInstance(STR_SHA1PRNG, **CRYPTO**); sr.setSeed(seed); kGen.init(128, sr); SecretKey sKey = kGen.generateKey

Send email through Intent : SecurityException

情到浓时终转凉″ 提交于 2019-12-01 07:40:14
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"); emailIntent.setType("text/html"); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Puzzle"); emailIntent.putExtra(Intent.EXTRA_TEXT, someTextHere)); emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(attachmentFile)); try { startActivityForResult(emailIntent, SHARE_PUZZLE_REQUEST_CODE); } catch (ActivityNotFoundException e) { showToast("No application found on this device to perform share action");

java.lang.SecurityException: Permission Denial: starting Intent {act=android.settings.USAGE_ACCESS_SETTINGS}

我们两清 提交于 2019-11-29 17:05:51
I get java.lang.SecurityException when try to startActivityForResult(intent, requestCode); with final Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS); intent. Interesting that this crash happens only on Huawei with Android 5.1 - 5.1.1 I haven't Huawei device. Could you please give me advice what it can be. Stacktrace Fatal Exception: java.lang.SecurityException: Permission Denial: starting Intent { act=android.settings.USAGE_ACCESS_SETTINGS cmp=com.android.settings/.Settings$UsageAccessSettingsActivity } from ProcessRecord{11b5f1a1 19764:com.myproject.my/u0a167} (pid=19764,

java.lang.SecurityException: Permission Denial: starting Intent {act=android.settings.USAGE_ACCESS_SETTINGS}

我的未来我决定 提交于 2019-11-28 10:38:39
问题 I get java.lang.SecurityException when try to startActivityForResult(intent, requestCode); with final Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS); intent. Interesting that this crash happens only on Huawei with Android 5.1 - 5.1.1 I haven't Huawei device. Could you please give me advice what it can be. Stacktrace Fatal Exception: java.lang.SecurityException: Permission Denial: starting Intent { act=android.settings.USAGE_ACCESS_SETTINGS cmp=com.android.settings/.Settings

Android: Permission Denial: starting Intent with revoked permission android.permission.CAMERA

*爱你&永不变心* 提交于 2019-11-26 09:47:08
问题 I\'m trying to start a ACTION_IMAGE_CAPTURE activity in order to take a picture in my app and I\'m getting the error in the subject. Stacktrace: FATAL EXCEPTION: main Process: il.ac.shenkar.david.todolistex2, PID: 3293 java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE cmp=com.google.android.GoogleCamera/com.android.camera.CaptureActivity } from ProcessRecord{22b0eb2 3293:il.ac.shenkar.david.todolistex2/u0a126} (pid=3293, uid=10126) with