@Override
    public void handlerScanUri(Activity activity, Uri uri) {
        if (ChannelUtils.hasUtmByMetaData(activity)) {
            showDialog(activity, SADisplayUtil.getStringResource(activity, R.string.sensors_analytics_ad_listener));
            return;
        }
        String monitorId = uri.getQueryParameter("monitor_id");
        if (TextUtils.isEmpty(monitorId)) {
            SensorsDataDialogUtils.startLaunchActivity(activity);
            return;
        }
        String url = SensorsDataAPI.sharedInstance().getServerUrl();
        if (TextUtils.isEmpty(url)) {
            showDialog(activity, SADisplayUtil.getStringResource(activity, R.string.sensors_analytics_ad_error_url));
            return;
        }
        ServerUrl serverUrl = new ServerUrl(url);
        String projectName = uri.getQueryParameter("project_name");
        if (serverUrl.getProject().equals(projectName)) {
            String projectId = uri.getQueryParameter("project_id");
            String accountId = uri.getQueryParameter("account_id");
            String isReLink = uri.getQueryParameter("is_relink");
            if ("1".equals(isReLink)) {//续连标识 1 :续连
                String deviceCode = uri.getQueryParameter("device_code");
                if (ChannelUtils.checkDeviceInfo(activity, deviceCode)) {//比较设备信息是否匹配
                    showChannelDebugActiveDialog(activity);
                } else {
                    showDialog(activity, SADisplayUtil.getStringResource(activity, R.string.sensors_analytics_ad_error_retry));
                }
            } else {
                showChannelDebugDialog(activity, serverUrl.getBaseUrl(), monitorId, projectId, accountId);
            }
        } else {
            showDialog(activity, SADisplayUtil.getStringResource(activity, R.string.sensors_analytics_ad_error_project));
        }
    }
@Test
    public void handlerScanUri() {
        Activity activity = new Activity();
        Uri uri = Uri.parse("567483abc://channeldebug/abc/bcd");
        Assert.assertTrue(SAAdvertScanHelper.scanHandler(activity, uri));
    }