How can I debug a seemingly hardware-dependent issue with my Android app without access to the hardware?

混江龙づ霸主 提交于 2019-11-29 05:15:12

We'd need to know more about the nature of the problem. Is it a crash? Something doesn't look right? Etc.

If it's a crash, you could add a crash handler (Thread.setUncaughtExceptionHandler, IIRC) and have that create a better-formatted log that can optionally be sent to you.

Also, try to collect information about the specs of the phones (OS, resolution, etc) and repro that in the debugger. Those Samsung phones have Android 2.1 - your Nexus probably has 2.2? Did you try setting the emulator up to use 2.1?

Whenever I had these issues, I politely asked those who wrote me if they were interested in helping me - and there were typically several people who were eager to volunteer. I sent them an APK file with a special test version that had additional debug output, and that helped me narrow down the problem.

The bug turns out to be an undocumented default on (some?) Samsung phones that limits the maxLength attribute of a TextView widget to 9,000 characters. Explicitly adding an "android:maxLength" attribute with a value large enough to contain my largest text length to the TextView widget solved the problem.

Incidentally, I believe that this same issue is what caused the LogCollector logs from the initial reporters to be truncated.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!