Tuesday, July 9, 2013

How to lock the home button on Android devices that upper than version - ice cream sandwich?

I tried the method 'onAttachedToWindow()' with 'WindowManager.LayoutParams.TYPE_KEYGUARD'. And I also used the permission named "android.permission.DISABLE_KEYGUARD". But, It just wakes an error - "07-09 08:55:32.548: E/AndroidRuntime(26365): java.lang.IllegalArgumentException: Window type can not be changed after the window is added."

So, I have surfed in internet to find ways. And then, I could find a way to get message from the 'Home Button.' The way is 'onUserLeaveHint().' By my data that I found, this method wakes before than the 'onPause()' method. And this method wakes before the application goes to the background.

Despite my effort, I don't know how to cancel making background application yet.

Please help me as soon as possible. TNX.

Source: http://stackoverflow.com/questions/17538272/how-to-lock-the-home-button-on-android-devices-that-upper-than-version-ice-cre

channel 5 news uc berkeley harrison barnes brett ratner stevie nicks anchorman capybara

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.