简体   繁体   English

Android设备如何检测已安装应用程序?

[英]How does an Android device detect that an app has already been installed?

I would like to install multiple versions of the same app that I am developing on my phone. 我想在手机上安装同一个应用程序的多个版本。 However, each time a different version of the app is installed on my device (even though they have different app_names), the previously installed on is deleted. 但是,每次在我的设备上安装不同版本的应用程序(即使它们具有不同的app_name)时,先前安装的版本也会被删除。

How does my device know that the new version and the old version of the app are the same? 我的设备如何知道该应用程序的新版本和旧版本相同?

From http://developer.android.com/guide/topics/manifest/manifest-intro.html 来自http://developer.android.com/guide/topics/manifest/manifest-intro.html

The package name serves as a unique identifier for the application. 程序包名称用作应用程序的唯一标识符。

And later 然后

The package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version. 程序包名称定义了您的应用程序的身份,因此,如果您更改它的名称,则它将被视为另一个应用程序,并且以前版本的用户无法更新到新版本。

它通过包名称检测更新,它搜索并获取相同的包名称并进行更新!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM