Home Screen

omoba

Active Member
Licensed User
Longtime User
Hi,

How do I make an app automatically run on booting up/turning on my tablet?

How do I open an from another app? In order words I am running "app A" and while running that, I want to open "app B" from with "app A". Is it possible.

Eg. If an "app A" contains books; I want to put a button at the bottom of "app A" screen that links to "app B" which is a dictionary. When done with "app B", I can close it and automatically, I am back to "app A"

Thanks
 

NJDude

Expert
Licensed User
Longtime User
Hi,

How do I make an app automatically run on booting up/turning on my tablet?
You will need to create a service and set it to "start at boot", the service will start your app.

You need to use intents to do that, for example, put the following code on a button click event and it will open the YouTube app.
B4X:
i.Initialize(i.ACTION_VIEW, "")
i.SetComponent("com.google.android.youtube/.HomeActivity")
StartActivity(i)
 
Upvote 0

omoba

Active Member
Licensed User
Longtime User
Thanks

This might be obvious but is there a tutorial on creating services and how to set it to boot on startup?
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
To set a service to start at boot you have to do this in the IDE: Project -> Service Properties -> Start at boot.

For samples, just use the search function of the forum, you'll find quite a few.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…