You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is possible. At least from Android. There is a LocalStorage public class in Cobalt that you can use.
On iOS it's not available but you can easily add the "setItem", "getItem", "removetItem", and "clear" events in cobalt init, and forward the parameters to cobalt.storage.getItem, cobalt.storage.setItem and so on.
here is a quick untested example :
cobalt.init({
events:{
"setItem":function(data, callback){
cobalt.storage.setItem(data.key, data.value, data.type)
},
"getItem":function(data, callback){
if (callback){
cobalt.sendCallback( callback, { value : cobalt.storage.getItem(data.key, data.type)} )
}
}
}
//and so on...
});
Hi Guys!
It could be really cool to access to cobalt.storage, but from the native part to get/store config vars, etc.
The text was updated successfully, but these errors were encountered: