0

I want to detect if QQ(tencent) is installed on Android or not programmatically.

Here is the code I am using:

boolean installed_qq = appInstalledOrNot("com.qq.tencent");

        if(installed_qq) {

            Intent intent = new Intent(SplashActivity.this, Main1Activity.class);
            startActivity(intent);
            finish();

        } else {
            Intent intent = new Intent(SplashActivity.this, Main2Activity.class);
            startActivity(intent);
            finish();               
        }

"com.qq.tencent" is incorrect.

I want to know correct uri of QQ app.

please help me.

1 Answers1

0

The URI of Tencent QQ should be com.tencent.mobileqq, if you are checking the mobile version of QQ.

https://play.google.com/store/apps/details?id=com.tencent.mobileqq&hl=en is the web url of QQ in Google Play.

From the link, you could notice that com.tencent.mobileqq is the value of id paramater.

ztan
  • 6,861
  • 2
  • 24
  • 44