我开发了一个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.
更多推荐
发布评论