title: Android and back button
body: <p>I have a problem with back button. He doesn't work. When I go from first activity to second and from second to third back button don't want work. I used :</p>
  
  <pre><code>@Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      if (keyCode == KeyEvent.KEYCODE_BACK) {
          moveTaskToBack(true);
          Log.v("Co1s", "Cos1");
          return true;
      }
      return super.onKeyDown(keyCode, event);
  }
  </code></pre>
  
  <p>But when I push the button I get only:</p>
  
  <blockquote>
    <p>05-23 10:45:57.863: W/KeyCharacterMap(238): Can't open keycharmap file
    05-23 10:45:57.863: W/KeyCharacterMap(238): Error loading keycharmap
    file '/system/usr/keychars/pm8058-keypad.kcm.bin'.
    hw.keyboards.0.devname='pm8058-keypad' 05-23 10:45:57.863:
    W/KeyCharacterMap(238): Using default keymap:
    /system/usr/keychars/qwerty.kcm.bin</p>
  </blockquote>
  
  <p>And this log in this function is not showing in logs. Why?</p>
  
  <p>Edit:
  acrivity nr1:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.services_description);
  
          back_button = (Button) findViewById(R.id.service_back_button);
          back_button.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View v) {
                  intent = new Intent(services_description.this, service.class);
                  TabActivityGroup parentActivity = (TabActivityGroup)getParent();
                  parentActivity.startChildActivity("menu_activity", intent);     
                  finish();
              }
          });
      }
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_BACK) {
              Log.v("Co1s", "Cos1");
          }
          return super.onKeyDown(keyCode, event);
      }
  </code></pre>
  
  <p>and second:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.service);
  
      title = (TextView) findViewById(R.id.serviceTitle);
      description = (TextView) findViewById(R.id.serviceDescription);
      nextPage = (ImageView) findViewById(R.id.serviceNextPage);
      back_button = (Button) findViewById(R.id.service_back_button);
  
  
      nextPage.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
              intent = new Intent(service.this, services_description.class);
              TabActivityGroup parentActivity = (TabActivityGroup)getParent();
              parentActivity.startChildActivity("menu_activity", intent);     
  
          }
      });
      back_button.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
  
              finish();
  
          }
      });
  }
  @Override
  public void onBackPressed() {
      Log.v("Cos", "Cos");
      finish();
  }
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      if (keyCode == KeyEvent.KEYCODE_BACK) {
          moveTaskToBack(true);
          Log.v("Co1s", "Cos1");
          return true;
      }
      return super.onKeyDown(keyCode, event);
  }
  </code></pre>