[英]Installing a list of APK automatically and programmatically
I have a list of APK and it should be installed automatically. 我有APK清单,应该自动安装。
here's my current situation. 这是我目前的情况。
How do you buffer that the next APK to install shall wait till the user chooses "open" or "done" after the first installation. 如何缓冲下一个要安装的APK将等待,直到用户在首次安装后选择“打开”或“完成”。
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. 我还是这个新手。
thanks! 谢谢!
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). 我认为这是不可能的...您只能启动一个Intent
以安装apk,但不能确定apk是否已安装(如果他回来,好像他在安装后单击打开一样,则不会回来)。
But, in your Activity
, the onResume
method is called when the user comes back to your application. 但是,在Activity
,当用户回到您的应用程序时,将调用onResume
方法。
You can at this moment check if the 1st apk is installed and launch the 2nd apk installation. 您现在可以检查是否已安装第一个apk并启动第二个apk安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.