Search in sources :

Example 11 with StorageManager

use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.

the class EventSetData method setDataSync.

public Object setDataSync(Context context, ArrayList<String> paramsList) {
    StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
    String key = paramsList.get(0);
    String value = paramsList.get(1);
    boolean result = storageManager.setData(context, key, value);
    return result ? JsPoster.getSuccess() : JsPoster.getFailed("存储失败");
}
Also used : StorageManager(com.eros.framework.manager.StorageManager)

Example 12 with StorageManager

use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.

the class EventDeleteData method deleteData.

public void deleteData(Context context, ArrayList<String> paramsList, JSCallback jscallback) {
    String key = paramsList.get(0);
    StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
    boolean result = storageManager.deleteData(context, key);
    if (result) {
        JsPoster.postSuccess(null, jscallback);
    } else {
        JsPoster.postFailed("删除" + key + "失败", jscallback);
    }
}
Also used : StorageManager(com.eros.framework.manager.StorageManager)

Aggregations

StorageManager (com.eros.framework.manager.StorageManager)12 Context (android.content.Context)1 Intent (android.content.Intent)1 ParseManager (com.eros.framework.manager.impl.ParseManager)1 PlatformConfigBean (com.eros.framework.model.PlatformConfigBean)1 RouterModel (com.eros.framework.model.RouterModel)1 JSMethod (com.taobao.weex.annotation.JSMethod)1