Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 455
Registered: ‎03-04-2011
My Device: Paper cup
Accepted Solution

Distributing updates to apps with a library

[ Edited ]

Been having a problem updating an app that has part of its classes in a library of public classes for add-ons.

 

After minor changes to the app, the JAD-based update fails with 907 saying the library is incompatible with data already stored on the device.

 

So what to tell a customer?  "Please delete the app first, then install the update."

 

But... deleting the app does not delete the library, just the app.

 

Next?  "Please go into Options/Modules and delete the library module."

 

But... it does not have a Delete button.

 

 

So what is someone supposed to do when updating an app that includes a library?

 

You can't replace what's there.  And you can't delete what's there.

 

 

edit:  After more attempts, there really seems to be no way to delete the library.  I deleted everything that references it, it's sitting there alone and there's no way to delete or replace it.

 

WHY?   THE USERS HAVE TO WIPE THEIR PHONES JUST FOR A MINOR UPDATE?

 

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Distributing updates to apps with a library

[ Edited ]

My experience is that if the Library was installed with the app in the same jad, then the delete will remove it.

 

If the Library is used by multiple applications, that might be why you can't remove it.  You possibly have to remove all apps that say they are dependent on the Library.

 

But probably the correct solution is to update the Library in a way that is compatible with the current app, so that all the interfaces remain and the persisted data is not changed.  Which of these do you think is causing your Library update to fail. 

 

javaloader can probably delete the cod file to, if you can get hold of the phone. 

Developer
Posts: 455
Registered: ‎03-04-2011
My Device: Paper cup

Re: Distributing updates to apps with a library

For some reason it wasn't happening automatically, even after all items dependent on it had been deleted.

 

I just added a "Delete Me!" menu item to the app that does a CodeModuleManager.deleteModuleEx() for every module with the force-delete option.

 

When my pre-release testing indicates there will be an issue replacing the library, I'll add instructions to the release notes to use the app's self-deletion option first, then install the update.