Pedery
Pedery

Reputation: 3636

Launch fullscreen Chrome from Android home screen without statusbar

I have a customer that wants to launch a certain website from an icon on a tablet that runs Android. He's leasing out the tablets, so we have complete control over the hardware. The idea is that these tablets will only be used for his site (it's a type of slide show), so he wants the tablet home screen to have a single icon, and that icon will always launch his site in complete fullscreen. This works somewhat, but the statusbar does not go away without a user gesture. On Chrome the meta tag mobile-web-app-capable does the trick, but we can also use other browsers if this simplifies things. Is it possible to remove the statusbar without a second user gesture (the first being launching the website)?

And in response to the answers below, how can a WebLauncherActivity be useful when the user is just opening a browser?

Upvotes: 0

Views: 3464

Answers (2)

Esko
Esko

Reputation: 682

On the page, element.requestFullscreen() displays the element in fullscreen mode.

Additional JS API and CSS selectors can provide other fullscreen specification in the following html5 article: Building an Amazing Fullscreen Mobile Experience

Upvotes: 1

Esko
Esko

Reputation: 682

Try using the WebappLauncherActivity that's used by the page shortcuts. You should be able to launch the activity via adb with:

adb shell am start -n com.android.chrome/.webapps.WebappManager.ACTION_START_WEBAPP "url"

You can also add your own activity inheriting from FullscreenActivity which is the base for WebappActivity like mentioned by @tushar-pandey.

Upvotes: 0

Related Questions