after pressing home button also how to start app from starting activity in android -


hai doing 1 android app.in middle of app user click home button time app closed agian user open same app means time in previous in wich activity press home button page opened.but need in app every time after clicking home button need close app,then user again open app time need open first page every time.i treid using code here home button working button. if 1 having idea suggest me...

     @override public void onattachedtowindow() {       log.i("teste", "onattachedtowindow");     this.getwindow().settype(windowmanager.layoutparams.type_keyguard);     super.onattachedtowindow();   }  public boolean onkeydown(int keycode, keyevent event) {      if (keycode == keyevent.keycode_home) {          log.i("teste", "botao home");           finish();           return true;      }      return super.onkeydown(keycode, event);          } 

whenever press home button activity @ time overwrite onpause method activity , when open app use onresume function. apart if willing start app ceratin point use preferences variables ,in main activity check preferences value of start app specific point.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -