0

I have a button which is drawn from a service (using windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); ) This button is visible throughout the device (till the service is stopped)

Clicking on this button starts an activity A (using intent flag ACTIVITY_NEW_TASK). I want to know if it is possible to find out where this button was pressed? (the location of the activity where the user was while pressing the button)

I need to know this because in activity A , there is a button called GO BACK, which should return the user to the exact position where he was initially.

Note, due to some reasons, I cant call finish();

harveyslash
  • 5,906
  • 12
  • 58
  • 111
  • possible duplicate of [Android - Dynamicly Get the Current Activity in Foreground](http://stackoverflow.com/questions/18115493/android-dynamicly-get-the-current-activity-in-foreground) – Budius Sep 03 '14 at 16:21
  • all you have to do is that http://stackoverflow.com/questions/18115493/android-dynamicly-get-the-current-activity-in-foreground the moment the user click the button and put on the intent. – Budius Sep 03 '14 at 16:21
  • Will it work if the user is in the device's home screen ? – harveyslash Sep 03 '14 at 16:23
  • 1
    the device home screen is an activity just like any other. – Budius Sep 03 '14 at 16:23

0 Answers0