Persist data across single app kiosk mode executions

断了今生、忘了曾经 提交于 2019-12-13 16:04:59

问题


When developing normal Chrome Apps, I use the Chrome storage API to persist key-value pairs across sessions. This works great, and I want to do the same for a Single App Kiosk Mode app to be deployed on managed Chrome devices. However, it seems that chrome.storage.local does not persist across executions of the app.

I wrote a test app illustrating this issue. Code here.


回答1:


note: this answer applies only to users of the Chrome Management Console

It turns out the issue had everything to do with a setting in the Chrome Management Console. Under Device Settings, the "User Data" option should be "Do not erase all local user data." I had set it to "Erase all local user data," which wiped out my localStorage with each reboot. I didn't look at that option closely since I figured Single App Kiosk Mode existed outside of a user session, so there was no user data to erase.



来源:https://stackoverflow.com/questions/30763720/persist-data-across-single-app-kiosk-mode-executions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!