This question already has an answer here:
Intercepting home button on Android
(1 answer)
Closed 5 years ago.
How can I disable home key in android in activity programmatically
I tried by HomeKeyLocker.class and used in activity like this:
new HomeKeyLocker().lock(this);
But this is not working in any device.
You cannot disable the home key. It is user's choice is they want to leave your application.
See detailed explanation here.
Related
This question already has answers here:
Listen to volume buttons in background service?
(14 answers)
Closed 5 years ago.
I am making an application and I want to make app in such a way that user directly open that by using volume key, suppose user click twice the volume+ or volume- buttom and the app will directly open without home screen or without any interuption.
I want to add this functionality using the code in Android Studio. If anyone know how to add this, please help...
What you are asking for is not App/Code nor Android Studio related but device related, If the Original Equipment Manufacturer will allow a device to have a shortcut button it could be possible to achieve that on those devices.
Cheers.
This question already has answers here:
How to change an application icon programmatically in Android?
(11 answers)
Closed 7 years ago.
For example, once the user launches the app (iOS and Android), s/he selects a local dealer. I would like the app icon to change to that dealer’s branding (or a second one to be added, as is possible with Windows’ pin to start).
This is not possible for android either. While you can install a shortcut, you cannot change the app's icon programmatically.
This question already has answers here:
How to disable the home key
(5 answers)
Closed 8 years ago.
I'd like to lock the screen. I want to disable the home key.How do I accomplish this?
And I wonder why some lockscreen apps ask for setting the Launcher?
How to shield the home key by implementing a custom Launcher.
getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD) does not work in android4.0.
So, what do I need to do in android4.0?
It is android security violation. Only way you can do this is to implement custom launcher.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android - Is It possible to disable the click of home button
I want to disable the home button and set even on the home button to open some app.
Whatever version you may be using but IT IS NOT POSSIBLE TO DISABLE HOME BUTTON PROGRAMATICALLY IN ANDROID.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android: Get Installed Shortcuts
Is there a way to get the list of shortcuts the user has on his home screen?
From my Android app..
I doubt it - the home launcher does not have to be part of the Android system, it could even be a custom app that doesn't use shortcuts at all.
However, you could create a custom home screen launcher specifically designed to broadcast what shortcuts are contained, and it is possible one exists out there already. But this would obviously require everyone using your app to have this custom home screen.