I've published an Android live wallpaper for which I have recently started to get this strange force close error:
java.lang.RuntimeException: Failed to register input channel. Check logs开发者_运维技巧 for details.
at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:651)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:875)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
According to this StackOverflow page the issue might be with Launcher Pro.
I want to avoid getting bad ratings for this. Is there any way to communicate with the users who send me this error report that it is not the fault of my program, and that they should run the wallpaper through their normal home screen?
I could post a note on the app's Android Market page, but that would seem to be a major distraction for an infrequent error.
You should push an update that checks for the installation of Launcher Pro and alert the user accordingly. Your market page should also have a small note somewhere that there are compatibility issues with Launcher Pro.
Check for Launcher Pro this way:
// this is the package name for Launcher Pro
String packName = "com.fede.launcher";
PackageManager packMan = getPackageManager();
// check if package exists
PackageInfo info = mPm.getPackageInfo(packName, 0);
// if info is not null, Launcher Pro is installed
精彩评论