Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Full screen on Android
-
Hi All,
I finished my app and it works fine. In the build settings i checked ‘full screen’. But when i use the app on android i get the status bar anyway.
How to prevent that?
I see that there are some Cordova plugins for fullscreen on GitHub, but checking ‘fullscreen’ in Monaca maybe already activates a plugin?
I also tried some html5 solutions like “minimal ui” etc, without luck.
Thanks!
-
Update: i added StatusBar.hide(); everywhere and that helps. Hope for a better solution! (-;
-
Update:
Don’t do this. Although it works fine in the debugger, it ruins your release app…
-
@Remco-Koffijberg What Monaca tool are you using? Cloud IDE?
-
Yes, Monaca Cloud
-
@Remco-Koffijberg I know you said you did, but just want to confirm you checked fullscreen in config when you did your build. My Dartitis app uses fullscreen from Monaca cloud and on Android the status bar does not show up. Do you have any calls to it that would make it show?
Also, in the AndroidManifest.xml, Monaca created this line, does yours have similar?
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="Dartitis" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar">
Notice the theme which says
NoTitleBar
Edit: For the newest version of Cloud, the aforementioned xml file is created during build. Also check your config file for:
<preference name="Fullscreen" value="true"/>
-
Thanks for your reply!
I don’t know where to find the manifest and the documentation states:
For Cordova 6.2 or higher, AndroidManifest.xml file is removed from Monaca framework.
So that is maybe why.
I do see the
<preference name="Fullscreen" value="true"/>
-
@Remco-Koffijberg So an APK file is just an archive. If you change the file extension to .ZIP and then open it, at the root level should be the manifest. Check that out to see what is getting built. If it does not have the theme line as mentioned, then it will not do what you want.
-
I don’t know.
My XML manifest has code like this:
a n d r o i d . i n t e n t . c a t e g o r y . L A U N C H E R r e c e i v e r < d e . a p p p l a n t . c o r d o v a . p l u g i n . l o c a l n o t i f i c a t i o n . T r i g g e r R e c e i v e r : d e . a p p p l a n t . c o r d o v a . p l u g i n . l o c a l n o t i f i c a t i o n . C l e a r R e c e i v e r : d e . a p p p l a n t . c o r d o v a . p l u g i n . l o c a l n o t i f i c a t i o n . C l i c k A c t i v i t y 7 d e . a p p p l a n t . c o r d o v a . p l u g i n . n o t i f i c a t i o n . T r i g g e r R e c e i v e r 5 d e . a p p p l a n t . c o r d o v a . p l u g i n . n o t i f i c a t i o n . C l e a r R e c e i v e r < d e . a p p p l a n t . c o r d o v a . p l u g i n . l o c a l n o t i f i c a t i o n . R e s t o r e R e c e i v e r $ a n d r o i d . i n t e n t . a c t i o n . B O O T _ C O M P L E T E D 5 d e . a p p p l a n t . c o r d o v a . p l u g i n . n o t i f i c a t i o n . C l i c k A c t i v i t y ```
Not so structured as yours (-;