android - Minimize app instead of exit on back button -


is there way minimize app when pressing hardware button? i'm using backandroid, exits app.

edit:

i have logic involved in js, overriding lifecycle method in reactactivity not sending event js. thus, doesn't work.

handlebackbutton() {   const { navigator } = this.refs;   if (navigator) {     if (navigator.getcurrentroutes().length > 1) {       navigator.pop();       return true;     } else if (this.props.selectedtab !== home) {       this.props.selecttab(home);       return true;     }   }   return false; } 

i believe you'd have override default method i'm not sure actual code minimize be. perhaps mess around onresume well?

@override public void onbackpressed() {     // code minimize } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -