so im working on an app and the tutorial im using to learn the code he uses is depricated for the app version im using.

                ArrayList<NameValuePair> dataToSend = new ArrayList<>();
                dataToSend.add(new ("name", user.name));
                dataToSend.add(new BasicNameValuePair("age", user.age + ""));
                dataToSend.add(new BasicNameValuePair("username", user.username));
                dataToSend.add(new BasicNameValuePair("password", user.password));

thats the code im getting and its depricated what do i use to replace them to fix this?

Recommended Answers

All 2 Replies

Deprecated doesn't mena you cannot use it. Just learn how to do it later you can swap it for custom library like Retrofit, OkHttp or Volley

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.