how to push application to foreground of it is pushed background?
Asked Answered
S

1

2

Hi guys I am developing an application in which I have created a screen i.e is activity. once the activity is been displayed it disables all the keys. But some how I am able to switch my application to background. So is there any way that if my application is pushed to background it automatically comes again to foreground? As in blackberry we can do it using activate() and deactivate() method.

Suck answered 30/1, 2012 at 10:3 Comment(0)
S
5
@Override
    protected void onPause()
    {
        super.onPause();
        startActivity(getIntent().addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
    }
Shoelace answered 31/1, 2012 at 8:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.