Thanks to visit codestin.com
Credit goes to github.com

Skip to content

@nativescript/local-notifications: ANRs due to android.intent.action.LOCKED_BOOT_COMPLETED #262

Closed
NativeScript/android
#1712
@lambourn

Description

@lambourn

In the Google Play Console we have quite some ANRs logged that point to the NotificationRestoreReceiver of this plugin but I do not understand what the issue here is.

This seems to exclusively happen on Honor and Huawei phones (=from the era before HarmonyOS and with Play Store/ Play Services installed obviously)

Only information

Broadcast of Intent { act=android.intent.action.LOCKED_BOOT_COMPLETED flg=0x9000010 cmp=xxx.yyy.zzz/com.telerik.localnotifications.NotificationRestoreReceiver (has extras) }

and nothing much more except native obfuscated traces.

I understand that the AndroidManifest uses the RECEIVE_BOOT_COMPLETED permission

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

and the intent filters on LOCKED_BOOT_COMPLETED and BOOT_COMPLETED

<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />

and finally, in the receiver this line guards for the BOOT_COMPLETED

if (context == null || !Intent.ACTION_BOOT_COMPLETED.equalsIgnoreCase(intent.getAction())) {

looks all good to me. Still we get these ANRs. Any idea why?

Btw, in Eddy's original plugin, there is also an issue related to this, not resolved as well:
EddyVerbruggen/nativescript-local-notifications#186

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions