Aufa Husen
Aufa Husen

Reputation: 133

Android to always run activity

I'm making an Android app that act as an IOT host (I use serial communication and send it to Arduino). Is there a way to always set Android to run this activity (never sleep & always inside the activity)? It is important for it to not leave the activity since all the control and db access is done through it. So far what I've found already available is kiosk app in which it act as a launcher with limited app and such but none of the lock the android to an activity.

Thanks for answers & comment!

If you're curious :) The reason I use Android is that it needs a control panel UI and connection to a database, using RPI and other stuff would just get it to be more expensive.

Upvotes: 0

Views: 96

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75645

there a way to always set android to run this activity (never sleep & always inside the activity)?

Not really. You are somehow looking for kiosk mode, or you can make your app acting as launcher (but it all depends on use case - if your app is only one on the device then this is all fine, otherwise you would need to put a lot of efforts to jail user)

it is important for it to not leave the activity since all the control and db access is done through it.

It sounds like your app architecture is just designed wrong.

Upvotes: 2

Related Questions