All Questions
1,341
questions
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 ...
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 ...
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
{
"...
-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 ...
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(
...
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("...
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: ...
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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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 ...
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
...