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