本文整理汇总了Java中com.adobe.fre.FREContext.dispatchStatusEventAsync方法的典型用法代码示例。如果您正苦于以下问题:Java FREContext.dispatchStatusEventAsync方法的具体用法?Java FREContext.dispatchStatusEventAsync怎么用?Java FREContext.dispatchStatusEventAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.adobe.fre.FREContext
的用法示例。
在下文中一共展示了FREContext.dispatchStatusEventAsync方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext context, FREObject[] args) {
Logger.d("AppKeyANEnative.checkAccess Called (java side)");
ANEcontext aneContext = null;
AppKeyChecker akc = null;
try {
aneContext = (ANEcontext)context;
akc = aneContext._AppKeyChecker;
akc.checkAccess(new AppKeyCallback(context));
} catch (Exception e) {
context.dispatchStatusEventAsync(ANEevents.CHECKACCESS_FAILED, e.getMessage());
e.printStackTrace();
}
return null;
}
示例2: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
String app_name = "";
try {
app_name = freObjects[0].getAsString();
}catch (Exception e) {
//something bad happened
}
if(SystemCalls.uninstallApplication(freContext, app_name)){
freContext.dispatchStatusEventAsync(PackageManagerEvents.SUCCESS_UNINSTALL_APP, app_name);
} else {
freContext.dispatchStatusEventAsync(PackageManagerEvents.ERROR_UNINSTALL_APP, app_name);
}
return null;
}
示例3: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
String app_name = "";
try {
app_name = freObjects[0].getAsString();
}catch (Exception e) {
//something bad happened
}
if(SystemCalls.installApplication(freContext, app_name)){
freContext.dispatchStatusEventAsync(PackageManagerEvents.SUCCESS_INSTALL_APP, app_name);
} else {
freContext.dispatchStatusEventAsync(PackageManagerEvents.ERROR_INSTALL_APP, app_name);
}
return null;
}
示例4: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
String app_path = "";
try {
app_path = freObjects[0].getAsString();
}catch (Exception e) {
//something bad happened
}
if(SystemCalls.installApplication(freContext, app_path)){
freContext.dispatchStatusEventAsync(PackageManagerEvents.SUCCESS_INSTALL_APP, app_path);
} else {
freContext.dispatchStatusEventAsync(PackageManagerEvents.ERROR_INSTALL_APP, app_path);
}
return null;
}
示例5: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
String app_name = "";
String json_params = "{}";
try {
app_name = freObjects[0].getAsString();
json_params = freObjects[1].getAsString();
}catch (Exception e) {
//something bad happened
}
if(SystemCalls.runApplication(freContext, app_name, json_params)){
freContext.dispatchStatusEventAsync(PackageManagerEvents.SUCCESS_RUN_APP, app_name);
} else {
freContext.dispatchStatusEventAsync(PackageManagerEvents.ERROR_RUN_APP, app_name);
}
return null;
}
示例6: onRecoverableError
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public boolean onRecoverableError(Context context, String errorId)
{
FREContext freContext = GCMPushExtension.context;
freContext.dispatchStatusEventAsync("recoverableError", errorId);
return super.onRecoverableError(context, errorId);
}
示例7: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext context, FREObject[] args) {
try {
Intent launchIntent = context.getActivity().getIntent();
Intent notificationIntent = new Intent(context.getActivity(), context.getActivity().getClass());
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
notificationIntent.setAction(launchIntent.getAction());
if (launchIntent.getCategories() != null) {
for (String category : launchIntent.getCategories()) {
notificationIntent.addCategory(category);
}
}
PendingIntent pendingIntent = PendingIntent.getActivity(context.getActivity(), 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
int startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(context.getActivity(), pendingIntent, XAPKDownloaderService.class);
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
XAPKContext.stub = DownloaderClientMarshaller.CreateStub(XAPKContext.client, XAPKDownloaderService.class);
XAPKContext.stub.connect(context.getActivity());
return null;
} else {
context.dispatchStatusEventAsync(DownloadEventCode.COMPLETE.getName(), StatusEventLevel.DOWNLOAD.getName());
}
} catch (NameNotFoundException e) {
FREUtils.logEvent(context, LogLevel.FATAL, "Cannot find own package! MAYDAY!");
e.printStackTrace();
}
return null;
}
示例8: onRegistered
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onRegistered(Context context, String regId)
{
FREContext freContext = GCMPushExtension.context;
freContext.dispatchStatusEventAsync("registered", regId);
}
示例9: onUnregistered
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onUnregistered(Context context, String regId)
{
FREContext freContext = GCMPushExtension.context;
freContext.dispatchStatusEventAsync("unregistered", regId);
}
示例10: onError
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onError(Context context, String errorId)
{
FREContext freContext = GCMPushExtension.context;
freContext.dispatchStatusEventAsync("error", errorId);
}
示例11: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
freContext.dispatchStatusEventAsync(PackageManagerEvents.GET_SYSTEM_APPS, SystemCalls.getApplications(freContext, "system").toString());
return null;
}
示例12: call
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public FREObject call(FREContext freContext, FREObject[] freObjects) {
Log.d(TAG, "called");
freContext.dispatchStatusEventAsync(PackageManagerEvents.GET_USER_APPS, SystemCalls.getApplications(freContext, "user").toString());
return null;
}
示例13: logEvent
import com.adobe.fre.FREContext; //导入方法依赖的package包/类
public static void logEvent(FREContext context, LogLevel level, String format, Object... args) {
String message = String.format(format, args);
Log.println(level.getPriority(), LOGTAG, message);
context.dispatchStatusEventAsync(message, level.getName());
}