从服务器下载后以编程方式安装Android应用程序(Installing Android Application Programatically after download from the ser

编程入门 行业动态 更新时间:2024-10-27 12:31:55
从服务器下载后以编程方式安装Android应用程序(Installing Android Application Programatically after download from the server)

我开发了一个Android应用程序,将.apk文件保存在服务器中。 我开发了一个html文件,并在html中给出了.apk文件的链接。 如果我点击链接,该文件正在下载。 现在我的任务是以编程方式安装应用程序而不使用用户。 我给了这样的代码....

File fullPath = getFileStreamPath("Timing example.apk"); { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "Timing example.apk")), "application/vnd.android.package-archive"); startActivity(intent); }

任何人都可以在这方面帮助我,我对于该怎么做感到沮丧。

I had developed one android application, kept the .apk file in the server. I developed one html file and given the link of that .apk file in html. If I click on the link, The file is downloading. Now my task is to install the application programatically with out the use of user. I had given code like this....

File fullPath = getFileStreamPath("Timing example.apk"); { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "Timing example.apk")), "application/vnd.android.package-archive"); startActivity(intent); }

Can any one help me in this regard, I am in frustration about what to do.

最满意答案

现在我的任务是以编程方式安装应用程序而不使用用户

幸运的是,出于明显的安全原因,这对于普通的Android SDK应用程序是不可能的。

Now my task is to install the application programatically with out the use of user

Fortunately, this is not possible for an ordinary Android SDK application, for obvious security reasons.

更多推荐

本文发布于:2023-04-29 06:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335277.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   方式   服务器   Android   Installing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!