Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your best solution without creating your own custom Android rom to remove the bottom buttons, will be to make the app full screen, override the back button, and make your app a launcher in order to override the home button.</p> <p>AFAIK, there is no way of overriding the recent apps button.</p> <p><strong>Edit:</strong> One other option would to have a fullscreen app and then use a mount that will cover the buttons. (Thanks to MaciejGórski for the idea).</p> <p>To make your app full screen, put the following in your activity's <code>onCreate()</code>:</p> <pre><code>requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); </code></pre> <p>Or you can make the app full screen from within the manifest as well, thanks to @Niels:</p> <pre><code>&lt;application android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"&gt; </code></pre> <p>To override the back button, add this method:</p> <pre><code>@Override public void onBackPressed() { return; } </code></pre> <p>Now the home button is trickier, add the following to your manifest:</p> <pre><code> &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/&gt; </code></pre> <p>and this to your manifest under the <code>&lt;activity&gt;</code>:</p> <pre><code>&lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.HOME" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;/intent-filter&gt; </code></pre> <p>and this to your manifest under the <code>&lt;application&gt;</code>, make sure that the <code>&lt;receiver name&gt;</code> is the full package name path you define:</p> <pre><code>&lt;receiver android:name="com.example.BootCompleteReceiver"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; </code></pre> <p>And lastly, create a java class file called <em>BootCompleteReceiver</em>, and use this code:</p> <pre><code>public class BootCompleteReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent startActivityIntent = new Intent(context, YourActivityName.class); startActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(parentActivityIntent); } } </code></pre> <p>To later disable your app as a home screen launcher, press the recent app button, swipe down from the right side, tap settings, go to apps, then tap the upper right three dots (vertically aligned), press "Reset app preferences", and then finally press "Reset apps".</p> <p>I think that should just about cover it all.</p> <p><strong><em>EDIT 2</em></strong> I just realized/tested and you do NOT necessarily need the <code>BOOT_COMPLETED</code> intent if you make your application a launcher. This means that the <code>&lt;uses-permission&gt;</code>, <code>&lt;receiver&gt;</code>, and <code>BootComplete.java</code> are not needed. You can just use the <code>&lt;intent-filter&gt;</code> that includes the MAIN, HOME, and DEFAULT attributes.</p> <p><strong><em>EDIT 3</em></strong> More/different information available here: <a href="https://stackoverflow.com/questions/17372781/home-launcher-issue-with-fragments-after-reboot">Home Launcher issue with Fragments after reboot</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload