Android - Check if APP is already installed

邮差的信 提交于 2019-12-14 03:58:19

问题


I wanted to have a web page with a link pointing to the apk app in a market (this is possible), but if the app already exists on the device did not want him to redirect the market but that the app is open soon as the app on the device.

Is that possible?

thank you


回答1:


There's no way to do that on a website. You can create a link to the application on Market, and if the user is on an Android device, he or she will be redirected to the Market application - from here it's possible to see if it's installed or not.

Should you want to do it in Java code, you can use @Pedro's advice with a simple check.




回答2:


You can use PackageManager.getInstalledApplications and check if the app you're looking for is listed.



来源:https://stackoverflow.com/questions/7796956/android-check-if-app-is-already-installed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!