简体   繁体   English

无需用户交互即可自动更新Android应用

[英]Automatically update an android app without requiring user interaction

From what I gather, android apps are updated by downloading the apk from the android market, and having the user confirm the update. 从我收集的内容,Android应用程序通过从Android市场下载apk并让用户确认更新来更新。 I also gather that the app needs user confirmation before the update can push through if the droid isn't rooted. 我还认为,如果机器人没有植根,那么应用程序需要用户确认才能推出更新。 I want to know if it's possible to update an app in an unrooted phone remotely, without requiring any user interaction, with the app being located on a non-market server. 我想知道是否可以远程更新无根电话中的应用程序,而无需任何用户交互,应用程序位于非市场服务器上。

Right now, I only know about installing apps via the marketplace, and through adb. 现在,我只知道通过市场和adb安装应用程序。 Are there other ways, perhaps? 还有其他方法吗?

You cannot do it totally remote, its against android security model. 你不能完全远程,它对Android安全模型。 You could roll your own updater to remotely manage your application files, preferences, database... but you cannot update your code and you certainly cannot update your apk. 您可以滚动自己的更新程序来远程管理您的应用程序文件,首选项,数据库...但您无法更新您的代码,您当然无法更新您的apk。

So my suggestion is, if you really need to do exactly that, write some script interpreter, possibly aided via reflection, give it all the permissions you may possibly ever need, and remotely update the logic in your script files. 所以我的建议是,如果你真的需要这样做,可以编写一些脚本解释器,可能通过反射辅助,给它你可能需要的所有权限,并远程更新脚本文件中的逻辑。 I'd be interesting in here how that goes. 我会在这里感激有趣。

To implement this, I created a separate app that would download the updated APK and run an intent to install the update. 为了实现这一点,我创建了一个单独的应用程序,可以下载更新的APK并运行安装更新的意图。 I cannot remember what parameters the Intent had, but that's the basic way of how I updated without going through Market. 我不记得Intent有什么参数,但这是我不经过Market更新的基本方式。 I never did get to pass the user-confirmation part. 我从来没有通过用户确认部分。

From, my uderstanding of the question above. 从我对上述问题的理解。 I have created an app which is constatnly updating, in order to do this I am using web services. 我创建了一个不断更新的应用程序,为了做到这一点,我使用的是Web服务。

1 - Create the app and on first load create a file such as 'version.txt with text such as 1.0.0' 2 - Every time I load up this app I check what number the version.txt currently has and return it 3 - I then use my web services to return a version number to my app (this is simply a folder named 1.0.1) 4 - If this does not match I create a popup indicating a new version is avaiable 5 - If the user downloads this I simply download all the files from the web services and move the to the relevent position 1 - 创建应用程序并在第一次加载时创建一个文件,例如'version.txt,文本如1.0.0'2 - 每次我加载这个应用程序时,我检查version.txt当前有多少个数字并将其返回3 - 然后我使用我的Web服务向我的应用程序返回一个版本号(这只是一个名为1.0.1的文件夹)4 - 如果这不匹配我创建一个弹出窗口,指示新版本可用5 - 如果用户下载此版本我只需从Web服务下载所有文件,然后移动到相关位置即可

Bare in mind you will require an initial update into the market. 请记住,您需要对市场进行初步更新。 Hope this helps. 希望这可以帮助。

This an approach for corporate use or any other way which it doesn't use the Google Play store but I still think the approach is very interesting 这是一种企业使用的方法或任何其他不使用Google Play商店的方式,但我仍然认为这种方法非常有趣

http://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users/?hn http://blog.vivekpanyam.com/evolve-seamlessly-deploy-android-apps-to-users/?hn

I don't know about remotely, but the Market application already handles the automatic update case. 我不知道远程,但市场应用程序已经处理自动更新案例。 There is a checkbox within each app you own to enable automatic updating. 您拥有的每个应用程序中都有一个复选框,可以启用自动更新。

暂无
暂无

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

相关问题 如何在没有 Google Play 或用户交互的情况下自动更新 Android 应用程序 - How to update android app automatically without Google Play or user interaction 如何在flutter中自动更新android应用程序而无需用户交互 - How to update android app automatically without user interaction in flutter Android应用程序无需用户干预即可自动投射(CastCompanionLibrary) - Android app automatically casting without user interaction (CastCompanionLibrary) 无需用户交互即可自动更新 APP ==> Permission Denial: not allowed to send broadcast android.intent.action.PACKAGE_ADDED - Update APP automatically without user interaction facing issue==> Permission Denial: not allowed to send broadcast android.intent.action.PACKAGE_ADDED 如何在没有用户交互和/或应用更新的情况下更改android视图 - How to change android views without user interaction and or app update 如何在没有用户交互的情况下自动更新连续运行的Android应用 - How to auto update a continuously running Android app without user interaction 如何在没有用户交互的情况下以编程方式卸载Android应用程序? - How to uninstall an Android app programmatically without user interaction? 在android中无需用户交互即可通过whats App发送消息 - Sending message through whats App without user interaction in android 使用javamail api通过android应用程序发送邮件而无需用户交互 - sending mail by android app using javamail api without user interaction Android 中的消息应用程序无需用户交互即可触发 GET 链接 - Messages app in Android triggers GET links without user interaction
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM