Ive been recently getting a lot of errors in the android console for Samsung devices that i cant emulate
java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4120)
at android.app.ActivityThread.access$1700 (ActivityThread.java:272)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2066)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:8016)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1076)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1688)
at android.app.ContextImpl.startService (ContextImpl.java:1633)
at android.content.ContextWrapper.startService (ContextWrapper.java:683)
at android.content.ContextWrapper.startService (ContextWrapper.java:683)
at android.support.v4.content.WakefulBroadcastReceiver.startWakefulService (WakefulBroadcastReceiver.java:99)
at com.area52.techno.helpers.MediaButtonIntentReceiver.startService (MediaButtonIntentReceiver.java:107)
at com.area52.techno.helpers.MediaButtonIntentReceiver.onReceive (MediaButtonIntentReceiver.java:143)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4111)
No other devices have this issue
Galaxy S9 (starqltesq) 98 24.2%
Galaxy S10 (beyond1) 76 18.8%
Galaxy S10e (beyond0) 58 14.3%
Galaxy A70 (a70q) 41 10.1%
Galaxy S8+ (dream2lte) 27 6.7%
Galaxy A50 (a50) 23 5.7%
Galaxy S10+ (beyond2) 16 4.0%
Galaxy S9 (starlte) 16 4.0%
Galaxy S20 5G (x1q) 16 4.0%
Galaxy S10+ (beyond2q) 15 3.7%
Galaxy S10e (beyond0q) 7 1.7%
Galaxy A8(2018) (jackpotlte) 5 1.2%
Galaxy A6 (a6lte) 4 1.0%
Galaxy A40 (a40) 3 0.7%
Can anyone tell me whats different about the Samsung device that may cause this?
Edit :
Class thats causing issue it seems
private static void startService(Context context, String command) {
final Intent i = new Intent(context, MusicService.class);
104 i.setAction(MusicService.SERVICECMD);
105 i.putExtra(MusicService.CMDNAME, command);
106 i.putExtra(MusicService.FROM_MEDIA_BUTTON, true);
107 startWakefulService(context, i);
}