Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何判断是否安装安卓QQ,现在是调用API就直接崩溃 #78

Open
cq0702 opened this issue Feb 3, 2018 · 2 comments

Comments

@cq0702
Copy link

cq0702 commented Feb 3, 2018

请问如何判断是否安装安卓QQ,现在是调用API就直接崩溃,就算加了try catch也不行,直接崩溃

@cq0702
Copy link
Author

cq0702 commented Feb 3, 2018

解决了,修改源码,增加方法
export function isQQInstalledAction() {
return QQAPI.isQQInstalled().then((res)=>{
() => waitForResponse("QQAuthorizeResponse")
})
}
然后在js里使用
QQAPI.isQQInstalledAction().then((res)=>{
QQAPI.shareToQQ(qqshareInfo).then((res)=>{
// console.log('--shareToQQ--res:',res)
}).catch((err)=>{
// console.log('--shareToQQ--err:',err)
})
}).catch((err)=>{
Alert.alert(
'提示',
'您还没有安装QQ客户端,请安装QQ后再试'
)
})

@yam963
Copy link

yam963 commented Jun 26, 2018

QQAPI.isQQInstalled()
.then(install=>{
console.log('安装QQ'+install)
})
.catch(unInstall=>{
console.log('没有安装QQ'+unInstall)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants