public static void trackJPushOpenActivity(Intent intent) {

        if (intent == null) {
            return;
        }

        if (!isTrackPushEnabled()) return;

        String data = null;
        //获取华为平台附带的 jpush 信息
        if (intent.getData() != null) {
            data = intent.getData().toString();
        }

        //获取除华为平台附带的 jpush 信息
        if (TextUtils.isEmpty(data) && intent.getExtras() != null) {
            data = intent.getExtras().getString("JMessageExtra");
        }
        SALog.i(TAG, "trackJPushOpenActivity is called, Intent data is " + data);
        if (TextUtils.isEmpty(data)) return;
        try {
            JSONObject jsonObject = null;
            try {
                jsonObject = new JSONObject(data);
            } catch (Exception e) {
                SALog.i(TAG, "Failed to construct JSON");
            }
            if (jsonObject != null) {
                String title = jsonObject.optString("n_title");
                String content = jsonObject.optString("n_content");
                String extras = jsonObject.optString("n_extras");
                byte whichPushSDK = (byte) jsonObject.optInt("rom_type");
                String appPushChannel = PushUtils.getJPushSDKName(whichPushSDK);
                SALog.i(TAG, String.format("trackJPushOpenActivity is called, title is %s, content is %s," +
                        " extras is %s, appPushChannel is %s", title, content, extras, appPushChannel));
                if (TextUtils.isEmpty(title) || TextUtils.isEmpty(content) || TextUtils.isEmpty(appPushChannel)) {
                    return;
                }
                String sfData = getSFData(extras);
                trackNotificationOpenedEvent(sfData,
                        title,
                        content,
                        "JPush",
                        appPushChannel);
            }
        } catch (Exception e) {
            SALog.printStackTrace(e);
        }
    }
@Test
    public void trackJPushOpenActivity() throws InterruptedException {
        SensorsDataAPI sensorsDataAPI = SAHelper.initSensors(mApplication);
        final CountDownLatch countDownLatch = new CountDownLatch(1);
        sensorsDataAPI.setTrackEventCallBack(new SensorsDataTrackEventCallBack() {
            @Override
            public boolean onTrackEvent(String eventName, JSONObject eventProperties) {
                assertEquals("$AppPushClick", eventName);
                assertEquals("mock_title", eventProperties.optString("$app_push_msg_title"));
                assertEquals("mock_content", eventProperties.optString("$app_push_msg_content"));
                assertEquals("JPush", eventProperties.optString("$app_push_service_name"));
                countDownLatch.countDown();
                return true;
            }
        });
        try {
            Thread.sleep(1000);
            Robolectric.getForegroundThreadScheduler().advanceTo(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        PushAutoTrackHelper.trackJPushOpenActivity(MockDataTest.mockJPushIntent());
        countDownLatch.await(1000, TimeUnit.MILLISECONDS);
    }