Android Internal launch other apps, as well as open the designated QQ chat interface

Source: Internet
Author: User

There are several ways to open a third-party app in your own app, here's an example:

To open as an example, if you need to know the Open app package name, generally a release version of the application, the package name will not easily change, but, open QQ will pay attention to, after all, QQ release version has not less than 4 versions.
Intent Intent = Getpackagemanager (). Getlaunchintentforpackage ("com.tencent.mm"); StartActivity (Intent);

  

you can jump from a third-party app to QQ interface, and can enter the specified QQ number of the chat interface (can be a stranger QQ number).

Android:

String url= "mqqwpa://im/chat?chat_type=wpa&uin=1642084864"; StartActivity (new Intent (Intent.action_view, Uri.parse (URL)));
the specified QQ number only needs to modify the value after UIn.

Ios:

UIWebView *webview = [[UIWebView alloc] Initwithframe:cgrectzero]; Nsurl *url = [Nsurl urlwithstring:@ "Mqq://im/chat?chat_type=wpa&uin=123456&version=1&src_type=web"]; Nsurlrequest *request = [Nsurlrequest requestwithurl:url];webview.delegate = self; [WebView Loadrequest:request]; [Self.view Addsubview:webview];

  

Web:

<a target= "_blank" href= "Http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq&menu=yes" >click here </a>

  

  

Android Internal launch other apps, as well as open the designated QQ chat interface

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.