Answer the question
In order to leave comments, you need to log in
How to overcome the error This class should provide a default constructor?
Error:Error: This class should provide a default constructor (a public constructor with no arguments) (com.saleup.foodhause67.LoginRequest) [Instantiatable]
package com.saleup.foodhause67;
import com.android.volley.Response;
import com.android.volley.toolbox.StringRequest;
import java.util.HashMap;
import java.util.Map;
public class LoginRequest extends StringRequest {
private static final String LOGIN_REQUEST_URL = "http://server.food-house67.ru/LoginFD.php";
private Map<String, String> params;
public LoginRequest(String namber, String password, Response.Listener<String> listener) {
super(Method.POST, LOGIN_REQUEST_URL, listener, null);
params = new HashMap<>();
params.put("namber", namber);
params.put("password", password);
}
@Override
public Map<String, String> getParams() {
return params;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question