Android implements QQ game lobby like the launch of third-party apps

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.