We have requirement to display user agreement when first time user downloads the application. Is there any event or method that is invoked only one time when the application is downloaded. Any suggestion will be appreciated.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is no such "first time only" method provided by the MobileFirst Platform.
What I would suggest for your requirement would to persistently store the acceptance of the user agreement in a JSONStore document. When you start the app, query the JSONStore to see if it's previously been recorded that the user agreement was accepted, and if not, then present the agreement and don't allow the user to proceed in the app until the agreement is accepted. Then, of course, once the agreement is accepted, record that fact in a JSONStore document, and start the application's normal flow.
标签:
ibm-mobilefirst