Search in sources :

Example 1 with RouterManager

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

the class EventBack method back.

public void back(String params, Context context, JSCallback jscallback) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    boolean result = routerManager.back(context, params);
    if (jscallback != null) {
        jscallback.invoke(result ? WXConstant.BACK_PAGE_SUCCESS : WXConstant.BACK_PAGE_FAILED);
    }
}
Also used : RouterManager(com.benmu.framework.manager.impl.RouterManager)

Example 2 with RouterManager

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

the class EventCall method call.

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

Example 3 with RouterManager

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

the class EventFinish method finish.

public void finish(Context context, JSCallback jscallback) {
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    boolean result = routerManager.finish(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.benmu.framework.manager.impl.RouterManager)

Example 4 with RouterManager

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

the class EventOpen method open.

public void open(String params, Context context, List<JSCallback> callbacks) {
    JSCallback backCallback = null;
    JSCallback resultCallback = null;
    if (callbacks.size() > 1) {
        backCallback = callbacks.get(0);
        resultCallback = callbacks.get(1);
    } else if (callbacks.size() > 0) {
        backCallback = callbacks.get(0);
    }
    RouterManager routerManager = ManagerFactory.getManagerService(RouterManager.class);
    boolean result = routerManager.open(context, params, backCallback);
    if (resultCallback != null) {
        resultCallback.invoke(result ? WXConstant.OPEN_PAGE_SUCCESS : WXConstant.OPNE_PAGE_FAILED);
    }
}
Also used : RouterManager(com.benmu.framework.manager.impl.RouterManager) JSCallback(com.taobao.weex.bridge.JSCallback)

Example 5 with RouterManager

use of com.benmu.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.benmu.framework.manager.impl.RouterManager)

Aggregations

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