0

I am coding a java application for android.

In the application, I am using the back button on the phone as a way to cancel a task I am running. However, when I press it, in the Log Cat, I get the following:

08-30 10:45:25.784: W/KeyCharacterMap(1661): Bad keycharmap - filesize=32

08-30 10:45:25.784: W/KeyCharacterMap(1661): Error loading keycharmap file '/system/usr/keychars/bravo-keypad.kcm.bin'. hw.keyboards.0.devname='bravo-keypad'

08-30 10:45:25.784: W/KeyCharacterMap(1661): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

The cancel still occurs but I am worried by this warning that comes up. I want the application to be as stable as possible. Does anyone know what this error means?

The cancel occurs by cancelling the ProgressDialog and the AsyncTask as follows:

usingDialog.setOnCancelListener(new OnCancelListener()
{
    public void onCancel(DialogInterface dialog)
    {
        cancel(true);
    }
});
Pippa Rose Smith
  • 1,377
  • 5
  • 18
  • 42

2 Answers2

1

So I don't have a complete answer to your question, but I've run into a similar issue on my own application (I get the same warning, but under different conditions) and have managed to figure out a little bit. The most important thing that I've found is that while it happens on my Motorola Defy XT, it doesn't seem to show up on my Galaxy SIII. What kind of phone are you using for yours?

Other things I've found:

1) This seems to happen BEFORE the back button press is resolved.

2) If I go back and forth between two Activities, this only occurs the first consecutive time I hit the back button. For instance, if I start on Activity A, go to Activity B, and hit back then the error appears. But, if I go to Activity B and hit back again it does not appear. Weirder still, if I then go to Activity C, hit back (the error appears as expected), then go to Activity B and back again, then the error starts appearing again. It's only consecutive times between two Activities that it fails to appear.

3) The warning appears on other physical buttons as well (but not Home). I've seen it on search, settings, and volume buttons. However, the warning that came with the volume buttons used a different devname than the ones for the other three.

4) On my SIII, while I don't get this warning I do get another error saying that:

E/SpannableStringBuilder(6946): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

Both seem to stem from the system using an improper keyboard. I'm hoping that this is just a coincidence, but it seemed worth mentioning.

Sophicles
  • 64
  • 8
  • Thanks, that's all really helpful. I ignored the problem in the end and nothing bad seemed to happen but I never solved it. I was using a HTC Desire phone. That's all really helpful stuff thanks, it's more than I've figured! – Pippa Rose Smith Jan 17 '14 at 14:50
0

Try this one out::

 public void onBackPressed() {

    //Task to be performed
    //finish();

 }
Name is Nilay
  • 2,743
  • 4
  • 35
  • 77