Android Question auto-start app before lockscreen

JOTHA

Well-Known Member
Licensed User
Hello community,

after long searching and experimenting I ask you experts for a solution or some code for this "problem":

I would like to start an app on a tablet in a car (which gets electric power via the ignition key) automatically right at the moment, when the ignition key is turned on.

1) The app should start even before the lockscreen, so without having to do anything by hand.
2) Ideally, only this app should run, nothing else (kiosk mode).
3) As soon as there is no power supply, the app should be shut down and the tablet should be switched off.

Does anyone know a solution or has anyone ever programmed something like that?
For a few short lines of code or a perfect solution I would be very grateful!
 

DonManfred

Expert
Licensed User
2) Ideally, only this app should run, nothing else (kiosk mode).
you need to use Kioskmode app then. Note that you need to have the device connected trough usb-debugging to be able to enable (or disable) Admin mode. You can not start/stop Kiosk-Mode by code.
1) The app should start even before the lockscreen, so without having to do anything by hand.
Create a service (NOT the starter service) and set it´s StartAtBoot flag to true.
3) As soon as there is no power supply, the app should be shut down and the tablet should be switched off.
i don´t think that you can powere off the device by Code (if it is possible i do not know).
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Thank you DonManfred,

I've seen the post from Erel with Kioskmode, but the tablet on which the app should run is an Android verdsion 4.4, so it is not possible to use it (because Kioskmode ist working only from version 5+). OK, point 2) has no priority ... ;-)

So I have to to this:
Create a service (NOT the starter service) and set it´s StartAtBoot flag to true.

I'll try ...

THX
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Does StartAtBoot mean that you have to reboot the tablet?

I want to have the autostart when the tablet gets Power on.
 
Upvote 0

JOTHA

Well-Known Member
Licensed User
Can it be that a launcher (Nova Launcher) prevents the "auto-start"?
 
Upvote 0

wes58

Active Member
Licensed User
New Question -> New Thread.
Why do you always do that? I just don't get this obsession with writing "start a new thread". If you don't want to help, or don't know the answer - don't post anything. Why creating useless posts?
It is his thread, and he tries to find a solution to his problem. So he is asking a question which still relates to his problem.
Why should he start another thread?
If he started a new thread and wrote: "Can it be that a launcher (Nova Launcher) prevents the "auto-start" ".
It would mean nothing without providing additional information - which he already posted in this thread.

I hope that I didn't offend you, but it really gets to my nerves, when I see those kind of posts.
I could understand it, if the question was asked by a different person from the original poster. But that is not a case.
 
Upvote 0

DonManfred

Expert
Licensed User
Last edited:
Upvote 0

wes58

Active Member
Licensed User
Because it is the rules of this forum.
Have a read here: https://www.b4x.com/android/forum/threads/forum-guidelines.55632/
I read it, again, and what is there:
Guidelines:
Use common sense.
Safe place. All posts should be safe for all members. This includes children.
Do not troll: https://en.wikipedia.org/wiki/Internet_troll
Respect other members. Don't be rude.
The "chit chat" forum is open for general discussions. It is not a place for political or religious related discussions.
Feedback is very welcome. However, you should post each feedback exactly once. Repeating the same feedback all over the forum will not help in any way.
And where in the guidelines it says that you must create new thread for the new question?
I could only find a tip:
Tips:
Start a new thread for your question instead of posting in an existing thread.
So it is not in forum rules, because there are no forum rules. There are only forum Guidelines. And even there, it is only a Tip, not a must, not a requirement

A TIP - a small but useful piece of practical advice.
A GUIDELINE - A guideline is a statement by which to determine a course of action. A guideline aims to streamline particular processes according to a set routine or sound practice. By definition, following a guideline is never mandatory. Guidelines are not binding and are not enforced https://en.wikipedia.org/wiki/Guideline

Why would I want to put you on the ignorelist? You are doing a great job and providing a lot of good advice and help - except for that one;).

Have a nice day.
 
Upvote 0

José J. Aguilar

Expert
Licensed User
I think (and probably most of us) he’s doing a great job too saying “please start a new thread”, because what he’s doing this way is helping other people to find the rigth post with the rigth subject. If someone search one day for something, and the search result shows posts with subjects don’t fit what is discussed inside them...
Even probably I should not be answering you inside this post, but creating a new one

Maybe it’s not a requirement, but it’s probably an improvement
 
Upvote 0
Top