08-22-2012 05:45 AM - edited 08-22-2012 05:51 AM
I´m developing an application that print email and I want to put a menu item in the emails with the option 'Print with....'. I use this:
PrintByMenuItem myMenuitem = new PrintByMenuItem(0);
My application has two versions, with ads and without ads. When the user install the first version and then he want install the second version, the application will overwrite, and will have only one application in the device.
The problem is that, when I install the second version, the menu item 'Print with...' appear twice. How can I do to if a menu item exists in the email, doesn´t repeat the menuItem?
I´ve tried using removeMenuItem before to add menu item with:
but doesn´t work.
Solved! Go to Solution.
08-22-2012 06:53 AM
Does this happen on a device? Does the device reboot after you "upgrade" to the second version?
08-22-2012 07:02 AM
I´m in development phase, and I´m loading my app from Eclipse.
For example, in a Blackberry Bold, with OS 7.1, I´ve loaded the first version and then, without reboot the device, I´ve loaded the second version. The option 'Print with...' appears twice...
08-22-2012 07:18 AM
This is not how it would work in production/on device. Once the device reboots, the menu item will be removed from the repository and you will have one menu item.
However, if you exit your app and start again (if you register the menu items on startup of the app) the you will have duplications as well. If this is not the case, then you shouldn't have to worry.
If this is the case, then I suggest your store a runtime veriable as a check to ensure no duplication.
08-22-2012 07:31 AM
08-22-2012 07:34 AM
Yes, I´ve controlled the no duplication when I exit my app and start again.
And yes, I´ve seen that when I reboot the device the duplicate item disappears.
So, the question is: In production phase, when an user download my app with ads, install it, and then download the app without ads, and install it, the device will reboot automatically and doesn´t appears duplicate items?
08-22-2012 07:45 AM
08-22-2012 07:46 AM
simon_hain, if I store in runtime store, when this variable is deleted? When I delete my app?