Before testing a unified landing, with Contentprovide can achieve data sharing, but now encountered a problem:
When launching a third-party app, there are two things:
A: Third-party apps have been launched
Instead of starting a new interface, this should be typed as a desktop shortcut to reproduce the third-party app's interface.
Second: The third party app is not started, this type should launch a new third party app, but not on the task of the app.
Several flag pairings have just been tested and are now implemented in the following ways:
ComponentName componetname = new ComponentName ("Com.xx.ac", "com.xx.ac.XActivity");//The signature parameter is the package name, followed by the package name + class name [Apply the class name of the entry class] Intent Intent = new Intent () intent.setcomponent (componetname); intent.setaction (intent.action_main);// Intent.addflags (intent.flag_activity_reset_task_if_needed); Intent.addflags (Intent.flag_activity_new_task); Intent.addcategory (Intent.category_launcher); context.startactivity (intent);
The relevant flag can refer to another blog post: http://blog.csdn.net/lijunhuayc/article/details/43404951
Intent carry parameters are not tested can be passed, interested can try it yourself ha ~ ~ ~
Note: If the target activity is singleinstance, you need to involve the activity
protected void Onnewintent (Intent Intent) method uses
Android implements QQ game lobby like the launch of third-party apps