Android phonegap application issue with hardware back button - android

I have a problem with the Phonegap Android application with the back button in some Android devices.
In the Pic when I press application's back button(Red color button), it is not working and the phone's home is working. This is in particular of some Android devices which is having the hardware buttons in main screen.
Now the question is how to stop the phonegap application before the hardware buttons. Means I wat to stop the application top of those device buttons, because I need those buttons also for the application

Related

launcher animation when phone is unlocked

I'm new to Android and I'm trying to make a launcher as my first Android project. I've done the basic work of displaying installed apps. Now I want to add animations to improve user experience. But I'm not able to figure out the following two things :
How to add animation when the phone is just unlocked and apps are displayed on the homescreen like in iPhone or MIUI stock launcher?
How to know the app that is minimized or closed on pressing the home button so that I can show an animation like the app is minimized to it's icon on homescreen just like in MIUI?
OnResume() of your application activity will be called once user presses home button or unlocks phone. So you can implement you logic of showing animation there.

Custom Launcher is not remaining as default launcher in Huawei device

I have developed a custom launcher/homescreen and it has been working perfectly on all android version for nearly two years. So far this launcher has been used in various Samsung devices.
Currently I am testing it in new huawei lua-u22 device. My launcher runs, can be set as default and shows up other apps on top of launcher too. But if I run another app (for example Gmail), screen lock(Swipe only) for 20-30 second, unlock device then press back button then instead of bringing it back to my launcher it goes back to default huawei homescreen. I checked by going to the settings-> home and there my launcher was still set as default. It only brings back my launcher home screen when I press home button again.
Is this problem of huawei device that is always redrawing default huwaei home as homescreen? Is there anyway I can track default selected home change at any time?
I found out the reason. In huawei after screen is tuned off my app was getting killed.
Huawei has a feature Protected Apps which allows application that is enabled in the list to keep running when screen is turned off. After I allowed my app in Protected apps it was not getting killed after screen turned off and everything now working properly.
To enable this feature go to System settings (which you can either find in the quick toggles portion of the notification shade by pulling down the status bar on the top portion of the screen). Go to All tab, Scroll down to Privacy and Security section, go to to Protected Apps and enable your app(this will control what’s allowed to run when the screen is off and what isn’t)
In stackoverflow there are few codes available to run this screen pro-grammatically which I do not find reliable enough as it may change in any new version of device.

Disable Home Button in Android (NEC UT880 device) running on Android 4.2.2 version

I am making one lock application and for that I need to disable home button. I already tried all the common solutions available and it works for other android versions but for this device which is running on Android 4.2.2 it fails always.
You can't disable the home button as it can cause security issues promoting malicious apps etc.
What you can do is add an overlay to your app instead that will cover over other apps.
See this link for more info:How to disable Home and other system buttons in Android?
Make application as launcher.
First time when home button is pressed, device ask for choose launcher, select your applicaiton with always options.
From the next time when application is opened and you press the home button app never go in background.

Launcher or an App for Restricted Access which one is better?

Hi I am planning to create an android app which is similar to the
Samsung Kids Mode- parental control
If you can see the link I gave, it is obvious that the app overrides the Home button when inside the app... I wanted to create a similar app for friends mode and stranger mode and should not come out of the app when home button is pressed... is it possible without root access?? My ultimate aim is to not come out of the app without entering a password, So if it is just an app after android 4.0 it just comes to the home screen when home button is pressed, So If I create a custom launcher and make it default even after pressing home button it will be inside the app if I am right, but is there any way I can do the same without a launcher
Also to avoid the phone number suggestions which happens when we dial parts of numbers in the dialler, should the phone be rooted to so it or is it possible without that?
Thanks in advance to everyone for taking time to read this, hoping a positive solution

How to manage/disable home button on Android 4.0?

The application that I'm developing must look like a launcher. I opened this topic because of I couldn't find the correct answer in whole topics that I looked at in Stack Overflow.
I want the application to disable or control whole buttons to exit this application. I disabled home and back button on Android 2.3 but it doesn't work on Android 4.0 (except for back button).
To conclude, I couldn't and I want to disable only home button on Android 4.0
Can you give an advice except the other answers?
There is no way to intercept the home button on Android, unless you make your app the home screen. This is for security reasons, so that malicious apps cannot take over your device by overriding all the buttons that can exit. The home button is the one sure shot way to be able to leave any app.
In short, no it's not possible, and even if it were, it is a serious disruption in what a user expects out of an app's behavior. You will have to go with making your app into a launcher if you want to achieve this.

Categories

Resources