Descargar archivos de expansión en la tableta
Estoy haciendo un diccionario para teléfonos y tabletas Android. He confirmado el archivo en mi cuenta de desarrollador, y funciona de maravilla en el teléfono. Cuando intento ejecutar exactamente el mismo código en mi Samsung Galaxy Tab 10.1, está atascado.
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
NotificationManager nm = (NotificationManager) getApplicationContext().getSystemService(NOTIFICATION_SERVICE);
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();
}
}
Viene con esta excepción:
03-21 15:24:45.940: I/ApplicationPackageManager(17750): cscCountry is not German : NEE
03-21 15:24:46.000: D/dalvikvm(17750): GC_CONCURRENT freed 347K, 7% free 6569K/7047K, paused 3ms+3ms
03-21 15:24:47.280: E/Environment(17750): getExternalStorageState/mnt/sdcard
03-21 15:24:47.370: W/LVLDL(17750): Exception for main.2.dk.letsoftware.KFEnglish.obb: java.lang.NoSuchMethodError: android.app.Notification$Builder.setProgress
03-21 15:37:29.480: I/ApplicationPackageManager(17750): cscCountry is not German : NEE
03-21 15:37:29.950: D/dalvikvm(17750): GC_CONCURRENT freed 217K, 5% free 6768K/7111K, paused 3ms+6ms
03-21 15:37:30.650: E/Environment(17750): getExternalStorageState/mnt/sdcard
03-21 15:37:30.760: W/LVLDL(17750): Exception for main.2.dk.letsoftware.KFEnglish.obb: java.lang.NoSuchMethodError: android.app.Notification$Builder.setProgress
03-21 15:37:40.410: D/CLIPBOARD(17750): Hide Clipboard dialog at Starting input: finished by someone else... !
03-21 15:40:24.870: D/dalvikvm(17750): GC_EXPLICIT freed 239K, 7% free 6619K/7111K, paused 2ms+2ms
03-21 15:41:51.140: I/ApplicationPackageManager(17750): cscCountry is not German : NEE
03-21 15:41:51.560: E/Environment(17750): getExternalStorageState/mnt/sdcard
03-21 15:41:51.660: W/LVLDL(17750): Exception for main.2.dk.letsoftware.KFEnglish.obb: java.lang.NoSuchMethodError: android.app.Notification$Builder.setProgress
No tengo idea de por qué no voy a descargar. Antes de que aparezca esa pantalla, muestra el tamaño del archivo, sé que puedo verlo.
por favor ayúdame, gracias