Search code examples
androidkindlekindle-fire

How to disable the soft key bars on top and bottom of a kindle fire?


Kindle fire has a grey toolbar at the bottom of the screen with the Home soft button and some other buttons, as well as a toolbar to get to settings and such on top. I am building an app which will be the only app running on that particular Kindle for a niche business. Is there a way to disable either or both of these soft key toolbars?

Thanks.


Solution

  • No, it's not possible disable the soft key menu. You can take a look at the Kindle Fire documentation but there's no information :(

    But, If you want, you can disable the home button and the back button of the soft key menu:

    @Override
    public void onAttachedToWindow()
    {  
        //Disable home button
        this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);     
        super.onAttachedToWindow();  
    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        //Disable all keys
        return false;
    }
    

    [UPDATE]

    And you must update your manifest with:

            <intent-filter>
                ...
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
    

    Then, when you press the home button from the top menu, you'll get a list dialog, enable the "Use by default for this action" checkbox and select you app.