SamsungBadger doesn't work on Nougat - android

i have a problem with samsungBadger library, https://github.com/shafty023/SamsungBadger
i get the following error on nougat:
Writing exception to parcel
java.lang.SecurityException: Permission Denial: writing com.sec.android.provider.badge.BadgeProvider uri content://com.sec.badge/apps from pid=15661, uid=10234 requires com.sec.android.provider.badge.permission.WRITE, or grantUriPermission()
at android.content.ContentProvider.enforceWritePermissionInner(ContentProvider.java:689)
at android.content.ContentProvider$Transport.enforceWritePermission(ContentProvider.java:501)
at android.content.ContentProvider$Transport.insert(ContentProvider.java:263)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:163)
at android.os.Binder.execTransact(Binder.java:573)
I tested this library with android 6.0 and work properly.
Can someone help me to fix this problem?
It'is very strange that android does not provide any native method to add badge on icon.
Thanks,
Sebastiano lazzaro

Related

is RCS permission in Android still signature level in 2020 ? (samsung/google)

I'm trying read text message from Android RCS Message Apps (Google / Samsung)
What I was trying
set permission concerned with rcs
com.samsung.rcs.im.READ_PERMISSION (samsung galaxy series)
com.gsma.rcs.permission.RCS (google)
But, I got this exception.
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.sec.internal.tapi.service.provider.HistoryLogProvider from ProcessRecord{e7c133 3845:com.gilapps.rcstest/u0a240} (pid=3845, uid=10240) requires com.gsma.services.permission.RCS or com.sec.imsservice.WRITE_IMS_PERMISSION
I'm guessing that maybe permission with RCS is still signature level permission.
Am I Right?

unexpected error while setting a ringtone

I'm trying to set a ringtone with my app. For that I need to write a sound in the external memory of the phone. But every time I try to do it I get this error :
FATAL EXCEPTION: main
Process: com.mtoy.tiboxinshape, PID: 26322
java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=26322, uid=10211 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1620)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
at android.content.ContentResolver.insert(ContentResolver.java:1231)
at com.mtoy.tiboxinshape.SoundAdaptateur$2.onLongClick(SoundAdaptateur.java:142)
at android.view.View.performLongClick(View.java:5243)
at android.view.View$CheckForLongPress.run(View.java:21127)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I don't understand why I still have this error as I have the following line in my manifest.xml :
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Do you have an idea of what I can do to avoid having this error ?
Android changed permission accept in Latest 23 API level,In This Process Some permission that will be automatically granted at install time those are available for mention in Manifest ,Remaining Permission's Are Accept's in RunTime , Because So many bad guys trying to collect user's personal data through this security weakness So Android Change's to Runtime Permission
For More Information About Runtime Permission's And Process Of Runtime Permisson Accept
Fallow Below Link
Every Android Developer must know about new Android's Runtime Permission
Here is the solution I found :
https://developer.android.com/training/permissions/requesting.html

Cann't play/preview the audio content which filename include emotion icon

============
Download a audio content(MP3) from website See you again.mp3 and rename to
See you again.mp3
See you again.mp3 Can play/preview mp3 with GooglePlay BUT
See you again.mp3 can NOT be played/previewed with GooglePlay,a Permission Denial was thrown like below:
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media/40 from pid=1532, uid=1000 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
Could anyone help me to answer my doubts --> Why Android throw the Permission Denial
PS: LG Nexus still exist this issue

Permission Denial: this requires android.permission.INTERACT_ACROSS_USERS_FULL

I am having an issue with sqlite db in Android. But as I made a quick research on the internet, I suspect that the problem is not related to sqlite but system user. My app is not recognized as authorized user to access db functionalities. I tried to apply possible suggested solutions in stack overflow but none of them made a difference. This is the LogCat I am facing every time I attempt to use db functionality.
12-14 02:35:17.721 2953-3355/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13082)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:577)
at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
at android.os.Binder.execTransact(Binder.java:388)
at dalvik.system.NativeStart.run(Native Method)
I tried to add permission
android.permission.INTERACT_ACROSS_USERS_FULL
but still no sound. The strange thing is when I try to add INTERNET permission Android Studio 0.3 (ide I use) suggests me possible permissions I can choose. But when it comes to INTERACT_ACROSS_USERS_FULL permission it behaves like it has no idea about this permission. My test device is Samsung S4 running on 4.3.
I assume that I am not the only one who tries to use db on android. So there is a solution.
How can I really add INTERACT_ACROSS_USERS_FULL permission to my application?
According to this answer: android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
Which is not something you can achieve unless you either are the creator or the system build, or collaborating with them such that they are willing to sign your apk with their certificate. In other words, this is off limits for most developers.
I got the error android.permission.INTERACT_ACROSS_USERS_FULL because I had some conflicts in the bin directory of the project. I did some changes to the my app package id and the app-file-1.apk in the bin directory doesn't match with the project.
I did a project > clean and checked that the bin folder was cleared and regenerated, and it works now.
I had the same issue and think that I can help you out. I had registered my app with my production keystore, but was using Eclipse debug to load it into my phone. The Eclipse debug uses debug.keystore which wont match the signature of your production key and throw this error. Use the debug keystore instead for testing or send the apk to yourself and download it onto your phone.
I get this error when I change my minSdkVersion from 8 to 11 in my Manifest. I changed it back to 8 or 9 and no more error.
Try changing your minSdkVersion in your manifest. I was able to repeat the crash and error results with versions 10, 11, and 12 (my app crashes and displays "requires android.permission.INTERACT_ACROSS_USERS_FULL" in the LogCat)
Try to disable auto-fill. It works 100% on Android Oreo. Check this link
Simply add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}

What do I do about: this requires android.permission.INTERACT_ACROSS_USERS_FULL

I am working on integrating micode's open source compass into an app I am making. I am wondering how I can fix this here permission error when I clearly have it stated in my manifest with the correct spelling. Its still coming up that I need that permission.
This is puzzling me...
11-03 13:53:58.241: E/AndroidRuntime(8975): Caused by: \
java.lang.SecurityException: Permission Denial: registerReceiver from \
net.micode.compass asks to run as user -1 but is calling from user 0; this \
requires android.permission.INTERACT_ACROSS_USERS_FULL
android.permission.INTERACT_ACROSS_USERS_FULL is a signature level permission. Your app will not be able to use it until and unless it has the same signature as the system.
I had a same problem and i did project -> clean. It works now.
I know there is already an accepted answer but for some reason its not working (or no longer working) on my part.
This error happened to me on Android SDK version 19 and lower, because of NDK that was part of my app.
I just deleted few codes that are connected with NDK codes at the Android Manifests file.
I disabled autofill and project started to work normally. Check this link
Just add this code to your app :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.decorView.importantForAutofill =
View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS;
}

Categories

Resources