1

I am trying to develop a simple android app where a user can enter a username and password and then when they click login, it compares the information with that in the database. If the information is correct, then a new activity is opened showing success message. I would like to use JSON get method. I already have an API key for this but am an absolute beginner so any help on how to go about this will be highly appreciated

Ratish Bansal
  • 1,982
  • 1
  • 10
  • 19
Derich
  • 13
  • 3
  • What are you asking? How to use JSONObject to serialize/deserialize the data? Are you looking for a JSON RPC client? – Bob Shaffer Jan 26 '19 at 21:44

1 Answers1

0

I am assuming you want to take Username and Password as input from user and then want to call an API for authentication. Suppose your input json object looks something like this

{
"Username":"myName",
"Password":"qwerty"
}

then you can get the required information like

jsonObject.get("Username");

this will return you the user entered name and same goes for password as well then you can call the authentication API using this information.

Ratish Bansal
  • 1,982
  • 1
  • 10
  • 19
  • Yes that's what I hope to accomplish Ratish... Could you please send me that answer in an xml format since I am using Android Studio to create this app – Derich Jan 27 '19 at 16:15
  • I didn't understood your ask for xml format? You would implementing the app in java right? – Ratish Bansal Jan 28 '19 at 07:04