java - Home button override in android -


im trying understand ways override home button functionality in android. im doing lockscreen app , home button unlocking device.

i have been researching last 3 days way it, , solutions have found not 100% effective (mostly due nature of home).

i have implemented solutions solutions below in these 3 days im still not satisfied.

problem:

i want able override home button functionality same way widgetlocker app in appstore. widgetlocker not home launcher , still can override home better anyone.

link widgetlocker app

disclaimer

  • first of all, know security measure in android app not take full control of device, , agree it.
  • the official way implement home launcher , preferred of them all, unfortunately boss still not 100% convinced on path selected, until exhaust other possibilities.
  • it must 4.0+ version of android

solutions

  • implement home launcher, catch home intent , take care of home button presses, has problem user must select app default home launcher , may not understand why (another problem know, still)
  • implement service system_overlay view launched every time device locked, being on top of everything, unfortunately (or fortunately security wise) home button presses still being sent app below , default home launcher still called.
  • implement activity parallel 1 implements lock screen, contains home intent activated/deactivated programatically on app options, changing main app homelauncher on demand, when activity called launches lockscreen activity.

is there other way this?

thanks in advance.

look in following topic way override home button: overriding functionality of home button

personally though suggest going option implement own home screen. use similair setup work. app want people use set default option when home button pressed. way can control people can go large degree. options can reset resetting application defaults of app. makes non-permanent in case fix device needed.

for latter implementation install following lines in manifest

<category android:name="android.intent.category.home" /> <category android:name="android.intent.category.launcher" /> <category android:name="android.intent.category.default" /> 

now next time press home button pop-up ask want do.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -