How to know if a particular application is installed or not on the device?

后端 未结 4 1819
我寻月下人不归
我寻月下人不归 2021-01-29 00:56

I want to check whether an app is installed on the device or not. I am using code below :

PackageManager pm = context.getPackageManager();
        List

        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-29 01:21

    just check using application id of particular app for example check

    getPackageManager().getPackageInfo("com.facebook.katana", 0);

    return true;

    else false

    check this answer it may helpful to you. How to check programmatically if an application is installed or not in Android?

提交回复
热议问题