Hello,
consider the following example.
I am playing with one app, it doesn't matter which one, it may be Firefox, Whatsapp, a game or whatever else.
My program is made of an activity and a service started as StartForeground, and is currently running in the background.
I open the Notification Drawer and click my app's icon, that brings up my app's activity screen so I can check something (the progress of a download, the last messages received or something else).
Then I want to put my app's screen to the background *WITHOUT* destroying it (so Activity.Finish is not an option), I simply want to hide the graphical part of it, and I want to return to what I was doing before opening the notification drawer.
Is it possible to programmatically send my app's graphic activity to the background and return to the previously open app?
I am able to intercept the BACK key and send an intent to show my Home screen, that puts my activity in the background.
What I'd like to do is intercept the BACK key and land back exactly on the same app I was using before opening the notification drawer.
Any hints?
steve
consider the following example.
I am playing with one app, it doesn't matter which one, it may be Firefox, Whatsapp, a game or whatever else.
My program is made of an activity and a service started as StartForeground, and is currently running in the background.
I open the Notification Drawer and click my app's icon, that brings up my app's activity screen so I can check something (the progress of a download, the last messages received or something else).
Then I want to put my app's screen to the background *WITHOUT* destroying it (so Activity.Finish is not an option), I simply want to hide the graphical part of it, and I want to return to what I was doing before opening the notification drawer.
Is it possible to programmatically send my app's graphic activity to the background and return to the previously open app?
I am able to intercept the BACK key and send an intent to show my Home screen, that puts my activity in the background.
What I'd like to do is intercept the BACK key and land back exactly on the same app I was using before opening the notification drawer.
Any hints?
steve