use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class RouterModule method clearHomePage.
@JSMethod
public void clearHomePage() {
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
storageManager.setData(mWXSDKInstance.getContext(), Constant.SP.SP_HOMEPAGE_URL, "");
}
use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class SplashActivityProxy method initTabbar.
private void initTabbar(Activity activity) {
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
String bar = storageManager.getData(activity, Constant.SP.SP_TABBAR_JSON);
if (!TextUtils.isEmpty(bar)) {
PlatformConfigBean.TabBar bean = ManagerFactory.getManagerService(ParseManager.class).parseObject(bar, PlatformConfigBean.TabBar.class);
BMWXEnvironment.mPlatformConfig.setTabBar(bean);
}
}
use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class EventSetHomePage method setHomePage.
@SuppressWarnings("WrongConstant")
public void setHomePage(Context context, String params) {
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
storageManager.setData(context, Constant.SP.SP_HOMEPAGE_URL, params);
String homePage = BMWXEnvironment.mPlatformConfig.getPage().getHomePage(context);
RouterModel router = new RouterModel(homePage, Constant.ACTIVITIES_ANIMATION.ANIMATION_PUSH, null, null, false, null);
Intent intent = performStartActivity(router, DefaultRouterAdapter.getInstance().getPageCategory(context));
context.startActivity(intent);
// PendingIntent restartIntent = PendingIntent.getActivity(
// context.getApplicationContext(), 0, intent, Intent.FLAG_ACTIVITY_CLEAR_TASK);
// AlarmManager mgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
// mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100,
// restartIntent);
}
use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class EventGetData method getData.
public void getData(Context context, ArrayList<String> paramsList, JSCallback jscallback) {
String key = paramsList.get(0);
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
String result = storageManager.getData(context, key);
if (TextUtils.isEmpty(result)) {
JsPoster.postFailed(jscallback);
} else {
JsPoster.postSuccess(result, jscallback);
}
}
use of com.eros.framework.manager.StorageManager in project WeexErosFramework by bmfe.
the class EventGetData method getDataSync.
public Object getDataSync(Context context, ArrayList<String> list) {
String key = list.get(0);
StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
String result = storageManager.getData(context, key);
return result == null ? JsPoster.getFailed() : JsPoster.getSuccess(result);
}
Aggregations