简体   繁体   English

如何检测设备上是否已安装Android App?

[英]How to detect, if Android App was already installed at the device?

Is it possible to save some information at the device, if user deletes the application from his device? 如果用户从其设备删除应用程序,是否可以在设备上保存一些信息? Something like a key-value (fe ("app id","date of installation")) which will not be removed ? 像键值之类的东西(例如:fe(“应用程序ID”,“安装日期”)) 是否会被删除

Background: we are working on an application, which has an anonymous user for "exploring the app". 背景:我们正在开发一个应用程序,该应用程序具有用于“探索该应用程序”的匿名用户。 This user should be removed, if user logs in. We can cover all cases, but not if user deletes the whole application. 如果用户登录,则应删除该用户。我们可以涵盖所有情况,但如果用户删除整个应用程序,则不可以。 In iOS you can achieve this, by saving some values in the iOS-Keychain. 在iOS中,您可以通过在iOS钥匙串中保存一些值来实现此目的。

Any ideas or workarounds are welcome! 欢迎任何想法或解决方法!

You have to save the data to some external file. 您必须将数据保存到某个外部文件。 So when you want to get the data you can read the data based on the file path. 因此,当您要获取数据时,可以根据文件路径读取数据。

Is it possible to save some information at the device, if user deletes the application from his device? 如果用户从其设备删除应用程序,是否可以在设备上保存一些信息?

You can put stuff out on external storage in a place that will not be automatically deleted when your app is uninstalled (eg, one of the roots supplied by Environment ). 您可以将内容放到外部存储中的某个位置,该位置在卸载您的应用程序时不会自动删除(例如, Environment提供的根目录之一)。 However, the user can delete that file whenever the user wants. 但是,用户可以在需要时删除该文件。

Beyond that, there are no options, specifically so apps do not leave cruft behind that builds up and clutters up the user's device. 除此之外,没有其他选择,尤其是使应用程序不会遗留下来的残骸,这些残骸会堆积并弄乱用户的设备。

we are working on an application, which has an anonymous user for "exploring the app". 我们正在开发一个应用程序,该应用程序具有用于“探索该应用程序”的匿名用户。 This user should be removed, if user logs in. 如果用户登录,则应删除此用户。

It is unclear what this has to do with your original question. 目前尚不清楚这与您的原始问题有什么关系。

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

相关问题 Android设备如何检测已安装应用程序? - How does an Android device detect that an app has already been installed? 如何检测手表中是否已安装我的Android应用的Wear应用 - How to detect if the Wear app of my Android app is already installed in the watch Android:如何检测已连接的USB设备? - Android : how to detect already connected usb device? 如何检测屏幕是否已在Android设备上打开? - How to detect is screen is already on, on android device? 如何检测应用程序是否安装在物理设备与虚拟设备/模拟器上? - How to detect if app is installed on a Physical Device Vs Virtual Device / Emulator? 无法实现设备的Android Studio已安装APP - Android Studio not realising device has already installed APP 使用javascript或jquery检测Android应用程序是否已安装在设备中 - detect Android app is installed or not in device using javascript or jquery Android:检测附近的设备是否安装了某些应用 - Android: detect if nearby device has certain app installed 有没有一种方法可以通过Javascript检测是否在(Android \\ iOS)设备上安装了特定应用程序? - Is there a way to detect if a specific app is installed on (Android\iOS) device from Javascript? 如何从 web 页面中检测应用程序是否安装在 android 设备上 - How can I detect if an app is installed on an android device from within a web page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM