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

前端 未结 2 1329
误落风尘
误落风尘 2020-12-17 05:33

I have an open-source application on the Android market. It seems to work fine for me (with over 1,000 active installs, I have to presume that it works for most people).

相关标签:
2条回答
  • 2020-12-17 06:14

    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.

    0 讨论(0)
  • 2020-12-17 06:20

    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.

    0 讨论(0)
提交回复
热议问题