I posted a few days ago about a new little app I stuck in the Android Market. An error report appeared from the app in the Market last night that I thought was interesting.
The app does some stuff in the background then when it’s finished, it sticks a notification in the top status bar. In my code, I just use the default notification settings – LED flash, vibrate, etc. And on every Android I’ve tested it on, it’s been fine.
But for one user, it caused the app to crash:
Exception class java.lang.SecurityException Source method Parcel.readException() java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) at java.util.concurrent.FutureTask.setException(FutureTask.java:124) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561) at java.lang.Thread.run(Thread.java:1102) Caused by: java.lang.SecurityException: Requires VIBRATE permission at android.os.Parcel.readException(Parcel.java:1247) at android.os.Parcel.readException(Parcel.java:1235) at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:368) at android.app.NotificationManager.notify(NotificationManager.java:110) at android.app.NotificationManager.notify(NotificationManager.java:90) at com.dalelane.lovefilm.data.ImageProcessService.publishUpdateNotification(ImageProcessService.java:281) at com.dalelane.lovefilm.data.ImageProcessService.access$0(ImageProcessService.java:234) at com.dalelane.lovefilm.data.ImageProcessService$ImageProcesser.doInBackground(ImageProcessService.java:215) at com.dalelane.lovefilm.data.ImageProcessService$ImageProcesser.doInBackground(ImageProcessService.java:1) at android.os.AsyncTask$2.call(AsyncTask.java:185) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) ... 4 more