ibm-mobilefirstuser-preferences

Save User Preferences in MobileFirst 7.1 Hybrid App


I have developed a Hybrid Mobile App using MobileFirst 7.1 and now I want to ask user about how they like the app. My app displays alert with 3 buttons which display "Not Now", "Rate It" and "Never". Depending upon the option they select, I want to save the user preferences locally in the devices(Android or iOS) so that according to the selected option I can control the alert. How can I achieve this?


Solution

  • Your use case is similar to this question, and the solution I would recommend is the same. Data that you want to save persistently on the client device (such as user preferences) could be saved in JSONStore documents. These are stored locally, and will persist across executions of the application.