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.
how to push application to foreground of it is pushed background?
@Override
protected void onPause()
{
super.onPause();
startActivity(getIntent().addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
}
© 2022 - 2024 — McMap. All rights reserved.