Search code examples
blackberryblackberry-jde

How to first time installation?


I have very strange requirement. I have to generate notification (email) when user installs the application on the blackberry device. I have implemented Boolean and save that value in persistent storage with application version.

Also I have to generate the notification even if users deletes and installs the same app (same version) again. But I don't need to generate the notification if device reboots.

Note: Application is a service.

Salman


Solution

  • If you want the persistent store of an application to be deleted when the application is, then you need to use a Pesistable object that is defined in the application. in this case some thing like:

    public class DetectMyApplicationInstallation extends Object implements Persistable {
        public boolean installed;
        public String  version;
    }
    

    should do the trick. Enhance it to suit your needs.