app唤醒QQ

先通过shang.qq.com开通推广

Android:

String 
url=”mqqwpa://im/chat?chat_type=wpa&uin=这里是QQ号&version=1&src_type=web&web_src=oicqzone.com”; 
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
mqqwpa://im/chat?chat_type=wpa&uin=这里是QQ号&version=1&src_type=web&web_src=oicqzone.com

 

iOS:

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero]; 
NSURL *url = [NSURL 
URLWithString:@”mqq://im/chat?chat_type=wpa&uin=这里是QQ号&version=1&src_type=web&web_src=oicqzone.com”]; 
NSURLRequest *request = [NSURLRequest requestWithURL:url]; 
webView.delegate = self; [webView loadRequest:request]; [self.view 
addSubview:webView];
mqq://im/chat?chat_type=wpa&uin=这里是QQ号&version=1&src_type=web&web_src=oicqzone.com

转载于:https://www.cnblogs.com/hcpzhe/p/11023501.html

你可能感兴趣的:(移动开发)