A
A
Alexander Shibaev2016-04-14 08:58:50
Android
Alexander Shibaev, 2016-04-14 08:58:50

How to make CheckToken automatically?

Hello!
I'm interested in this question, how to make it so that when I start the activity, I automatically send a token to the server? The token is stored in SharedPreferences, and accordingly, if it is there, then we check it on the server, if it is not there, then we drive the user to the authorization screen. What is better to use for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Copperfield, 2016-04-14
@Dpa7DuJIJIep

Use programming to automate. Write a series of instructions that will send a token to the server when the activity is launched. For example:

if(preferencess.getString("token", null) != null)
    sendTokenToServer(token);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question