Tag: blog HTTP Io ar Java SP data 2014 on
=============== Problem description ====================
Generally, You need to log on to an application. Otherwise, you will be prompted to log on to a specific activity.
I know that J2EE seems to be able to implement such a check through a filter. I wonder if there is a corresponding method in Android. Do I have to make my own judgment every time I jump to the activity?
============= Solution 1 ======================
You save the login status in an application, and then, when you jump to the application, determine whether there is login information in the application.
============= Solution 2 ======================
Generally, it is verified when data is obtained.
============= Solution 3 ======================
Write a baseactivity. Java, so all of them inherit this class. In the parent class, you can check whether you have logged on to the database SQLite or static class or sharedpreference.
============= Solution 4 ======================
Put it in sharedpreference.
Detect logon before redirecting to each activity