当前位置: 首页>>代码示例>>Java>>正文


Java FREWrongThreadException类代码示例

本文整理汇总了Java中com.adobe.fre.FREWrongThreadException的典型用法代码示例。如果您正苦于以下问题:Java FREWrongThreadException类的具体用法?Java FREWrongThreadException怎么用?Java FREWrongThreadException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FREWrongThreadException类属于com.adobe.fre包,在下文中一共展示了FREWrongThreadException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args){
    UsbContext usbCtx = (UsbContext) ctx;
    ArrayList<UsbAccessory> accessories = usbCtx.usbAccessories();
    Iterator<UsbAccessory> accessoryIterator = accessories.iterator();
    JSONArray jsonArray = new JSONArray();
    while (accessoryIterator.hasNext()) {
        UsbAccessory accessory = accessoryIterator.next();
        JSONObject jsonObject = new JSONObject();
        UsbEvent.addUsbToJson(accessory, jsonObject);
        jsonArray.put(jsonObject);
    }
    try{
        return FREObject.newObject(jsonArray.toString());
    }catch(FREWrongThreadException e){
    }
    return null;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:18,代码来源:GetAccessoriesFunction.java

示例2: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args){
    UsbContext usbCtx = (UsbContext) ctx;
    Iterator<UsbDevice> deviceIterator = usbCtx.usbDevices().iterator();
    JSONArray jsonArray = new JSONArray();
    while (deviceIterator.hasNext()) {
        UsbDevice device = deviceIterator.next();
        JSONObject jsonObject = new JSONObject();
        UsbEvent.addUsbToJson(device, jsonObject);
        jsonArray.put(jsonObject);
    }
    try{
        return FREObject.newObject(jsonArray.toString());
    }catch(FREWrongThreadException e){
    }
    return null;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:17,代码来源:GetDevicesFunction.java

示例3: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call( FREContext context, FREObject[] args ) {
	super.call( context, args );

	AIR.log( "FaceDetection::isOperational" );

	Activity activity = AIR.getContext().getActivity();

	FaceDetector.Builder fb = new FaceDetector.Builder( activity.getApplicationContext() );
	final FaceDetector detector = fb.build();
	try {
		return FREObject.newObject( detector.isOperational() );
	} catch( FREWrongThreadException e ) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:marpies,项目名称:face-detection-ane,代码行数:19,代码来源:IsOperationalFunction.java

示例4: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call(FREContext arg0, FREObject[] arg1) {
	
	Extension.context.createHelperIfNeeded(arg0.getActivity());
	Player player = Games.Players.getCurrentPlayer(Extension.context.getApiClient());
	
	FREObject playerName = null;
	if (player != null)
	{
		try {
			playerName = FREObject.newObject(player.getDisplayName());
		} catch (FREWrongThreadException e) {
			e.printStackTrace();
		}
	}
	
	return playerName;
}
 
开发者ID:freshplanet,项目名称:ANE-Google-Play-Game-Services,代码行数:19,代码来源:AirGooglePlayGamesGetActivePlayerName.java

示例5: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call( FREContext context, FREObject[] args ) {
	super.call( context, args );

	AIR.log( "GameServices::isAuthenticated" );
	try {
		return FREObject.newObject( GameServicesHelper.getInstance().isAuthenticated() );
	} catch( FREWrongThreadException e ) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:marpies,项目名称:game-services-ane,代码行数:14,代码来源:IsAuthenticatedFunction.java

示例6: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call( FREContext context, FREObject[] args ) {
	super.call( context, args );

	try {
		return FREObject.newObject( GameServicesHelper.checkPlayServices( AIR.getContext().getActivity() ) );
	} catch( FREWrongThreadException e ) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:marpies,项目名称:game-services-ane,代码行数:13,代码来源:IsSupportedFunction.java

示例7: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args) {
    FREObject ret = null;
    UsbContext usbCtx = (UsbContext) ctx;
    usbCtx.clear();
    try {
        ret = FREObject.newObject(true);
    } catch (FREWrongThreadException e) {
    }
    return ret;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:11,代码来源:ClearFunction.java

示例8: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args){
    FREObject ret = null;
    UsbContext usbCtx = (UsbContext) ctx;
    usbCtx.startListen();
    try{
        ret = FREObject.newObject(true);
    }catch (FREWrongThreadException e){
    }
    return ret;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:11,代码来源:StartListenFunction.java

示例9: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args){
    FREObject ret = null;
    UsbContext usbCtx = (UsbContext) ctx;
    usbCtx.stopListen();
    try{
        ret = FREObject.newObject(true);
    }catch (FREWrongThreadException e){
    }
    return ret;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:11,代码来源:StopListenFunction.java

示例10: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
public FREObject call(FREContext ctx, FREObject[] args){
    FREObject ret = null;
    UsbContext usbCtx = (UsbContext) ctx;
    try{
        ret = FREObject.newObject(usbCtx.debugStatus);
    }catch (FREWrongThreadException e){
    }
    return ret;
}
 
开发者ID:GIGATeam,项目名称:UsbExtension,代码行数:10,代码来源:GetDebugStatusFunction.java

示例11: getBitmap

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
/**
 * Switch color channels
 * http://stackoverflow.com/questions/17314467/bitmap-channels-order-different-in-android
 */
public static Bitmap getBitmap( FREBitmapData bitmapData ) throws FREWrongThreadException, FREInvalidObjectException {
	bitmapData.acquire();
	Bitmap bitmap = Bitmap.createBitmap( bitmapData.getWidth(), bitmapData.getHeight(), Bitmap.Config.ARGB_8888 );
	Canvas canvas = new Canvas( bitmap );
	Paint paint = new Paint();
	paint.setColorFilter( mColorFilter );
	bitmap.copyPixelsFromBuffer( bitmapData.getBits() );
	bitmapData.release();
	canvas.drawBitmap( bitmap, 0, 0, paint );
	return bitmap;
}
 
开发者ID:marpies,项目名称:face-detection-ane,代码行数:16,代码来源:BitmapDataUtils.java

示例12: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call( FREContext context, FREObject[] args ) {
	super.call( context, args );

	AIR.log( "FaceDetection::isAvailable" );
	Activity activity = AIR.getContext().getActivity();

	try {
		return FREObject.newObject( checkPlayServices( activity ) );
	} catch( FREWrongThreadException e ) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:marpies,项目名称:face-detection-ane,代码行数:16,代码来源:IsAvailableFunction.java

示例13: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call( FREContext context, FREObject[] args ) {
	super.call( context, args );

	try {
		return FREObject.newObject( VKSdkVersion.SDK_VERSION );
	} catch( FREWrongThreadException e ) {
		e.printStackTrace();
	}

	return null;
}
 
开发者ID:marpies,项目名称:vk-ane,代码行数:13,代码来源:GetSDKVersion.java

示例14: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call(FREContext context, FREObject[] args) 
{
	FREObject result;
	
	String message = "Device was not registered with GCM.";
	
	Log.i("GCMExtension", "checking device registration");
	
	GCMRegistrar.checkDevice(context.getActivity().getApplication());
	
	final String regId = GCMRegistrar.getRegistrationId(context.getActivity().getApplication());
       
	if (!regId.equals("")) 
       {
		GCMRegistrar.unregister(context.getActivity().getApplication());
		message = "GCMServer: Unregistering device from GCM server...";
       }
   
	
	try 
	{
		result = FREObject.newObject(message);
		return result;
	} 
	catch (FREWrongThreadException e) 
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	return null;
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:34,代码来源:GCMPushUnregisterFunction.java

示例15: call

import com.adobe.fre.FREWrongThreadException; //导入依赖的package包/类
@Override
public FREObject call(FREContext context, FREObject[] args) 
{
	FREObject result;
	
	Log.i("GCMExtension", "Checking pending messages...");
	
	String message = "false";
	Intent launchIntent = context.getActivity().getIntent();
  
	if(launchIntent != null)
     	{
     		Bundle ex = launchIntent.getExtras();
     		if(ex != null)
     		{
     			message = launchIntent.getStringExtra("data");
     		}
     	}
	
	try 
	{
		result = FREObject.newObject(message);
		return result;
	} 
	catch (FREWrongThreadException e) 
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	return null;
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:33,代码来源:GCMInitFunction.java


注:本文中的com.adobe.fre.FREWrongThreadException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。