com.google.android.vending.expansion.downloader.impl.DownloaderService Java Examples

The following examples show how to use com.google.android.vending.expansion.downloader.impl.DownloaderService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DownloaderClientMarshaller.java    From play-apk-expansion with Apache License 2.0 3 votes vote down vote up
/**
 * Starts the download if necessary. This function starts a flow that does `
 * many things. 1) Checks to see if the APK version has been checked and
 * the metadata database updated 2) If the APK version does not match,
 * checks the new LVL status to see if a new download is required 3) If the
 * APK version does match, then checks to see if the download(s) have been
 * completed 4) If the downloads have been completed, returns
 * NO_DOWNLOAD_REQUIRED The idea is that this can be called during the
 * startup of an application to quickly ascertain if the application needs
 * to wait to hear about any updated APK expansion files. Note that this does
 * mean that the application MUST be run for the first time with a network
 * connection, even if Market delivers all of the files.
 *
 * @param context Your application Context.
 * @param notificationClient A PendingIntent to start the Activity in your application
 * that shows the download progress and which will also start the application when download
 * completes.
 * @param serviceClass the class of your {@link imp.DownloaderService} implementation
 * @return whether the service was started and the reason for starting the service.
 * Either {@link #NO_DOWNLOAD_REQUIRED}, {@link #LVL_CHECK_REQUIRED}, or {@link
 * #DOWNLOAD_REQUIRED}.
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, PendingIntent notificationClient,
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #2
Source File: DownloaderClientMarshaller.java    From play-apk-expansion with Apache License 2.0 3 votes vote down vote up
/**
 * This version assumes that the intent contains the pending intent as a parameter. This
 * is used for responding to alarms.
 * <p>The pending intent must be in an extra with the key {@link
 * impl.DownloaderService#EXTRA_PENDING_INTENT}.
 *
 * @param context
 * @param notificationClient
 * @param serviceClass the class of the service to start
 * @return
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, Intent notificationClient,
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #3
Source File: DownloaderClientMarshaller.java    From travelguide with Apache License 2.0 3 votes vote down vote up
/**
 * Starts the download if necessary. This function starts a flow that does `
 * many things. 1) Checks to see if the APK version has been checked and
 * the metadata database updated 2) If the APK version does not match,
 * checks the new LVL status to see if a new download is required 3) If the
 * APK version does match, then checks to see if the download(s) have been
 * completed 4) If the downloads have been completed, returns
 * NO_DOWNLOAD_REQUIRED The idea is that this can be called during the
 * startup of an application to quickly ascertain if the application needs
 * to wait to hear about any updated APK expansion files. Note that this does
 * mean that the application MUST be run for the first time with a network
 * connection, even if Market delivers all of the files.
 * 
 * @param context Your application Context.
 * @param notificationClient A PendingIntent to start the Activity in your application
 * that shows the download progress and which will also start the application when download
 * completes.
 * @param serviceClass the class of your {@link imp.DownloaderService} implementation
 * @return whether the service was started and the reason for starting the service.
 * Either {@link #NO_DOWNLOAD_REQUIRED}, {@link #LVL_CHECK_REQUIRED}, or {@link
 * #DOWNLOAD_REQUIRED}.
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, PendingIntent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #4
Source File: DownloaderClientMarshaller.java    From travelguide with Apache License 2.0 3 votes vote down vote up
/**
 * This version assumes that the intent contains the pending intent as a parameter. This
 * is used for responding to alarms.
 * <p>The pending intent must be in an extra with the key {@link 
 * impl.DownloaderService#EXTRA_PENDING_INTENT}.
 * 
 * @param context
 * @param notificationClient
 * @param serviceClass the class of the service to start
 * @return
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, Intent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #5
Source File: DownloaderClientMarshaller.java    From Alite with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Starts the download if necessary. This function starts a flow that does `
 * many things. 1) Checks to see if the APK version has been checked and
 * the metadata database updated 2) If the APK version does not match,
 * checks the new LVL status to see if a new download is required 3) If the
 * APK version does match, then checks to see if the download(s) have been
 * completed 4) If the downloads have been completed, returns
 * NO_DOWNLOAD_REQUIRED The idea is that this can be called during the
 * startup of an application to quickly ascertain if the application needs
 * to wait to hear about any updated APK expansion files. Note that this does
 * mean that the application MUST be run for the first time with a network
 * connection, even if Market delivers all of the files.
 * 
 * @param context Your application Context.
 * @param notificationClient A PendingIntent to start the Activity in your application
 * that shows the download progress and which will also start the application when download
 * completes.
 * @param serviceClass the class of your {@link imp.DownloaderService} implementation
 * @return whether the service was started and the reason for starting the service.
 * Either {@link #NO_DOWNLOAD_REQUIRED}, {@link #LVL_CHECK_REQUIRED}, or {@link
 * #DOWNLOAD_REQUIRED}.
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, PendingIntent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #6
Source File: DownloaderClientMarshaller.java    From Alite with GNU General Public License v3.0 3 votes vote down vote up
/**
 * This version assumes that the intent contains the pending intent as a parameter. This
 * is used for responding to alarms.
 * <p>The pending intent must be in an extra with the key {@link 
 * impl.DownloaderService#EXTRA_PENDING_INTENT}.
 * 
 * @param context
 * @param notificationClient
 * @param serviceClass the class of the service to start
 * @return
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, Intent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #7
Source File: DownloaderClientMarshaller.java    From UnityOBBDownloader with Apache License 2.0 3 votes vote down vote up
/**
 * Starts the download if necessary. This function starts a flow that does `
 * many things. 1) Checks to see if the APK version has been checked and
 * the metadata database updated 2) If the APK version does not match,
 * checks the new LVL status to see if a new download is required 3) If the
 * APK version does match, then checks to see if the download(s) have been
 * completed 4) If the downloads have been completed, returns
 * NO_DOWNLOAD_REQUIRED The idea is that this can be called during the
 * startup of an application to quickly ascertain if the application needs
 * to wait to hear about any updated APK expansion files. Note that this does
 * mean that the application MUST be run for the first time with a network
 * connection, even if Market delivers all of the files.
 * 
 * @param context Your application Context.
 * @param notificationClient A PendingIntent to start the Activity in your application
 * that shows the download progress and which will also start the application when download
 * completes.
 * @param serviceClass the class of your {@link imp.DownloaderService} implementation
 * @return whether the service was started and the reason for starting the service.
 * Either {@link #NO_DOWNLOAD_REQUIRED}, {@link #LVL_CHECK_REQUIRED}, or {@link
 * #DOWNLOAD_REQUIRED}.
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, PendingIntent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}
 
Example #8
Source File: DownloaderClientMarshaller.java    From UnityOBBDownloader with Apache License 2.0 3 votes vote down vote up
/**
 * This version assumes that the intent contains the pending intent as a parameter. This
 * is used for responding to alarms.
 * <p>The pending intent must be in an extra with the key {@link 
 * impl.DownloaderService#EXTRA_PENDING_INTENT}.
 * 
 * @param context
 * @param notificationClient
 * @param serviceClass the class of the service to start
 * @return
 * @throws NameNotFoundException
 */
public static int startDownloadServiceIfRequired(Context context, Intent notificationClient, 
        Class<?> serviceClass)
        throws NameNotFoundException {
    return DownloaderService.startDownloadServiceIfRequired(context, notificationClient,
            serviceClass);
}