package com.mayi.fastdevelop.map;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.gc.call.CallImmediatelyHandlerTarget;
import com.gc.call.CallParticipationBean;
import com.gc.call.CallReturnBean;
import com.mayi.fastdevelop.comnon.RequestCode;

//跳转地图定位页
public class GoMapLocationCallTarget extends CallImmediatelyHandlerTarget {
    @Override
    public String getTag() {
        return "map_goMapLocation";
    }

    @Override
    public CallReturnBean onHandle(CallParticipationBean bean) {
        Context context = bean.getContext();
        if (context != null) {
            Intent intent = new Intent(context, MapLocationActivity.class);
            if (context instanceof Activity) {
                ((Activity) context).startActivityForResult(intent,
                        RequestCode.MAP_LOCATION_ACTIVITY_RESULTCODE);
            }
        }
        return null;
    }
}
