相关疑难解决方法(0)

当应用停止使用Sencha Touch 2.2和Phonegap时,LocalStorage商店不会在Android手机上保留

这在我的浏览器中工作正常,但当我在手机上安装应用程序并使用它...它看起来很好直到我强制它停止并重新打开应用程序然后我的所有记录都消失了.

我使用2.2和Phonegap ....任何帮助将非常感激.这是我的商店:

Ext.define('MyApp.store.Presentations', {
    extend: 'Ext.data.Store',

    config: {
        model: 'MyApp.model.Presentations',
        sorter: 'title',
        grouper: function (record) {
            var upperCased = record.get('title')[0].toUpperCase();
            return upperCased; //First letter of the title - how we GROUP these
        },
        autoLoad: true,
        proxy: {
            type: 'localstorage',
            id: 'presentations'
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

我这样保存:

var newPresentation = { title: prezTitle, content: '' };
            Ext.getStore('Presentations').add(newPresentation);
            var newRecord = Ext.getStore('Presentations').sync();
Run Code Online (Sandbox Code Playgroud)

android local-storage sencha-touch-2 cordova

2
推荐指数
1
解决办法
2827
查看次数

标签 统计

android ×1

cordova ×1

local-storage ×1

sencha-touch-2 ×1