自动编程安装APK列表 [英] Installing a list of APK automatically and programmatically

查看:93
本文介绍了自动编程安装APK列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有APK的列表,它应该自动安装。

I have a list of APK and it should be installed automatically.

这是我目前的状况。


  • 第一个APK出现,安装或取消

  • 用户点击安装

  • 一个窗口出现,将询问用户打开或完成

  • 但问题是,之后出现该窗口,选择打开或
    完成,接下来的APK安装窗口,并覆盖
    开放或完成安装了第一个成功的APK窗口。

你怎么缓冲,未来APK安装应等到用户选择打开或在第一次安装后,完成。

How do you buffer that the next APK to install shall wait till the user chooses "open" or "done" after the first installation.

目前,我尝试了这些方法,但无济于事:(

currently i'm trying out these methods but to no avail :(

 protected void onStart();

 protected void onRestart();

 protected void onResume();

 protected void onPause();

 protected void onStop();

 protected void onDestroy();

任何人都可以指出正确的方向?我还是新来这个。

can anyone point out the right direction? i'm still new to this.

谢谢!

推荐答案

我认为这是不可能的......你只能发动意图键安装APK但你不能确定,如果APK安装(如果他回来,如果他点击打开安装之后,他不回来)。

I think that it is not possible... You can only launch an Intent to install an apk but you can't be sure if the apk is installed (If he comes back as if he clicks on open after installation, he doesn't come back).

不过,在你的活动,当用户回来到你的应用程序中的 onResume 方法被调用。

But, in your Activity, the onResume method is called when the user comes back to your application.

您可以在这一刻检查,如果第一APK安装并启动第二APK安装。

You can at this moment check if the 1st apk is installed and launch the 2nd apk installation.

这篇关于自动编程安装APK列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆