Questions tagged [android-homebutton]

The home button in the android Operating System

This button is used to get back to the Home screen on the android enabled smartphones.

350 questions
0
votes
0 answers

Two instances are created when launchMode is singleTask and called with different intents

I have created a sample custom launcher to check the behavior of launchMode and intents. Here is the MainActivity.java: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
0
votes
0 answers

Starting an activity when the user leaves the current activity using the home button in Android app development

Android app development: Trying to launch another activity when the home button is clicked 3 times in the main activity, but the code is not working. Can someone help with my code? HomeWatcher mHomeWatcher = new HomeWatcher(this); …
0
votes
0 answers

Do not close an activity at the top pf stack on pressing home button

I have a launcher ActivityA (launch mode - singleTask), that opens ActivityB on pressing a button. Now, I press the home button and open the application again. I see ActivityA but not ActivityB. I want the activity which is displayed before pressing…
0
votes
0 answers

Disable the Home button on latest version of Android

I'm trying to implement a Lock Screen application and I spent more than 20 hours on how to disable the home button. I have tested many codes sample available on the Internet (like answer to how to make our own lock screen in android instead of…
user4329916
0
votes
3 answers

How to go to Login Screen when app is opened from background?

When User click Home button app is going to background,if user open the app from background then it should go to login screen instead of last activity...please help me.
0
votes
1 answer

Clear app from running app list

I want to check when user leave app,click home button or etc .I searched and found one small and very helpful function.This function working perfect @Override protected void onUserLeaveHint() { super.onUserLeaveHint(); } Now i want to clear(kill…
BekaKK
  • 2,173
  • 6
  • 42
  • 80
0
votes
2 answers

Too much time when starting Intent (to disable Home button)

I downloaded this tutorial to disable home button, the problem is : when I press my home button the activity take too much time to restart (4 seconds). I tried to replace the service by putting : @Override public void onPause(){ Intent i =…
Kolopox
  • 276
  • 1
  • 4
  • 17
0
votes
3 answers

Different behavior when App is sent to Background State using Home or Back physical button

I'm testing in Android a chat app developed in React Native and I'm noticing a strange behavior that only depends on how do you send the app to background. Two devices are needed to replicate the bug: Device1 with User1 logged in and Device2 with…
0
votes
2 answers

After Home button pressed and pressed icon (on launcher) app restart

If install app from sd by default installer and Open button pressed will open app. After Home button pressed and click icon (on launcher) app will restart. Need kill app from memory and start by icon on launcher for normal behaviour. Steps: 1.…
0
votes
1 answer

How to make sure activity show alert on exiting in onPause/onStop (Backpress is handled ) in current android version

How to make sure activity show alert on exiting in onPause/onStop (Backpress is handled ) in current android version. I have a scenario where user need to give some assessment i need to make sure that a alert is shown to user before he leaves the…
user6457240
0
votes
1 answer

ActionBar Home button - hide fragment and clear back stack

I would like to implement Home/Up button in the actionBar. I have simple application with one Activity (A) and two fragments (Settings (B) and About (C)). In the other questions I have found to use popBackStack, but that's not the solution bacause…
0
votes
1 answer

Call activity which is set as Home activity

I have 2 activities. Inside the manifest activity 1 is set as Launcher and activity 2 is set as Home. Now i want to call the second activity from the first one to trigger the window for setting the home launcher and then the app should be…
0
votes
1 answer

PhoneGap on click backbutton simulate click in home button

I'm looking for change action for backbutton, actually I'm using events to catch backbutton calls and using navigator.app.exitApp(); to close app (in really pause app), but I need backbutton call action like home button. Why? Well, I using…
John Henrique
  • 324
  • 2
  • 12
0
votes
3 answers

Custom image instead of logo in ActionBar

How to set logo icon of an ActionBar to be a custom image? Similar as how it works on Whatsapp? I have tried to implement but its looking like this.. How to remove the space? I used like this…
Make it Simple
  • 1,832
  • 5
  • 32
  • 57
0
votes
1 answer

Why does my android launcher re-open on Home Press

I'm developing a launcher application. When I'm on the launcher, and I press home, the activity animates away and opens a new instance of the activity. What can I do to just stay on the home screen activity when pressing home?