How to use a personalized screen instead of the default home screen in Android?

I am creating a corporate application, the user should be able to use only those applications that I provide him. My idea is to override the default home screen using my custom layout using app icons of only those apps that I provide to the user. I will turn off the home, back menu and search buttons on the home screen. Even if the user clicks the home button, he should be redirected to my user screen containing the icons.

I saw an application that accomplished this without rooting the device. There is a link for this application.

I just want to know how to send the original screen in the background and my own layout to the fore.

+5
source share
3 answers

Your application looks like a custom launcher (but with limitations). Thus, you can define your application as a launcher to add it to the manifest:

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

Then you must implement the method to return to the real launcher.

+6
source

I am creating a corporate application, the user should be able to use only those applications that I provide him.

This must be a custom ROM.

I just want to know how to send the original screen in the background and my own layout to the fore.

Make your app your home screen. There is a sample SDK that shows how to create a home screen.

+5
source

Q: How to send the initial screen in the background and your own layout to the fore?
A: Using BroadCastReceiver, you can achieve this through an intent filter: android.intent.action.BOOT_COMPLETED

But I'm very curious to find out how you redefined the keypress functionality on the main screen.

+2
source

All Articles