Android Question Error starting intent: (Intent) Intent { act=android.intent.action.MAIN flg=0x30000000 cmp=b4a.motiv


Active Member
Licensed User
Longtime User

I am have used the services to set an alarm. When I close the app with home/back button all is well. When I kill the process entirely, or restart the phone then it obviously destroys the alarm.

So I set StartAtBoot to True and removed all references to the main module from the service module. [There remains one, in the notifcation.setInfo("","Text here", Main)]

The error message that comes up is this:
Error starting intent: (Intent) Intent { act=android.intent.action.MAIN flg=0x30000000 cmp=b4a.example/.main }

The first time I try to compile the app, this error message appears. If I then retry to compile it, the app installs! Only, then when I restart the phone, it crashes.

If I build it in release mode, then it all seems to work ok!!

This thread has turned into less of a question, and probably won't even help anyone else who had this issue.



Licensed User
Longtime User
I asume that you are using the bridge to install it in your device. Yes, i have the same error, but only when i unistall the aplicattion before reinstall it again on the device. In this case i have to do it twice. For me is a small problem with easy solution.

About the other problem, it's difficult to know. But if you want to make an alarm your process should be in foreground. Why crashes? Can't say with only this info.
Sub Service_Create
   nNotify.Icon = "icon"
   nNotify.SetInfo("Title", "Message", Main)
' make SO can't kill our service
End Sub

You can do it STIKY, but I read that they are kill after 5 second after the aplication is closed.
See this post:

Sorry for my English
Upvote 0


Active Member
Licensed User
Longtime User
thanks, i'll have a look at the startforeground

at the moment, it's all working fine for me when i install in release mode.
Upvote 0