本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}