Answer the question
In order to leave comments, you need to log in
How to automatically launch Google Chrome on Android when tablet boots up without user action?
The task is to make a monitor out of the tablet that will constantly show one web page, and there will be no access to the touch screen of the tablet. Accordingly, it is necessary that when the tablet is loaded in full screen mode, a web page in Google Chrome is launched and constantly displayed, this should happen without any user actions like unlocking the device, etc. Ideally, the Android desktop with icons should not be shown - immediately Chrome with the desired page.
Can you tell me where to dig?
Answer the question
In order to leave comments, you need to log in
Write a service that will run with the device and write the code that opens chrome:
Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(urlString));
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.setPackage("com.android.chrome");
try {
context.startActivity(intent);
} catch (ActivityNotFoundException ex) {
// Chrome browser presumably not installed so allow user to choose instead
intent.setPackage(null);
context.startActivity(intent);
}
Write a shell script that starts the activity using the command am
#!/system/bin/sh
am start -n com.android.chrome/com.google.android.apps.chrome.Main.'uri'
Script in init.d, (check support, enable if necessary).
UPD Insert a delay, otherwise the browser may start before the connection is established.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question