0

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

Sali
  • 101
  • 1
  • 10
  • this description is terrible, and lacks proper grammar. Get it together, give A LOT more detail, and present relevant bits of code that you think may contain the problem. – deltree Feb 07 '12 at 18:32
  • Does the BB have some sort of registry/non-volatile storage where you can set this variable? Otherwise, deletion of the app is going to delete any application settings you have. – KevinDTimm Feb 07 '12 at 18:41
  • There is no problem. I check the saved boolean value and if value doesn't exist then I generate email and save the boolean into persistent storage. This work fine first time. But if we delete the app that doesn't delete the persistent storage and next install doesn't generate the notification. – Sali Feb 07 '12 at 18:43
  • KevinDTimm! I am looking something similar (non-volatile) as you suggested. – Sali Feb 07 '12 at 18:46

1 Answers1

1

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.

Richard
  • 8,920
  • 2
  • 18
  • 24