Search in sources :

Example 6 with RouterManager

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

the class EventOpenBrowser method openBrowser.

public void openBrowser(Context context, String params, JSCallback callback) {
    RouterManager managerService = ManagerFactory.getManagerService(RouterManager.class);
    boolean b = managerService.openBrowser(context, params);
    if (b) {
        JsPoster.postSuccess(null, callback);
    } else {
        JsPoster.postFailed(callback);
    }
}
Also used : RouterManager(com.eros.framework.manager.impl.RouterManager)

Example 7 with RouterManager

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

the class EventGetParams method getParams.

public void getParams(Context context, JSCallback jscallback) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    RouterModel routerModel = routerManager.getParams(context);
    if (routerModel != null && jscallback != null) {
        jscallback.invoke(routerModel.params);
    }
}
Also used : RouterManager(com.eros.framework.manager.impl.RouterManager) RouterModel(com.eros.framework.model.RouterModel)

Example 8 with RouterManager

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

the class EventOpen method open.

public void open(String params, Context context) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    routerManager.open(context, params, null);
}
Also used : RouterManager(com.eros.framework.manager.impl.RouterManager)

Example 9 with RouterManager

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

the class EventOpen method open.

public void open(String params, Context context, JSCallback backCallback) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    routerManager.open(context, params, backCallback);
}
Also used : RouterManager(com.eros.framework.manager.impl.RouterManager)

Example 10 with RouterManager

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

the class EventRefresh method refresh.

public void refresh(Context context, JSCallback jscallback) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    boolean result = routerManager.refresh(context);
// if (activity != null && activity instanceof AbsWeexActivity) {
// AbsWeexActivity target = (AbsWeexActivity) activity;
// if (target.mUrl != null) {
// target.refresh();
// if (jscallback != null) {
// BaseResultBean bean = new BaseResultBean();
// bean.resCode = 0;
// bean.msg = activity.getClass().getSimpleName() + "刷新成功";
// jscallback.invoke(bean);
// }
// }
// }
}
Also used : RouterManager(com.eros.framework.manager.impl.RouterManager)

Aggregations

RouterManager (com.eros.framework.manager.impl.RouterManager)11 RouterModel (com.eros.framework.model.RouterModel)2 JSCallback (com.taobao.weex.bridge.JSCallback)1