@zdmitrynsk The crash contains the Corona Notifications plugin not OneSignal so this is something they will need to look into.
at com.ansca.corona.SystemStartupBroadcastReceiver.onReceive (SystemStartupBroadcastReceiver.java:29)
@Rob Miracle Any ideas what is causing the crash here? Looks like Corona this is from boot up? Maybe from a android.intent.action.BOOT_COMPLETED event?
Hi, I’ve updated plugin and now i’m having crash on Android when application go into suspended state.That’s my call stack:
I/Corona: core 142: suspended E/AndroidRuntime: FATAL EXCEPTION: FocusHandlerThread Process: com.adb.android.app.myapp, PID: 23761 java.lang.IllegalArgumentException: No such service ComponentInfo{com.adb.android.app.myapp/com.onesignal.SyncJobService} at android.os.Parcel.readException(Parcel.java:1947) at android.os.Parcel.readException(Parcel.java:1889) at android.app.job.IJobScheduler$Stub$Proxy.schedule(IJobScheduler.java:180) at android.app.JobSchedulerImpl.schedule(JobSchedulerImpl.java:44) at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncServiceAsJob(OneSignalSyncServiceUtils.java:137) at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask(OneSignalSyncServiceUtils.java:113) at com.onesignal.OneSignalSyncServiceUtils.scheduleSyncTask(OneSignalSyncServiceUtils.java:60) at com.onesignal.OneSignal.onAppLostFocus(OneSignal.java:1089) at com.onesignal.ActivityLifecycleHandler$AppFocusRunnable.run(ActivityLifecycleHandler.java:171) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:171) at android.os.HandlerThread.run(HandlerThread.java:65)
first recognizable call is from OneSignal.onAppLostFocus() method, do you have any ideas how to deal with it?
Bug happens when i stay 2 seconds or longer on native.showPopup from code below, but when i close alert fast enough then bug dosn’t appear. Any ideas?
Fixed! I’ve realized that bug was only on android 8+, so i changed my target sdkVersion to 28 and changed dependencies in gradle file to look for version 28.0.0. And bug is gone.
Just in case, “com.ansca.corona.SystemStartupBroadcastReceiver” is explained in the AndroidManifest.xml file in all of the sample projects for Corona Native users.
\<!-- Receiver which automatically starts this application after the Android device starts up. This is needed to show this application's active status bar notifications and reschedule pending notifications after the device boots up, because they will only be shown if the app is running. This receiver only works if the "android.permission.RECEIVE\_BOOT\_COMPLETED" permission has been set. --\>
What that broadcast receiver does is start up a Corona app in the background when the Android device finishes booting up. This should be used by apps that support local/push notifications because the app’s notifications will only be shown on the Android status bar if the app is running in the background. That is, if you force quit the app, then all of its notifications in the status bar will disappear. This is standard Android behavior. Starting up an app in the background on boot-up is normal for apps that display notifications, such as the standard Gmail app.
Now, a Corona app will not be started in the background on boot-up by default. You have to opt into it by adding Android permission “android.permission.RECEIVE_BOOT_COMPLETED” to your AndroidManifest.xml file… or to your “build.settings” if you are a Corona Simulator user. Otherwise, this broadcast receiver will be ignored by the Android OS.
Can’t say anything about an error right now though, looks like some manufacturers (Samsung specifically) changed notification logic in Android 8 or something, we’ll look into it asap. Can’t reproduce an issue straight away, but stay tuned!
We’ve found inconsistencies in the new Android notification system. Our engineers are working on the solution, but I can’t give you an ETA for now, stay tuned!
I’ve got some more errors with applications built by Corona Native that contains OneSignal plugin on Android 8.
Bug occurred when i minimalized the application to background (by pressing home button on device)
To solve this i compared Manifest from Corona Native build and Manifest generated by Corona Simulator build (from the same code) and i noticed that some tags were only present in manifest generated from CoronaSimulator build:
We are focused on rebuilding the Android build system which is required by Google. Hopefully, these issues can fall into place after that. This is a big project.
If you are pressed for time, perhaps you should use OneSignal’s REST api. Many people have used it successfully.
Thanks for the update… I think using REST api will not help as OneSignal Josh notices that this error comes from Corona notification plugin, so does not matter if it’s a rest or onesignal plugin.
If you will be able to fix it earlier it would be great as I am blocked for the past few months.
Corona is still working on target version 26. I am actually surprised you got this far. They will notify us when it is ready for testing. Ignore all this if you are in some internal testing group that I am not aware of.