本文整理汇总了Java中com.taobao.weex.WXSDKInstance.callNativeTime方法的典型用法代码示例。如果您正苦于以下问题:Java WXSDKInstance.callNativeTime方法的具体用法?Java WXSDKInstance.callNativeTime怎么用?Java WXSDKInstance.callNativeTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.WXSDKInstance
的用法示例。
在下文中一共展示了WXSDKInstance.callNativeTime方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: callNative
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
public int callNative(String instanceId, String tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callNative(instanceId, tasks, callback);
}catch (Throwable e){
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callNative throw exception:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
if(WXEnvironment.isApkDebugable()){
if(errorCode == IWXBridge.DESTROY_INSTANCE){
WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
}
}
return errorCode;
}
示例2: callCreateBody
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
public int callCreateBody(String instanceId, String tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callCreateBody(instanceId, tasks, callback);
}catch (Throwable e){
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callCreateBody throw exception:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例3: callUpdateFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
*
* @param instanceId
* @param tasks
* @param callback
*/
public int callUpdateFinish(String instanceId, byte [] tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callUpdateFinish(instanceId, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callCreateBody throw exception:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例4: callCreateFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
*
* @param instanceId
* @param tasks
* @param callback
*/
public int callCreateFinish(String instanceId, byte [] tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callCreateFinish(instanceId, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callCreateFinish throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例5: callRefreshFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
*
* @param instanceId
* @param tasks
* @param callback
*/
public int callRefreshFinish(String instanceId, byte [] tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callRefreshFinish(instanceId, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callCreateFinish throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例6: callUpdateAttrs
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
*
* @param instanceId
* @param tasks
* @param callback
*/
public int callUpdateAttrs(String instanceId, String ref, byte [] tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callUpdateAttrs(instanceId, ref, new String(tasks), callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callUpdateAttrs throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例7: callUpdateStyle
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
*
* @param instanceId
* @param tasks
* @param callback
*/
public int callUpdateStyle(String instanceId, String ref, byte [] tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callUpdateStyle(instanceId, ref, new String(tasks), callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callUpdateStyle throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例8: callRemoveElement
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
* @param instanceId
* @param ref
* @param callback
* @return int
*/
public int callRemoveElement(String instanceId, String ref, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callRemoveElement(instanceId, ref, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callRemoveElement throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例9: callMoveElement
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
* @param instanceId
* @param ref
* @param parentref
* @param index
* @param callback
* @return int
*/
public int callMoveElement(String instanceId, String ref, String parentref, String index, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
// Integer.parseInt(index)
errorCode = WXBridgeManager.getInstance().callMoveElement(instanceId, ref, parentref, index, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callMoveElement throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例10: callAddEvent
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
* @param instanceId
* @param ref
* @param event
* @param callback
* @return int
*/
public int callAddEvent(String instanceId, String ref, String event, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callAddEvent(instanceId, ref, event, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callAddEvent throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例11: callRemoveEvent
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JavaScript uses this methods to call Android code
* @param instanceId
* @param ref
* @param event
* @param callback
* @return int
*/
public int callRemoveEvent(String instanceId, String ref, String event, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callRemoveEvent(instanceId, ref, event, callback);
} catch (Throwable e) {
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
WXLogUtils.e(TAG,"callRemoveEvent throw exception:" + e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
return errorCode;
}
示例12: callNative
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
public int callNative(String instanceId, String tasks, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callNative(instanceId, tasks, callback);
}catch (Throwable e){
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
e.printStackTrace();
WXLogUtils.e(TAG,"callNative throw exception:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
if(WXEnvironment.isApkDebugable()){
if(errorCode == IWXBridge.DESTROY_INSTANCE){
WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
}
}
return errorCode;
}
示例13: callAddElement
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
public int callAddElement(String instanceId, String ref,String dom,String index, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callAddElement(instanceId, ref,dom,index, callback);
}catch (Throwable e){
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
e.printStackTrace();
WXLogUtils.e(TAG,"callNative throw expection:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
if(WXEnvironment.isApkDebugable()){
if(errorCode == IWXBridge.DESTROY_INSTANCE){
WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
}
}
return errorCode;
}
示例14: callAddElement
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* JSF render Node by callAddElement
*/
public int callAddElement(String instanceId, String ref,String dom,String index, String callback) {
long start = System.currentTimeMillis();
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if(instance != null) {
instance.firstScreenCreateInstanceTime(start);
}
int errorCode = IWXBridge.INSTANCE_RENDERING;
try {
errorCode = WXBridgeManager.getInstance().callAddElement(instanceId, ref,dom,index, callback);
}catch (Throwable e){
//catch everything during call native.
if(WXEnvironment.isApkDebugable()){
e.printStackTrace();
WXLogUtils.e(TAG,"callNative throw error:"+e.getMessage());
}
}
if(instance != null) {
instance.callNativeTime(System.currentTimeMillis() - start);
}
if(WXEnvironment.isApkDebugable()){
if(errorCode == IWXBridge.DESTROY_INSTANCE){
WXLogUtils.w("destroyInstance :"+instanceId+" JSF must stop callNative");
}
}
return errorCode;
}