logo
down
shadow

How to fix Xiaomi specific RemoteServiceException with notification icon?


How to fix Xiaomi specific RemoteServiceException with notification icon?

By : user2173032
Date : October 22 2020, 08:10 AM
around this issue I have same problem as a user. I believe it's caused by following code -- decompiled from an APK I have no source code, it's from shortcutbadger
ResolveInfo.getIconResource() returned an invalid resource ID(0x7f0200ad, same across all apps and looks like it's only on MIUI10) thus the crash.
code :
iget-object v1, p0, Lme/leolin/shortcutbadger/impl/XiaomiHomeBadger;->a:Landroid/content/pm/ResolveInfo;

invoke-virtual/range {v1 .. v1}, Landroid/content/pm/ResolveInfo;->getIconResource()I

move-result v1

invoke-virtual {p1, v1}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder;
builder.setSmallIcon(R.drawable.myicon);
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private void tryNewMiuiBadge(Context context, int badgeCount) throws ShortcutBadgeException {
if (resolveInfo == null) {
    Intent intent = new Intent(Intent.ACTION_MAIN);
    intent.addCategory(Intent.CATEGORY_HOME);
    resolveInfo = context.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
}

if (resolveInfo != null) {
    NotificationManager mNotificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    Notification.Builder builder = new Notification.Builder(context)
            .setContentTitle("")
            .setContentText("")
            .setSmallIcon(resolveInfo.getIconResource());
    Notification notification = builder.build();
<public type="drawable" name="icon_launcher" id="0x7f0200ad" />


Share : facebook icon twitter icon
Getting android.app.RemoteServiceException: Bad notification posted from package in custom notification

Getting android.app.RemoteServiceException: Bad notification posted from package in custom notification


By : BooRadley
Date : March 29 2020, 07:55 AM
This might help you Eventhough "setEnabled" function has the @RemotableViewMethod tag in the base class (View.java). This is being overridden in the derived class and doesn't have the @RemotableViewMethod tag. We have to check the tag of the child class if its being overridden.
android notification - RemoteServiceException

android notification - RemoteServiceException


By : Alwe Awie
Date : March 29 2020, 07:55 AM
may help you . I am getting RemoteServiceException. This occurs if I simply call the following in onResume() of the activity : , add this line in your code
code :
notif.setSmallIcon(R.drawable.alarm);
How to fix: android.app.RemoteServiceException: Bad notification posted from package *: Couldn't create icon: StatusBarI

How to fix: android.app.RemoteServiceException: Bad notification posted from package *: Couldn't create icon: StatusBarI


By : user2268822
Date : March 29 2020, 07:55 AM
Any of those help What was happening was, I was including the integer reference to the icon in the PendingIntent bundle, and that integer was later being referenced while being posted to the NotificationManager.
In between getting the integer reference and the pending intent going off, the app was updated and all of the drawable references changed. The integer that used to reference the correct drawable now referenced either the incorrect drawable or none at all (none at all - causing this crash)
RemoteServiceException: Bad notification for statForeground - no notifications in app

RemoteServiceException: Bad notification for statForeground - no notifications in app


By : user1449300
Date : March 29 2020, 07:55 AM
wish helps you I have encountered a strange error. For some time this crash has been popping up in my Fabric ,
Could this be a problem from some external library I use ?
android.app.RemoteServiceException Bad notification posted

android.app.RemoteServiceException Bad notification posted


By : NRao
Date : March 29 2020, 07:55 AM
this one helps. I had the same issuee when I used notification icons in .webp Be sure that you use icons in .png for devices with KitKat and below.
Related Posts Related Posts :
  • How to employ keyed-hash message authentication code (HMAC) with Android Keystore
  • Prevent inviting existing users or previously invited
  • How to overwrite windowSoftInputMode using edit-config tag in cordova
  • Difference between Loader and AsyncTask
  • In Firebase Android, retrieve the value of a child node and save it in a boolean variable
  • when i scroll the custom list in my android app then the favorite icon which is part of the custom adapter changes on it
  • adding room dependency gives manifest merge error
  • Visibility of RelativeLayout change on scrolling Gridview
  • Strange LiveData behavior vs ObservableField
  • Which layout is used for clash of clans home screen? We can scroll it horizontal as well as vertical. Please illuminate
  • RxJava: Know when observable is finished and return Boolean Observable to the caller
  • how to use savedInstanceState to save camera information when the orientation change occure
  • Style React-Native via Styles.xml
  • Keyboard won't show after calling InputMethodManager.showSoftInput
  • Compiling ffmpeg for Android on OSX
  • Button does not get clicked on the first attempt
  • AR Core performance, learning curve and comparison with other frameworks
  • Codename one : Attaching images to email message fails
  • Error: Unsupported type 'viewItem' in Android build
  • setLayoutParams on ConstraintLayout does not change size
  • How to profile the fetch time of the android gradle libraries
  • Kotlin setOnclickListener
  • Naming convention for methods returning RxJava's Completable
  • Conv3D not working
  • FFmpeg audio video merge command
  • Do you have to use gradle-experimental for JNI?
  • How to get key hashes for facebook for facebook app?
  • ZXing not calling onActivityResult, When scanning QR Code
  • Integration of Android Native module with existing Xamarin Native Project
  • Restore RecyclerView state after rotating
  • ViewModelProviders java.lang.RuntimeException trying to instantiate class which inherit AndroidViewModel
  • SKD19 vs SDK24 - Usage of API documented as @since 1.8+
  • filter option in list view fragment activity
  • Picture from camera not showing up in second activity
  • How to change imageview according to screen size
  • How to copy Android Studio project to remote Git (NOT GitHub) server
  • How to get React-Native to announce specific accessibility message via AccessibiliyManager?
  • Change colors of com.tech.freak.wizardpager.ui.StepPagerStrip
  • Android fullscreen activity shows ActionBar
  • Turn on the screen when timer calls onFinish()
  • Would like a bit of clarification with SQLite database's onUpgrade method
  • Use ObjectBox with Libgdx
  • How to make combine Gregorian and Hijri calendar in Android?
  • Try to read text file from sdcard in other language
  • "App not installed" message when installed apk
  • How to execute a designated test suite class in Firebase Test Lab
  • play music with background service
  • background not visible on LG G3
  • should every View have an id?
  • Realm object server sync on low connection.
  • Correct way to add more views to adapter
  • Getting error in android support library
  • Instant app zip uploading error
  • "No emulator installed" error in Android Studio even though Intel HAXM is up and running
  • AsyncTask without leaks
  • SQLiteException : No such table found whereas a table was created
  • Using @Component.Builder with constructor params
  • No injector was found for fragment dagger 2.11
  • Android Volley Https SSL self signed and Google Maps API
  • Why does the onClickListener not work anymore in this example?
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org