Hide button/bar at bottom

Monkey Targets Forums/Android/Hide button/bar at bottom

cdiede(Posted 2015) [#1]
Hi!
How can I disable this button/bar at the bottom?



therevills(Posted 2015) [#2]
What version of Android are you running?

In v4.4 you can set the game to run in Immersive Full-Screen Mode:

https://developer.android.com/training/system-ui/immersive.html

You can just change the manifest so you need to add the code yourself within the Mojo Android files.


cdiede(Posted 2015) [#3]
Yes, it's Android v4.4.3.

I can't manage that with your explanation, I have no experience in 'native code' and android things... sorry... Thats actually the reason why i'm using monkey... to get these thing out of the way :/

Can you tell me the solution more detailed, please?


Danilo(Posted 2015) [#4]
Maybe the following 2 topics help:
- Immersive support for Android games
- Getting rid of the three dots?


cdiede(Posted 2015) [#5]
Now it works. I just have set in the manifest 'android:targetSdkVersion' to '19'. That's it!

Thanks to all!


nack(Posted 2015) [#6]
Hmm, still stump after reading this through. I tried setting it in the manifest to 19 and the soft button still shows? I am using nexus 5 if it makes any difference.


sygem(Posted 2015) [#7]
I have a module for that :)

https://github.com/sygem/fullscreen

I also have a Nexus 5, running Lollipop, and this module enables the immersive fullscreen mode.


Dubiel(Posted 2016) [#8]
sygem, it's brilliant!


therevills(Posted 2016) [#9]
Thanks Sygem - do you mind if I add this to Diddy?

[Edit: Added it to Diddy with Sygem credited and the MIT license]


therevills(Posted 2016) [#10]
Just to let you know that the FullScreen module crashes on Android 2.3.3 - 2.3.7 with java.lang.NoClassDefFoundError:

java.lang.NoClassDefFoundError: com.therevillsgames.csusatripeaks.NativeFullScreen$2$1
	at com.therevillsgames.csusatripeaks.NativeFullScreen$2.run(MonkeyGame.java:3484)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3691)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
	at dalvik.system.NativeStart.main(Native Method)


Line 3484:
				decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {


I've decided to stop supporting 2.3 anyway now, but thought I would let you know.


CGV(Posted 2016) [#11]
@therevills, what minimum version are you going to support?


therevills(Posted 2016) [#12]
Anything above 3 I think would be okay, according to my game stats less than 6% of my users have less than 3.


therevills(Posted 2016) [#13]
I forgot to change the version number in my last update to Google Play, so quite a few users running <3 tried playing the game and crashed :(

I've added a small fix to the NativeScreen to stop it crashing on < 3. Its just a fail fast if the build is less and API 11 (3).

    public NativeFullScreen() {
        if (Build.VERSION.SDK_INT < 11) {
                return;
        }
        BBAndroidGame.AndroidGame().AddActivityDelegate(this);
        BBAndroidGame.AndroidGame().GetActivity().runOnUiThread(new Runnable() {
            public void run() {
                mHandler = new Handler();
                View decorView = BBAndroidGame.AndroidGame().GetActivity().getWindow().getDecorView();
                decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
                    @Override
                    public void onSystemUiVisibilityChange(int visibility) {
                        // Note that system bars will only be "visible" if none of the
                        // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags are set.
                        if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
                            // nothing to do?
                        } else {
                            if (isFullScreen) {
                                mHandler.removeCallbacks(mHider);
                                mHandler.postDelayed(mHider,2500);
                            }
                        }
                    }
                });
            }
        });
    }