Search code examples
ibm-mobilefirstworklight-serverworklight-security

How to delete details of user from database when he uninstall the app


I Created an Hybrid App using IBM worklight. i was able to store all the details when he install the app.

Like device Id,Name,PhoneNumber,Date and Time when he Installed....

How can I delete is details when he unistall the app from mobile Is there any feature


Solution

  • Worklight does not (and cannot) provide an API to do this for you.

    However, what you could do is run on your database a routine that will check for apps that did not attempt to connect to the Worklight Server for, say, 180 days amount of days. If the limit has been reached - delete the app records from the database.

    This is of course not bullet-proof because a user may want to use the app on the 181 day...

    You can check for this by using WL.Logger.logActivity and sample the table where this data is saved for the checking.