F FrankBerra Active Member Licensed User Longtime User May 21, 2015 #1 Hi all i have developed an app with a sticky service that is restarted at regular intervals. Everything seems to work but sometimes the app crashes randomly whithout reasons. I took a look to the Logcat and it says: Code: Copy java.lang.RuntimeException: Unable to start service pippo.app.radar@2952976 with null: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (Intent). Someone had the same issue (https://www.b4x.com/android/forum/threads/intent-not-initialize-in-process-restart.27528/) but i am not a skilled developer so i don't know how to solve this problem. Anyone can help me with an explanation about what it is going wrong? In the first lines of code of the service i put something like this: Code: Copy If StartingIntent.Action = "android.bluetooth.device.action.FOUND" Then ... else ... end if Is the problem related to this? Thank You!
Hi all i have developed an app with a sticky service that is restarted at regular intervals. Everything seems to work but sometimes the app crashes randomly whithout reasons. I took a look to the Logcat and it says: Code: Copy java.lang.RuntimeException: Unable to start service pippo.app.radar@2952976 with null: java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (Intent). Someone had the same issue (https://www.b4x.com/android/forum/threads/intent-not-initialize-in-process-restart.27528/) but i am not a skilled developer so i don't know how to solve this problem. Anyone can help me with an explanation about what it is going wrong? In the first lines of code of the service i put something like this: Code: Copy If StartingIntent.Action = "android.bluetooth.device.action.FOUND" Then ... else ... end if Is the problem related to this? Thank You!
Erel B4X founder Staff member Licensed User Longtime User May 22, 2015 #2 Change your code to: Code: Copy If StartingIntent.IsInitialized And StartingIntent.Action = ... Upvote 0