5 Replies Latest reply on Jan 29, 2015 5:44 AM by Bill Hecox

    The clear recent task

    Teo Shin Hao

      Hi,

       

      The clear recent task will return to home launcher after the profile been executed. Any idea on how to make the clear recent task not to return main launcher?

        • Re: The clear recent task
          Bill Hecox

          When running "clear recent apps", you are in effect killing all unprotected applications.  To keep your app running you must add it to the protected apps list before clearing recent apps.

          You can add your application to the protected list through App Manger Profile.

            • Re: The clear recent task
              Teo Shin Hao

              Good day,

               

               

              Actually, what I want to do is after clear the recent task, the home launcher will be killed instead of going back to home launcher. After several trying, home launcher will still there if i kill the recent task.

               

              Thanks!

                • Re: The clear recent task
                  Bill Hecox

                  I'm not sure I follow what you are trying to accomplish.   Clear recent apps, should not kill the home screen/launcher, if it did, the home screen would relaunch as soon as someone hit the home button. Are you trying to make your application run in a kiosk mode, where the user can not get back to the home screen?

                    • Re: The clear recent task
                      Teo Shin Hao

                      Yes Sir!

                       

                      This is what am I trying. When my launcher is launched, I don't want the default launcher stay in background. It will return to default launcher while user long press and select it.

                       

                      Is there any solution that can kill default launcher or prevent it relaunch?

                       

                      Thanks!

                        • Re: The clear recent task
                          Bill Hecox

                          You could use EHS  ( Enterprise Home Screen) to lock your application into kiosk mode.

                          Enterprise Home Screen (EHS)

                           

                          If you are creating a launcher/home screen, your AndroidManifest.xml must have the following in your activity definition.

                           

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

                           

                           

                          Once thats done and it is installed on the device, press the home button.  I dialog will popup asking which home screen you want to use by default. Select your app, then reboot the

                          device. On boot your launcher will start instead of the stock launcher.  The stock launcher will never run and will not be in the recent apps list.

                           

                          Word of Caution:

                          In order to get back to the stock launcher, you have to go to settings > apps > (your app) > clear defaults.  That means you must add a way to launch settings to your app if you want to get out of it.   If ADB is enabled you could also just use adb uninstall  "your apk" to remove your app, which would force the default launcher to take back over.