Я считаю, что исходная библиотека расширений APK была немного переработана. И не поддерживает Android Oreo.
Во-первых: я пытаюсь использовать библиотеку загрузчиков Google и службу лицензирования приложений, так как мое приложение будет использовать расширение APK. Я прочитал руководство от https://developer.android.com/google/play/expansion-files#java и https://kitefaster.com/2017/02/15/expansion-apk-files-android-studio/, все идет хорошо. Но error.expansion.downloader не существует. Я сделал все как в инструкции введите здесь описание изображения , введите здесь описание изображения , введите здесь описание изображения
Иконка, я использовал библиотеку из git-hub https://github.com/danikula/Google-Play-Expansion-File Но всегда отображается статус IDownloaderClient.STATE_FAILED_FETCHING_URL при загрузке файла OBB, который не поддерживает Android Oreo с предупреждением разработчика об ошибке. Предупреждение разработчика для пакета Не удалось опубликовать уведомление на канале. Код загрузки файла OBB:
if (!expansionFilesDelivered()) {
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);
}
}
// Build PendingIntent used to open this activity from
// Notification
PendingIntent pendingIntent = PendingIntent.getActivity(
SampleDownloaderActivity.this,
0, intentToLaunchThisActivityFromNotification,
PendingIntent.FLAG_UPDATE_CURRENT);
// Request to start the download
int startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(this,
pendingIntent, SampleDownloaderService.class);
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
// The DownloaderService has started downloading the files,
// show progress
initializeDownloadUI();
return;
} // otherwise, download not needed so we fall through to
// starting the movie
} catch (NameNotFoundException e) {
Log.e(LOG_TAG, "Cannot find own package! MAYDAY!");
e.printStackTrace();
}
} else {
validateXAPKZipFiles();
}
Я надеюсь, что кто-нибудь даст мне решение, пожалуйста.