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


Java DownloaderClientMarshaller类代码示例

本文整理汇总了Java中com.google.android.vending.expansion.downloader.DownloaderClientMarshaller的典型用法代码示例。如果您正苦于以下问题:Java DownloaderClientMarshaller类的具体用法?Java DownloaderClientMarshaller怎么用?Java DownloaderClientMarshaller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DownloaderClientMarshaller类属于com.google.android.vending.expansion.downloader包,在下文中一共展示了DownloaderClientMarshaller类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, OBBDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }       
}
 
开发者ID:FallingUpGame,项目名称:FallingUp,代码行数:9,代码来源:AlarmReceiver.java

示例2: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, UnityDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }       
}
 
开发者ID:snoozinsquatch,项目名称:unity-obb-downloader,代码行数:9,代码来源:UnityAlarmReceiver.java

示例3: setMessenger

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
/**
 * Called in response to onClientUpdated. Creates a new proxy and notifies
 * it of the current state.
 *
 * @param msg the client Messenger to notify
 */
public void setMessenger(Messenger msg) {
    mClientProxy = DownloaderClientMarshaller.CreateProxy(msg);
    if (null != mProgressInfo) {
        mClientProxy.onDownloadProgress(mProgressInfo);
    }
    if (mState != -1) {
        mClientProxy.onDownloadStateChanged(mState);
    }
}
 
开发者ID:snoozinsquatch,项目名称:unity-obb-downloader,代码行数:16,代码来源:DownloadNotification.java

示例4: setMessenger

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
/**
 * Called in response to onClientUpdated. Creates a new proxy and notifies
 * it of the current state.
 * 
 * @param msg the client Messenger to notify
 */
public void setMessenger(Messenger msg) {
    mClientProxy = DownloaderClientMarshaller.CreateProxy(msg);
    if (null != mProgressInfo) {
        mClientProxy.onDownloadProgress(mProgressInfo);
    }
    if (mState != -1) {
        mClientProxy.onDownloadStateChanged(mState);
    }
}
 
开发者ID:SlotNSlot,项目名称:SlotNSlot_Android,代码行数:16,代码来源:DownloadNotification.java

示例5: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, SampleDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }
}
 
开发者ID:google,项目名称:play-apk-expansion,代码行数:9,代码来源:SampleAlarmReceiver.java

示例6: launchDownloader

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
private void launchDownloader() {
    try {
        Intent launchIntent = SampleDownloaderActivity.this
                .getIntent();
        Intent intentToLaunchThisActivityFromNotification = new Intent(
                SampleDownloaderActivity
                        .this, SampleDownloaderActivity.this.getClass());
        intentToLaunchThisActivityFromNotification.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                |
                Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intentToLaunchThisActivityFromNotification.setAction(launchIntent.getAction());

        if (launchIntent.getCategories() != null) {
            for (String category : launchIntent.getCategories()) {
                intentToLaunchThisActivityFromNotification.addCategory(category);
            }
        }

        if (DownloaderClientMarshaller.startDownloadServiceIfRequired(this,
                PendingIntent.getActivity(SampleDownloaderActivity
                                .this,
                        0, intentToLaunchThisActivityFromNotification,
                        PendingIntent.FLAG_UPDATE_CURRENT),
                SampleDownloaderService.class) != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
            initializeDownloadUI();
            return;
        } // otherwise we fall through to starting the movie
    } catch (NameNotFoundException e) {
        Log.e(LOG_TAG, "Cannot find own package! MAYDAY!");
        e.printStackTrace();
    }
}
 
开发者ID:google,项目名称:play-apk-expansion,代码行数:33,代码来源:SampleDownloaderActivity.java

示例7: downloadExpansionFiles

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
public void downloadExpansionFiles(Activity activity, ObbDownloadListener listener) {
    try {
        mListener = listener;
        mIsFinished = false;
        // Build an Intent to start this activity from the Notification
        Intent notifierIntent = new Intent(activity, activity.getClass());
        notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
        PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0, notifierIntent,
                PendingIntent.FLAG_UPDATE_CURRENT);

        // Start the download service (if required)
        int startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(activity, pendingIntent,
                ObbDownloadService.class);
        // If download has started, initialize a ProgressDialog to show
        // download progress
        if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
            // This is where you do set up to display the download
            // progress (next step)
            // Instantiate a member instance of IStub
            Log.i("APKExpansionDownloader", "Try to download obb files");
            mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(this, ObbDownloadService.class);
            // Create and show the progress dialog
            mDownloadProgressDlg = new MyProgressDialog(activity);
            mDownloadProgressDlg.show();
        }
        // No need to download obb files
        else {
            Log.i("APKExpansionDownloader", "No need to download obb files");
            downloadSuccess();
        }
    } catch (NameNotFoundException e) {
        e.printStackTrace();
        downloadFailed();
    }
}
 
开发者ID:cclink,项目名称:ObbDownloadHelper,代码行数:36,代码来源:ObbDownloadHelper.java

示例8: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, ObbDownloadService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }
}
 
开发者ID:cclink,项目名称:ObbDownloadHelper,代码行数:9,代码来源:ObbDownloadReceiver.java

示例9: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context,
                intent, ExtensionDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }
}
 
开发者ID:thomasuster,项目名称:android-expansion,代码行数:10,代码来源:DownloaderReceiver.java

示例10: startDownloadServiceIfRequired

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
public static int startDownloadServiceIfRequired() {
    if(expansionFilesDelivered() == 1)
        return 0;
    // Build an Intent to start this activity from the Notification
    Intent notifierIntent = new Intent(mainContext, mainActivity.getClass());
    notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
            Intent.FLAG_ACTIVITY_CLEAR_TOP);

    PendingIntent pendingIntent = PendingIntent.getActivity(mainContext, 0,
            notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
    int startResult = 0;
    try {
        startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(mainContext,
                pendingIntent, ExtensionDownloaderService.class);
        if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
            Extension.mainActivity.runOnUiThread(new Runnable() {
                public void run() {
                    downloaderClient = new DownloaderClientImpl();
                    mDownloaderClientStub = DownloaderClientMarshaller.CreateStub(downloaderClient,
                            ExtensionDownloaderService.class);
                }
            });
        }
    }
    catch (Exception e) {
        System.out.println("startDownloadServiceIfRequired error");
        e.printStackTrace();
    }
    return startResult;
}
 
开发者ID:thomasuster,项目名称:android-expansion,代码行数:31,代码来源:Expansion.java

示例11: checkDownload

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
private void checkDownload() {
	if (!expansionFilesDelivered()) {
		AliteLog.d("File does not exist!", "Expansion file does not exist. Downloading...");
		Intent notifierIntent = new Intent(this, getClass());
		notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
		pendingIntent = PendingIntent.getActivity(this, 0, notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
		try {
			int startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(this, pendingIntent,
							AliteDownloaderService.class);
			if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
				downloaderClientStub = DownloaderClientMarshaller.CreateStub(this, AliteDownloaderService.class);
				setContentView(R.layout.activity_start_manager);
				return;
			}
		} catch (NameNotFoundException e) {
			setStatus("Error while downloading expansion file: " + e.getMessage());
			AliteLog.e("Error while Downloading Expansions", "Name not Found: " + e.getMessage(), e);
		}
	}

	AliteFiles.performMount(this,  
			new IMethodHook() {
		private static final long serialVersionUID = -6200281383445218241L;

		@Override
		public void execute(float deltaTime) {
			startGame();
		}
	}, new ErrorHook());
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:31,代码来源:AliteStartManager.java

示例12: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, AliteDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }
}
 
开发者ID:CmdrStardust,项目名称:Alite,代码行数:9,代码来源:AliteAlarmReceiver.java

示例13: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, LigerDownloaderService.class);
    } catch (NameNotFoundException nnfe) {
        Timber.d("FAILED TO START DOWNLOAD SERVICE: " + nnfe.getMessage());
    }
}
 
开发者ID:StoryMaker,项目名称:storypath,代码行数:9,代码来源:LigerAlarmReceiver.java

示例14: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, FieldGuideDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }       
}
 
开发者ID:museumsvictoria,项目名称:mv-fieldguide-android,代码行数:9,代码来源:FieldGuideAlarmReceiver.java

示例15: onReceive

import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
    try {
        DownloaderClientMarshaller.startDownloadServiceIfRequired(context, intent, SampleDownloaderService.class);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }       
}
 
开发者ID:alebianco,项目名称:ANE-Android-Expansion,代码行数:9,代码来源:SampleAlarmReceiver.java


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