Search in sources :

Example 1 with CallPhoneBean

use of com.benmu.framework.model.CallPhoneBean in project WeexErosFramework by bmfe.

the class DefaultRouterAdapter method dialing.

public void dialing(final Context context, String params) {
    ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
    CallPhoneBean callPhone = null;
    callPhone = parseManager.parseObject(params, CallPhoneBean.class);
    if (callPhone == null) {
        callPhone = new CallPhoneBean();
        callPhone.to = "110";
    }
    if (TextUtils.isEmpty(callPhone.to) || context == null)
        return;
    final String finalPhone = callPhone.to;
    if (!callPhone.tip) {
        callPhone(String.valueOf(finalPhone), context);
    } else {
        ModalManager.BmAlert.showAlert(context, null, String.valueOf(finalPhone), "呼叫", new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface dialog, int which) {
                callPhone(String.valueOf(finalPhone), context);
                dialog.dismiss();
            }
        }, "取消", null, null, null);
    }
}
Also used : CallPhoneBean(com.benmu.framework.model.CallPhoneBean) DialogInterface(android.content.DialogInterface) ParseManager(com.benmu.framework.manager.impl.ParseManager)

Aggregations

DialogInterface (android.content.DialogInterface)1 ParseManager (com.benmu.framework.manager.impl.ParseManager)1 CallPhoneBean (com.benmu.framework.model.CallPhoneBean)1