正在查看 7 個帖子:1-7 (共 7 個帖子)
-
作者帖子
-
最近在調試 WordPress 和 bbpress 的時候有人發帖是想把電話發在裏面,不過不能點擊電話直接撥打,我試着把撥打電話的 js 代碼插入進去,還是不能調用打電話,不知道怎麼回事
打電話的不應該是這種形式嗎 tel:0916-8131992 不知道你具體想要實現什麼效果,在一個撥打電話一般電腦上是無效的,必須手機點擊才行。
在微信打開有關係嗎,在手機瀏覽器打開可以撥打電話,微信要怎麼設置
我想在微信打開,
你得插入微信電話的協議才能喚醒微信電話。
微信的電話協議是什麼,能説一下嗎
iOS 版的:
//跳轉到 qq 聊天界面 + (void)callQQ:(NSString*)qq { if([selfisQQInstalled]) { NSString* qqUrl = [NSStringstringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",qq]; UIWebView* webview = [[UIWebViewalloc]initWithFrame:CGRectZero]; [[UIApplicationsharedApplication].keyWindowaddSubview:webview]; NSURL*url = [NSURLURLWithString:qqUrl]; NSURLRequest*request = [NSURLRequestrequestWithURL:url]; [webviewloadRequest:request]; } } + (BOOL)isQQInstalled{ NSString*urlStr = [NSStringstringWithFormat:@"mqqapi://card/show_pslcard?src_type=internal&version=1&uin=6481427ed9be2a6b6df78d95f2abf8a0ebaed07baefe3a2bea8bd847cb9d84ed&card_type=group&source=external"]; NSURL*url = [NSURLURLWithString:urlStr]; if([[UIApplicationsharedApplication]canOpenURL:url]){ returnYES; } else{ [YBAlertViewalertWithTile:@" 提示"message:@" 尚未安裝 QQ,請安裝 QQ 後重試"delegate:nilbtn1:@" 確定"btn2:nil]; returnNO; } } //跳轉到微信 + (void)callWeChat:(NSString*)Weixin { if([selfisWeChatInstalled]) { NSString* qqUrl = [NSStringstringWithFormat:@"weixin://"]; UIWebView* webview = [[UIWebViewalloc]initWithFrame:CGRectZero]; [[UIApplicationsharedApplication].keyWindowaddSubview:webview]; NSURL*url = [NSURLURLWithString:qqUrl]; NSURLRequest*request = [NSURLRequestrequestWithURL:url]; [webviewloadRequest:request]; } } + (BOOL)isWeChatInstalled{ NSString*urlStr = [NSStringstringWithFormat:@"weixin://"]; NSURL*url = [NSURLURLWithString:urlStr]; if([[UIApplicationsharedApplication]canOpenURL:url]){ NSLog(@" 已安裝微信了"); returnYES; } else{ [YBAlertViewalertWithTile:@" 提示"message:@" 尚未安裝微信,請安裝微信後重試"delegate:nilbtn1:@" 確定"btn2:nil]; returnNO; } } //打電話 + (void)callPhone:(NSString*)phone { NSMutableString* str=[[NSMutableStringalloc]initWithFormat:@"tel:%@",phone]; UIWebView* callWebview = [[UIWebViewalloc]init]; [callWebviewloadRequest:[NSURLRequestrequestWithURL:[NSURLURLWithString:str]]]; [[UIApplicationsharedApplication].keyWindowaddSubview:callWebview]; }
Android 版的:
-
作者帖子
正在查看 7 個帖子:1-7 (共 7 個帖子)
- 哎呀,回覆話題必需登錄。