I am making an dictionary for android phones and tablets. I have committed the file on my developer account, and i works like a charm on phone. When i am trying to run the exactly same code on my samsung galaxy tab 10.1, it is stuck.
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();
}
}
It comes with this exception :
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
I have no idea why i wont download. Before that screen comes, it shows the size of the file så i know that i can se it.
please help me, thanks
Lint
over your project it would have picked this up. – Alizaalizarin