I am making an short-cut application for android. My application should open the built-in application selected by the user and exit.
For example, if the user selects "settings", Built-in settings application should be opened and my application should exit. I am able to accomplish the first task using intents. But when i use "finish()" to close my application. The process is still running in background. So when i relaunch my application from menu, the surface view is empty.
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.settings","com.android.settings.Settings");
context.startActivity(intent);
((Activity) context).finish();
Through google, i found code to force exit the application, but everywhere its advice not to force quit an application.
Where am i going wrong? why is the surface view empty when i relaunch the application?