I m changing the app. icon using HomeScreen.updateIcon(bitmap) when app. is in background.
Now how to fire click event when I click on this new app. icon like when I click on previous app. icon (which is set through Project Properties-> Resources) main开发者_如何学Python() is invoked.
I have set my main project as CLDC app & m using an alternative entry point which is started at startup but dont have any Resources.
Any system defined Class is there to handle this updatedIcon issue?
Not sure but maybe you talking about focused icon when user touch it?
In this case try setRolloverIcon
public static final void setRolloverIcon(Bitmap rollovericon)
Sets the rollover icon for use with this application. If rollovericon is null, then the application's default rollover icon, as specified in the original project workspace, is used.
Note: If you have not specified a main application icon for the application, you must call updateIcon and provide an icon before setting the rollover icon. Otherwise, the system will override the main icon and the rollover icon as set by this method with the default icons for the current theme.
Note: Changes made using this API are NOT persisted across resets.
Parameters:
rollovericon - Icon to use when the application icon is in focus on the home screen, or null if the application's default rollover icon is to be used.
Since: JDE 4.1.0
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
I'm also not sure, i think its not an issue with your application icon, what I understood is like you are changing application icon at some point when application was in background, which should work fine with out an issue. Next you want when the icon has been changed (meaning application is in some other state now) so if user clicks on the application icon you want to show some other screen (lets say Screen2) not the first one (lets say Screen1) which you would normally display?
If my understanding is correct, may be following could be helpful. 1. If your application always run in the background, you might want to manage your application state related information in RuntimeStore. Use RuntimeStore to store the state info when you changed application icon as per your business logic, then when user clicks on the application icon at Home screen, you can check the state info in RuntimeStore and do the needful. 2. If your application do not always run in background, you can apply the above #1 logic using PersistentStore instead of RuntimeStore.
I hope it would help.
Thanks, Sameer Nafdey.
精彩评论