Every time open app , open last open activity

61
July 16, 2017, at 8:57 PM

Sir, The last opened activity will be saved and when opening the app, the last opened activity will be opened. But app reopen every time then see splash screen then go last open activity, Please help me for it..

Please send this code

Answer 1

That's simple. When the activity is closed, in the activity class, override the onStop() method and save the activity name in the SharedPreferences. Then in the main activity, get the SharedPreferences variable and open the activity using an intent. Hope this helps. For more info, ping using a comment. I'll share the working code.

READ ALSO
Run Spring boot .jar file with spring.config.location with replace values of application.properties?

Run Spring boot .jar file with spring.config.location with replace values of application.properties?

When I run a Spring boot application from command line with --springconfig

88
Understanding Apache Tomcat Connection Pooling

Understanding Apache Tomcat Connection Pooling

I am trying to implement Apache Tomcat's built-in JDBC connection poolBut I am confused with many things

54
how to disable only cut option on textview android

how to disable only cut option on textview android

I applied this code for Textview Selection

53