W/ActivityManager(75): Unable to start service Intent { cmp=bfl.downloader/.MyDownloaderService (has extras) }: not found
I say "newbie" error because this is one of the most common errors for anyone first starting to use Android services, and can be caused by not putting the <service> element in the right place in the Android manifest file, the wrong classname, etc.
I was going crazy trying to figure this out, convinced I was still doing something silly. Well, it turns out it wasn't me after all in this case. There is apparently a problem with the DownloaderService class provided with the Android Google Downloader library, and this only reveals itself when you put your service class in a package other than that of the app... which I had done as a code-organization step.
There seem to be at least two ways to deal with this issue
(1) Make sure your subclass of DownloaderService is in the same package as the app
(2) Modify startDownloadServiceIfRequired in the class DownloaderService class
- Existing line : String packageName = serviceClass.getPackage().getName();
- Change to: String packageName = context.getPackageName();
finally, after hours of searching, I found this one and it solved my problem.
ReplyDeleteThis fixed my problem, thanks a bunch.
ReplyDeleteYay! I found the offending line, but didn't know how to fix it! Thanks for coming to the rescue.
ReplyDelete