android - Check boolean on every app start -


i want check, if boolean true, on every app start. when boolean false, user should redirected activity. call in start activity. when user enters app via notification or direct activity start, not called.

i tried in applications class, since can't redirect users activities there, not work , don't want add call every activity.

how can check, if user logged in no matter, activity started?

create baseactivity , extend activities base activity. put boolean checking code in base activity. no matter activity app starts if activities , extending base activity called. this:

public class baseactivity extends activity{      @override     public void onresume() {         super.onresume();         // check boolean here , act accordingly      }  } 

then extend activities one.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -