我尝试从URL更新我的应用程序,因为我是通过服务器分发我的应用程序,而不是在android市场上发布应用程序。我成功地更新了应用程序。但我不想看到更新完成后出现的对话框。出现的对话框显示“应用程序已安装”,并且有两个按钮: 1)打开2)完成。我不想让第二个按钮“完成”。我只想显示一个按钮,即“打开”。我该怎么做呢?
发布于 2012-05-09 14:48:03
这是不可能的。
这是标准的android程序,您不能更改应用程序的安装方式并强制用户按下Open。(用户可以随时按下Home或Back按钮)
-编辑
您可以在安装的Intent包上启动应用程序:
<receiver android:name=".IntentReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>BroadcastReceiver:
public class IntentReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Do your stuff here.
}
}https://stackoverflow.com/questions/10510951
复制相似问题