I have upgraded my app to support SDK 26 and now Google Analytics causes crashes when running on Android Oreo:
Fatal Exception: java.lang.RuntimeException: Unable to start receiver
com.google.android.gms.analytics.AnalyticsReceiver:
java.lang.IllegalStateException: Not allowed to start service Intent {
act=com.google.android.gms.analytics.ANALYTICS_DISPATCH
cmp=com.example.android/com.google.android.gms.analytics.AnalyticsService
}: app is in background uid UidRecord{3f302e5 u0a107 RCVR idle procs:1
seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3259)
at android.app.ActivityThread.-wrap17(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by java.lang.IllegalStateException: Not allowed to start
service Intent {
act=com.google.android.gms.analytics.ANALYTICS_DISPATCH
cmp=com.example.android/com.google.android.gms.analytics.AnalyticsService
}: app is in background uid UidRecord{3f302e5 u0a107 RCVR idle procs:1
seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505)
at android.app.ContextImpl.startService(ContextImpl.java:1461)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at com.google.android.gms.internal.zzaot.onReceive(Unknown Source:68)
at com.google.android.gms.analytics.AnalyticsReceiver.onReceive(Unknown
Source:11)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3252)
at android.app.ActivityThread.-wrap17(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
This is my relevant Manifest:
<meta-data
android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="#xml/analytics"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<!-- Optionally, register AnalyticsReceiver and AnalyticsService to support background
dispatching on non-Google Play devices -->
<receiver
android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH"/>
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
<!-- Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
installation campaign reporting -->
<receiver
android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.analytics.CampaignTrackingService"
android:exported="true"/>
Having hundreds of Oreo devices crashing due to this in past 24 hours. Seems to be affecting only on install. I am going to try and add android:permission="android.permission.BIND_JOB_SERVICE" to the 2 analytics services and see. Will report.
I Will be happy to provide more info if needed. Thanks
I recommend upgrading to play-services version 11.4.0. Add this in your Gradle file:
compile "com.google.android.gms:play-services-analytics:11.4.0
From the Play Services Revision 11.4.0, analytics section:
Added a new class AnalyticsJobService. This class provides compatibility support for Android O and is used by Analytics to upload data. No action is necessary to use this class, it’s added automatically as part of the Analytics package.
Deprecated the getContext() method of the AnalyticsService class.
Deprecated the CampaignTrackingService class.
and also you have to get permission.
android:permission="android.permission.BIND_JOB_SERVICE"
See below
https://developers.google.com/android/reference/com/google/android/gms/analytics/AnalyticsJobService
because CampaignTrackingService is now Deprecated
just remove this line from your manifest
<service android:name="com.google.android.gms.analytics.CampaignTrackingService"
android:exported="true"/>
Related
I have an Ionic app that uses OneSignal to send notifications to users. I have updated my project to use Android 12 (API level 32), which also required an upgrade of Capacitor to version 4:
ext {
minSdkVersion = 22
compileSdkVersion = 32
targetSdkVersion = 32
androidxActivityVersion = '1.4.0'
androidxAppCompatVersion = '1.4.2'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.8.0'
androidxFragmentVersion = '1.4.1'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.3'
androidxEspressoCoreVersion = '3.4.0'
cordovaAndroidVersion = '10.1.1'
coreSplashScreenVersion = '1.0.0-rc01'
androidxWebkitVersion = '1.4.0'
}
Since the update, the app crashes whenever a user clicks/taps on the notification. The error reported is as follows:
Stack trace:
capacitor.build.gradle:
Android.Manifest.xml
I have added the android:exported="true" activity attribute as specified by the Capacitor upgrade guide.
Please advise why the app might crash when clicking on notifications?
Looks like OneSignal updated its documentation. compileSdk & targetSdkVersion 33 seems to be required. docs
Validate your target SDK version is at least version 33.
I'm guessing this was the culprit, will update here later.
I was able to replicate the issue. With ADB connected, I got the following error with more details than the one in Play Store.
Turns out it was an intent filter issue for us. On android we don't have an intent filter for launch URLs with link://, however, we were sending notifications with launch URLs starting with link://.
Solution is adding an intent filter at AndroidManifest.xml, under . Note that with that filter in place, you can open your with the intent filter you provide.
<activity
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|layoutDirection"
android:name="com.hediyesepeti.app.MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Intent Filters For Opening App via URLS -->
<!-- link://#URL -->
<intent-filter>
<data android:scheme="link"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.hediyesepeti.app, PID: 19178
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hediyesepeti.app/com.onesignal.NotificationOpenedReceiver}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=link://www.hediyesepeti.com/... flg=0x10000000 }
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3676)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=link://www.hediyesepeti.com/... flg=0x10000000 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2161)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805)
at android.app.Activity.startActivityForResult(Activity.java:5470)
at android.app.Activity.startActivityForResult(Activity.java:5428)
at android.app.Activity.startActivity(Activity.java:5926)
at android.app.Activity.startActivity(Activity.java:5893)
at com.onesignal.OneSignal.openDestinationActivity(OneSignal.java:2443)
at com.onesignal.OneSignal.handleNotificationOpen(OneSignal.java:2423)
at com.onesignal.NotificationOpenedProcessor.processIntent(NotificationOpenedProcessor.java:116)
at com.onesignal.NotificationOpenedProcessor.processFromContext(NotificationOpenedProcessor.java:64)
at com.onesignal.NotificationOpenedReceiverBase.onCreate(NotificationOpenedReceiverBase.kt:36)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8269)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
I am working on FCM Push notification in Android, where I am getting this exception:
GcmBroadcastReceiver IllegalStateException: Not allowed to start service Intent
I have searched many question in this forum, but still didn't got help for solving it. My Log and Manifest patch is also given below.
Manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<receiver android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.kolbeh" />
</intent-filter>
</receiver>
<meta-data android:name="com.parse.push.gcm_sender_id"
android:value="id:85490######" />
<service android:name="com.parse.PushService" />
<receiver
android:name="dinewhere.fcm.CustomPushReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
Error Log:
10-16 16:52:19.621 25906-25906/com.kolbeh E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.kolbeh, PID: 25906
java.lang.RuntimeException: Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.kolbeh cmp=com.kolbeh/com.parse.PushService (has extras) }: app is in background uid UidRecord{2ac0a5c u0a888 RCVR idle procs:1 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3259)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.kolbeh cmp=com.kolbeh/com.parse.PushService (has extras) }: app is in background uid UidRecord{2ac0a5c u0a888 RCVR idle procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505)
at android.app.ContextImpl.startService(ContextImpl.java:1461)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at com.parse.ServiceUtils.runIntentInService(ServiceUtils.java:37)
at com.parse.ServiceUtils.runWakefulIntentInService(ServiceUtils.java:68)
at com.parse.GcmBroadcastReceiver.onReceive(GcmBroadcastReceiver.java:21)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3252)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
You are running on Android 8.0+, with a targetSdkVersion of 26+. You cannot reliably call startService() from the background, such as from a GCM receiver. Instead, you should either:
Switch to startForegroundService() and use a foreground service, or
Switch to JobIntentService
In your particular case, the code that is calling startService() appears to be from Parse. You should see if there is an update to the Parse client that takes Android 8.0 into account.
I have a problem with crashes of TagManager classes on Android 8. Here is the stack trace:
java.lang.RuntimeException: Unable to start receiver com.google.android.gms.tagmanager.InstallReferrerReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.x.z/com.google.android.gms.tagmanager.InstallReferrerService (has extras) }: app is in background uid UidRecord{90347cf u0a65 RCVR idle procs:1 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3399)
at android.app.ActivityThread.-wrap18(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1780)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.x.z/com.google.android.gms.tagmanager.InstallReferrerService (has extras) }: app is in background uid UidRecord{90347cf u0a65 RCVR idle procs:1 seq(0,0,0)}
For sure it is connected to Android 8.0: java.lang.IllegalStateException: Not allowed to start service Intent, but it looks I've configured the InstallReferrer according to Google documentation - https://developers.google.com/android/reference/com/google/android/gms/tagmanager/InstallReferrerReceiver
<service android:name="com.google.android.gms.tagmanager.InstallReferrerService"/>
<receiver
android:name="com.google.android.gms.tagmanager.InstallReferrerReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH"/>
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
I have crash reports concerning only Android 8.0 and Samsung phones. I use com.google.android.gms:play-services-analytics:16.0.3
How to get rid of those crashes except removing the InstallReferrerReceiver code?
I am working on FCM Push notification in Android, where I am getting this exception:
GcmBroadcastReceiver IllegalStateException: Not allowed to start service Intent
I have searched many question in this forum, but still didn't got help for solving it. My Log and Manifest patch is also given below.
Manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<receiver android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.kolbeh" />
</intent-filter>
</receiver>
<meta-data android:name="com.parse.push.gcm_sender_id"
android:value="id:85490######" />
<service android:name="com.parse.PushService" />
<receiver
android:name="dinewhere.fcm.CustomPushReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
Error Log:
10-16 16:52:19.621 25906-25906/com.kolbeh E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.kolbeh, PID: 25906
java.lang.RuntimeException: Unable to start receiver com.parse.GcmBroadcastReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.kolbeh cmp=com.kolbeh/com.parse.PushService (has extras) }: app is in background uid UidRecord{2ac0a5c u0a888 RCVR idle procs:1 seq(0,0,0)}
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3259)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x1000010 pkg=com.kolbeh cmp=com.kolbeh/com.parse.PushService (has extras) }: app is in background uid UidRecord{2ac0a5c u0a888 RCVR idle procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505)
at android.app.ContextImpl.startService(ContextImpl.java:1461)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at android.content.ContextWrapper.startService(ContextWrapper.java:644)
at com.parse.ServiceUtils.runIntentInService(ServiceUtils.java:37)
at com.parse.ServiceUtils.runWakefulIntentInService(ServiceUtils.java:68)
at com.parse.GcmBroadcastReceiver.onReceive(GcmBroadcastReceiver.java:21)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3252)
at android.app.ActivityThread.-wrap17(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
You are running on Android 8.0+, with a targetSdkVersion of 26+. You cannot reliably call startService() from the background, such as from a GCM receiver. Instead, you should either:
Switch to startForegroundService() and use a foreground service, or
Switch to JobIntentService
In your particular case, the code that is calling startService() appears to be from Parse. You should see if there is an update to the Parse client that takes Android 8.0 into account.
I'm following this tutorial and got a WearableListenerService. I just implemented the onMessageReceived method and didn't change anything else.
The entry for the service looks like this:
<service android:name=".WearableRemoteCommandListener"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER"></action>
</intent-filter>
</service>
The application element contains this meta-data element:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
But when I send a message to the wearable I get this security exception:
06-08 21:15:41.337 579-842/? W/ActivityManager﹕ Permission Denial: Accessing service ComponentInfo{net.bplaced.schlingel.wearabletest1/net.bplaced.schlingel.anmosela.WearableRemoteCommandListener} from pid=822, uid=10009 requires android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
06-08 21:15:41.437 822-940/? W/WearableService﹕ ensureBindStarted: Permission denied connecting to net.bplaced.schlingel.anmosela.WearableRemoteCommandListener
java.lang.SecurityException: Not allowed to bind to service Intent { act=com.google.android.gms.wearable.BIND_LISTENER cmp=net.bplaced.schlingel.wearabletest1/net.bplaced.schlingel.anmosela.WearableRemoteCommandListener }
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1793)
at android.app.ContextImpl.bindService(ContextImpl.java:1757)
at android.content.ContextWrapper.bindService(ContextWrapper.java:539)
at com.google.android.gms.wearable.service.t.b(SourceFile:1157)
at com.google.android.gms.wearable.service.t.a(SourceFile:1099)
at com.google.android.gms.wearable.service.t.handleMessage(SourceFile:1077)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
I tried to add the exported and enabled attribute, restarted the wearable but the exception happens again. Is there a permission missing? What is wrong with my setup?
get rid of this line
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
from the documentation
Must be required by an NotificationListenerService, to ensure that
only the system can bind to it.