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


Java FREContext.dispatchStatusEventAsync方法代码示例

本文整理汇总了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;
}
 
开发者ID:AppKey,项目名称:AIR,代码行数:18,代码来源:checkAccess.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:17,代码来源:UninstallApp.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:18,代码来源:InstallApp.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:17,代码来源:InstallLocalApp.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:21,代码来源:RunApp.java

示例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);
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:8,代码来源:GCMIntentService.java

示例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;
}
 
开发者ID:alebianco,项目名称:ANE-Android-Expansion,代码行数:34,代码来源:DownloadExpansions.java

示例8: onRegistered

import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onRegistered(Context context, String regId)
{
	FREContext freContext = GCMPushExtension.context;
	freContext.dispatchStatusEventAsync("registered", regId);
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:7,代码来源:GCMIntentService.java

示例9: onUnregistered

import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onUnregistered(Context context, String regId)
{
	FREContext freContext = GCMPushExtension.context;
	freContext.dispatchStatusEventAsync("unregistered", regId);
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:7,代码来源:GCMIntentService.java

示例10: onError

import com.adobe.fre.FREContext; //导入方法依赖的package包/类
@Override
public void onError(Context context, String errorId)
{
	FREContext freContext = GCMPushExtension.context;
	freContext.dispatchStatusEventAsync("error", errorId);
}
 
开发者ID:breealyeska,项目名称:GCMExtension,代码行数:7,代码来源:GCMIntentService.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:7,代码来源:GetSystemApps.java

示例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;
}
 
开发者ID:jakehilton,项目名称:PackageManagerANE,代码行数:7,代码来源:GetUserApps.java

示例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());
    }
 
开发者ID:alebianco,项目名称:ANE-Android-Expansion,代码行数:8,代码来源:FREUtils.java


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