Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am having an app which is minimized & i want that to be open and put it into the screen in front of user and minimizing currently running app. Would it be possible to override currently running app with my minimized app in android or xamarin
Posted

1 solution

No. You have no control over currently running application. You could start a service from your program in OnPause method (that is, when you app is minimized). In that service you could bother the user with offers to open your app (but you should not force it).

Also, note that I would de-install the application that tries something like that.

Proper approach is to have list of intents that your app can accept in the manifest file and let the user choose your app when the system encounters the intent of given type.
 
Share this answer
 
Comments
vijetatomar 15-Jan-15 2:40am    
cant we do it through stack memory... we have both activities into stack, minimized one and front one too. cant we change the index of both activities and put my minimized activity into top of stack and then start my activity.. can we do so???
Sinisa Hajnal 15-Jan-15 5:59am    
Is this YOUR activity or some random application?
Sinisa Hajnal 15-Jan-15 6:00am    
No, you can't just riffle through stack memory - that would open too much of your own apps to malicious software. But you can exchange the activities under your control based on some conditions (in which you then broadcast an intent and your other activity catches it)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900