how to handle statuscode in android studio?

All we need is a simple explanation of the problem, which is provided below. I am using volley liabrary for the login. After entered wrong password progressDialog is keep running until I kill the app. And one toast message is displaying(System Generated) that unauthorized user 401 statusCode. I dont understand how to handle this condition? … Read more

How to upload image file to heroku

All we need is a simple explanation of the problem, which is provided below. I am currently doing android app for plant recognition using machine learning model which is deployed in Heroku. I capture image using camera implemented in my app and I want to send that image into api deployed in heroku, which will … Read more

Android Kotlin Volley jsonObjectRequest always invoking VolleyError

All we need is a simple explanation of the problem, which is provided below. Im trying to use Volley to get a JSON object from an API and then display it in a recyclerview using the MVVM Android. Using Volley jsonObjectRequest Get request in the ModelView (SchoolViewModel) to get my data (JSON Object) parsed through … Read more

How to get String response from post request volley

All we need is a simple explanation of the problem, which is provided below. I am trying to get a string response from post request. Here, I am sending a post request. where I am sending this data. I have a Model of BillReceipt. Which I pass on the request body. public void UserTransactionReceiptReport(TransactionTypeListener<String> listener, … Read more

How to send this JSON POST request in Java using volley

All we need is a simple explanation of the problem, which is provided below. POST request in Postman {"data":["dog",45,256,256,2,5]} Let’s Solve it: This is a common error many developers questioned us about it. So we write the explanation above. You just have to apply the suggested solution to your code and it will do for … Read more

Microsoft graph login not working in android

All we need is a simple explanation of the problem, which is provided below. We are using https://graph.microsoft.com/v1.0/me for Microsoft login in the Android app. but got com.android.volley.AuthFailureError error. AUTH CONFIG FILE: { "client_id": "…", "authorization_user_agent": "DEFAULT", "redirect_uri": "msauth://….", "account_mode" : "MULTIPLE", "broker_redirect_uri_registered": false, "authorities" : [ { "type": "AAD", "authority_url": "https://login.microsoftonline.com/common" } ] } … Read more

null result variables in fragment android kotlin

All we need is a simple explanation of the problem, which is provided below. I´m traying to send variables to my fragment in android with kotlin. My problem it´s when i load my fragment this values it´s null. Im sending my data so: if (jsonObject != null) { val dataJson: JSONObject = jsonObject.getJSONObject("user") val name … Read more