Java Code Examples for com.taobao.weex.adapter.IWXUserTrackAdapter#commit()
The following examples show how to use
com.taobao.weex.adapter.IWXUserTrackAdapter#commit() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WXBridgeManager.java From ucar-weex-core with Apache License 2.0 | 6 votes |
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode, String errMsg) { WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId); if (instance == null || errCode == null) { return; } // TODO: We should move WXPerformance and IWXUserTrackAdapter // into a adapter level. // comment out the line below to prevent commiting twice. //instance.commitUTStab(WXConst.JS_BRIDGE, errCode, errMsg); IWXUserTrackAdapter adapter = WXSDKManager.getInstance().getIWXUserTrackAdapter(); if (adapter == null) { return; } WXPerformance performance = new WXPerformance(); performance.args=instance.getBundleUrl(); performance.errCode=errCode.getErrorCode(); if (errCode != WXErrorCode.WX_SUCCESS) { performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg); WXLogUtils.e("wx_monitor",performance.toString()); } adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams()); }
Example 2
Source File: WXBridgeManager.java From ucar-weex-core with Apache License 2.0 | 6 votes |
public void commitJSFrameworkAlarmMonitor(final String type, final WXErrorCode errorCode, String errMsg) { if (TextUtils.isEmpty(type) || errorCode == null) { return; } if (WXSDKManager.getInstance().getWXStatisticsListener() != null) { WXSDKManager.getInstance().getWXStatisticsListener().onException("0", errorCode.getErrorCode(), TextUtils.isEmpty(errMsg) ? errorCode.getErrorMsg() : errMsg); } final IWXUserTrackAdapter userTrackAdapter = WXSDKManager.getInstance().getIWXUserTrackAdapter(); if (userTrackAdapter == null) { return; } WXPerformance performance = new WXPerformance(); performance.errCode = errorCode.getErrorCode(); if (errorCode != WXErrorCode.WX_SUCCESS) { performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg); WXLogUtils.e("wx_monitor",performance.toString()); } userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null); }
Example 3
Source File: WXSoInstallMgrSdk.java From ucar-weex-core with Apache License 2.0 | 6 votes |
static void commit(IWXUserTrackAdapter utAdapter, String errCode, String errMsg) { if (mStatisticsListener != null) { mStatisticsListener.onException("0", errCode, errMsg); } if (utAdapter == null) { return; } if (errCode != null && errMsg != null) { WXPerformance p = new WXPerformance(); p.errCode = errCode; p.errMsg = errMsg; utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, p, null); } else { utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, null, null); } }
Example 4
Source File: WXBridgeManager.java From weex-uikit with MIT License | 5 votes |
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode, String errMsg) { WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId); IWXUserTrackAdapter adapter = WXSDKManager.getInstance().getIWXUserTrackAdapter(); if (instance == null || adapter == null || errCode == null) { return; } WXPerformance performance = new WXPerformance(); performance.args=instance.getBundleUrl(); performance.errCode=errCode.getErrorCode(); if (errCode != WXErrorCode.WX_SUCCESS) { performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg); WXLogUtils.e("wx_monitor",performance.toString()); } adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams()); }
Example 5
Source File: WXBridgeManager.java From weex-uikit with MIT License | 5 votes |
public void commitJSFrameworkAlarmMonitor(final String type, final WXErrorCode errorCode, String errMsg) { final IWXUserTrackAdapter userTrackAdapter = WXSDKManager.getInstance().getIWXUserTrackAdapter(); if (userTrackAdapter == null || TextUtils.isEmpty(type) || errorCode == null) { return; } WXPerformance performance = new WXPerformance(); performance.errCode = errorCode.getErrorCode(); if (errorCode != WXErrorCode.WX_SUCCESS) { performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg); WXLogUtils.e("wx_monitor",performance.toString()); } userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null); }
Example 6
Source File: WXSoInstallMgrSdk.java From weex-uikit with MIT License | 5 votes |
static void commit(IWXUserTrackAdapter utAdapter, String errCode, String errMsg) { if (utAdapter == null) { return; } if (errCode != null && errMsg != null) { WXPerformance p = new WXPerformance(); p.errCode = errCode; p.errMsg = errMsg; utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, p, null); } else { utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, null, null); } }
Example 7
Source File: WXSoInstallMgrSdk.java From weex with Apache License 2.0 | 5 votes |
static void commit(IWXUserTrackAdapter utAdapter, String errCode, String errMsg) { if (utAdapter == null) { return; } if (errCode != null && errMsg != null) { WXPerformance p = new WXPerformance(); p.errCode = errCode; p.errMsg = errMsg; utAdapter.commit(null, null, WXConst.ENVIRONMENT, p, null); } else { utAdapter.commit(null, null, WXConst.ENVIRONMENT, null, null); } }