Connect node js server with android

1073 views android

I need to make android registration/authentification with node.js. In server side i use express , what else i must use on the server to connect with android app? Please help me, i'm new on this.

answered question

2 Answers


Best way to connect android application with server is Retrofit. You can find multiple tutorials in internet for this. This is maximum used by all android developers.

Tutorial 1

Tutorial 2

posted this

On nodejs side use JWT for authentication(use any npm jwt package), once user enters credentials in app send then to the nodejs server, if they are valid, send a JWT token to the client(android app), save the token in local preferences(app side), while making subsequent requests use jwt in your request header, so that nodejs can authenticate your app/user.
android side its better to use retrofit to make network requests.
data you send from or to server should be in JSON fromat.

posted this

Have an answer?


Please login first before posting an answer.