0

I am trying to send a boolean with Volley in an Android App developed with Android Studio.

This is the error that I get in the log:

com.android.volley.VolleyError: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference

@Override
protected Map<String, String> getParams() throws AuthFailureError {
    Map<String, Boolean> param = new HashMap<>();
    Boolean images = getBooleanImage(bitmap);
    Log.i("Mynewsam",""+images);
    param.put("image",images);

    return param;
}
kalehmann
  • 4,123
  • 6
  • 18
  • 34
João Costa
  • 21
  • 1
  • 6
  • It looks like your `images` object is null. Check to make sure that `getBooleanImage(bitmap)` is returning the result that you expect. – Jordan Apr 29 '19 at 13:24
  • Possible duplicate of [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – Jordan Apr 29 '19 at 13:29

0 Answers0