0

I want to know if a user has returned to my app.

I mean, if a user opens my app and then press home button (not back button) and sees his home screen then reopens my app using the launcher icon.

How can I determine that the user performed this action?

Is the onResume() method the right one for this?

MasterAM
  • 16,283
  • 6
  • 45
  • 66
user3086226
  • 93
  • 1
  • 7
  • 18
  • yes you can do that using onResume method but it is also be called when your application opens for the first time so you will have to take care of it – Auto-Droid ツ Mar 06 '14 at 13:02
  • and what is the reverse method I mean Can I understand user press home button? – user3086226 Mar 06 '14 at 13:05
  • 1
    no i dont think you can recognize home button pressed detection but still if your app is in onPause method your app is minimized – Auto-Droid ツ Mar 06 '14 at 13:07
  • @Auto-Droidツ or destroyed.. Not only for minimized. [See activity Lifecycle](http://developer.android.com/reference/android/app/Activity.html) – IAmGroot Mar 06 '14 at 13:26
  • thakn you I use onpause and onresume – user3086226 Mar 07 '14 at 05:36
  • 1
    @Simon minimized means app is running in background by pressing home button and still using memory or has been put in background by some other app which is running in foreground. Hope u have understood what i was trying to say ,If u have any doubt u can put a comment by tagging my mane – Auto-Droid ツ Mar 07 '14 at 05:45
  • @Auto-Droidツ The app does not minimise. There is no such thing as minimise on Android. It is a desktop OS feature of a window manager. I understand completely what happens when an activity, or the entire app moves to the background but it certainly does not "minimise". – Simon Mar 07 '14 at 08:00
  • @Simon so you could just show the odasity to give us the knowledge instead of pointing out someones else's mistake .The guy who was asking the question got his answer and understood what I was trying to convey ,Hope you will next time try to help someone instead of showing how superior you are from others. – Auto-Droid ツ Mar 07 '14 at 08:50

0 Answers0