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


Java FREObject.setProperty方法代码示例

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


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

示例1: call

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

    DownloadProgressInfo info = XAPKContext.client.info;

    String speed = Helpers.getSpeedString(info.mCurrentSpeed);
    String remaining = Helpers.getTimeRemaining(info.mTimeRemaining);

    FREObject result = null;
    try {
        result = FREObject.newObject("eu.alebianco.air.extensions.expansion.vo.ProgressInfo", null);
        result.setProperty("bytesTotal", FREObject.newObject((int) info.mOverallTotal));
        result.setProperty("bytesLoaded", FREObject.newObject((int) info.mOverallProgress));
        result.setProperty("speed", FREObject.newObject(speed));
        result.setProperty("remaining", FREObject.newObject(remaining));
    } catch (Exception e) {
        FREUtils.logEvent(context, LogLevel.FATAL, "Can't convert data to ProgressInfo. [%s: %s]", e.getClass(), e.getMessage());
    }

    return result;
}
 
开发者ID:alebianco,项目名称:ANE-Android-Expansion,代码行数:22,代码来源:GetDownloadProgress.java

示例2: call

import com.adobe.fre.FREObject; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext arg0, FREObject[] arg1)
{	
	try
	{
		FREObject sku = arg1[0];
		FREObject res = FREObject.newObject("com.pozirk.payment.android.InAppSkuDetails", null);
		
		SkuDetails skuDetails = Billing.getInstance().getSKuDetails(sku.getAsString());
		
		if(skuDetails != null)
		{
			res.setProperty("_sku", FREObject.newObject(skuDetails.getSku()));
			res.setProperty("_type", FREObject.newObject(skuDetails.getType()));
			res.setProperty("_price", FREObject.newObject(skuDetails.getPrice()));
			res.setProperty("_title", FREObject.newObject(skuDetails.getTitle()));
			res.setProperty("_descr", FREObject.newObject(skuDetails.getDescription()));
			
			return res;
		}
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
	
	return null;
}
 
开发者ID:pozirk,项目名称:AndroidInAppPurchase,代码行数:29,代码来源:GetSkuDetailsFunction.java

示例3: call

import com.adobe.fre.FREObject; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext arg0, FREObject[] arg1)
{	
	try
	{
		FREObject sku = arg1[0];
		FREObject res = FREObject.newObject("com.pozirk.payment.android.InAppPurchaseDetails", null);
		
		Purchase purchase = Billing.getInstance().getPurchaseDetails(sku.getAsString());
		
		if(purchase != null)
		{
			res.setProperty("_type", FREObject.newObject(purchase.getItemType()));
			res.setProperty("_orderId", FREObject.newObject(purchase.getOrderId()));
			res.setProperty("_packageName", FREObject.newObject(purchase.getPackageName()));
			res.setProperty("_sku", FREObject.newObject(purchase.getSku()));
			res.setProperty("_time", FREObject.newObject(purchase.getPurchaseTime()));
			res.setProperty("_purchaseState", FREObject.newObject(purchase.getPurchaseState()));
			res.setProperty("_payload", FREObject.newObject(purchase.getDeveloperPayload()));
			res.setProperty("_token", FREObject.newObject(purchase.getToken()));
			res.setProperty("_json", FREObject.newObject(purchase.getOriginalJson()));
			res.setProperty("_signature", FREObject.newObject(purchase.getSignature()));
			
			return res;
		}
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
	
	return null;
}
 
开发者ID:pozirk,项目名称:AndroidInAppPurchase,代码行数:34,代码来源:GetPurchaseDetailsFunction.java


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