Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
25 views

LiveData is not updating its value on 2nd api call

I am fetching currency exchange rate by api call using retrofit and ViewModel concept.On launch of application I am able to get the latest data from the server but when I am trying to update the live ...
Diwakar Singh's user avatar
0 votes
0 answers
25 views

Retrofit java.net.ConnectException: Failed to connect to

I faced a problem. Retrofit shows me java.net.ConnectException: Failed to connect to /10.122.3.25:7068. I also added ACCESS_NETWORK_STATE in manifest file. But problem was not solved. How can I solve ...
hardcoder124's user avatar
0 votes
2 answers
39 views

How to parse API JSON response that contains 1 list of multiple (2 in my case) types of objects in Android, I'm using Retrofit for API call

'So I searched enough, there isn't any question like this im sure. And I'm wondering how can this be not a questions others have come across or am I soo noob? So the API response is as follow { "...
Khay's user avatar
  • 977
-1 votes
1 answer
75 views

Cannot access class 'retrofit2.Response'. Check your module classpath for missing or conflicting dependencies

I started a project with a few modules and i have problems when i build the app. Cannot access class 'retrofit2.Response'. Check your module classpath for missing or conflicting dependencies I also ...
pablomargolin's user avatar
0 votes
1 answer
46 views

How to get the URL endpoint and the GET/POST method when an Exception occurs?

I use a suspend function to call the API as shown in the code below. How can I get the URL endpoint and the GET/POST method when an Exception occurs? suspend fun <T : BaseResponse> safeCallApi( ...
vstung's user avatar
  • 9
2 votes
1 answer
77 views

Kotlin jetpack compose API call without endpoint and in post method

interface ApiInterface { @Multipart @POST("/") suspend fun getRendomFact( @Part("secret_key") secretKey: String, @Part("token") token: String, @Part("...
Arvind Gehlod's user avatar
0 votes
0 answers
23 views

Upload File Cant Cancel Android Kotlin

im using this class to upload file object UploadFileUtils { fun upload(uploadFileModel: UploadFileModel): String? { val connection: HttpURLConnection var outputStream: ...
sina's user avatar
  • 1
0 votes
0 answers
43 views

How come the android face detection detects my face on the phone but the system server doesn't detect it?

I am trying to get face recognition to work on this android app I am making. On my phone it says the face has been detected but the system_server says it has not been detected. Logcat messages I get ...
Shane Mushtaq's user avatar
0 votes
0 answers
15 views

OkHttpClient implementation security advice

I'm having issues getting my kotlin api 24 app to connect to my api endpoint. The issue is related to ssl trusting. I've already tried adding the certificate to jdk trust store, and adding it to res/...
Daniel Mohebi's user avatar
0 votes
1 answer
47 views

Sending image with multipart file format with retrofit never reaches the backend

Context I have a contract on the backend that is described as shown in the image below: As you can see, the backend expects an image file per a multipart/form-data contract. My backend is working ...
Pierre Vieira's user avatar
0 votes
1 answer
56 views

Fetching Api returns Array of Arrays instead Array of Objects using Retrofit and Gson

Recently I have been working on project which includes working with API. I have checked it in Postman and I am sure that its response is an Array of Objects but when tried to use it I faced Expected ...
nima's user avatar
  • 3
1 vote
1 answer
281 views

How to solve error "Channel is unrecoverably broken and will be disposed!"

After clicking the button I am getting these errors: Channel is unrecoverably broken and will be disposed! and Failed to open APK '/data/app... and failed to add asset path /data/app Here is the ...
Nuriya 's user avatar
1 vote
0 answers
22 views

How do I pass a null value to one of the parameters of retrofit body

I have a request body { "userName":"xyz", "teamAssigned":null } and suppose this is stored in a serializable object in kotlin, xyzApiRequestBody, now when I pass ...
Eashubh Thapliyal's user avatar
0 votes
1 answer
19 views

Retrofit data sending

It's my first time trying to fetch data from the server in Kotlin using Retrofit so I'm sorry if the question sounds dumb to you. API interface @POST("/api/finger-print") suspend fun ...
Abdulrahman Hasanato's user avatar
0 votes
0 answers
22 views

Retrofit showing null values in imagepath

I am trying to display an image from an api but the gson response of retrofit shows "null" in place of image path. Here below is my code of main activity: lateinit var rvMain:RecyclerView ...
Khush Purohit's user avatar

15 30 50 per page
1
2 3 4 5
90