开发者

UiApplication.activate() method called post app install on some BlackBerry Bolds. Why?

I'm having troubles with the UiApplication.activate() method firing post-app-installation (OTA install).

I have:

public class PlayerApp extends UiApplic开发者_如何转开发ation

    public PlayerApp() {
       new Thread(this).start();
    }

    public void run() { ... }

    public void activate() { ... }

I'm having troubles with the activate() method. It's firing to early, it's firing post--installation when it shouldn't (I thought it should fire when the application is selected by the user from the menu). What makes it worse it's not occuring on all Bolds. The BB is meant to ask for a reboot, but activate() is firing before this point and plays hell with the UI.

Questions. When does activate() really fire? Should activate() be firing post-install anyway? Is there a way to handle activate() firing post-installation? Is this a bug in the rim apis?

Note: The problem appears on BB Bold 4.6.0.144/4.0.0.143 and thus far I've not been able to replicate the issue on 4.6.0.282/4.0.0.235.

Edit: Installation flow: OTA link > Download > Install > 'Yes' to 'Trust application status' > AutoStart app > Trouble starts here.


According to the API docs activate():

The system invokes this method when it brings this application to the foreground. By default, this method does nothing. Override this method to perform additional processing when being brought to the foreground.

So, I suspect after OTA install the user is given the option of running the app which, when accepted, brings the app to the foreground. It is difficult to be certain without seeing your startup code. If your app is configured to autostart, then it will be "autostarted" after install. If this casues the UI to be instantiated and brought to the foreground, the activate will be called at that time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜