416 questions
0 votes
0 answers
86 views
Android Retrofit throwing exception instead of showing response
My following code throws an exception instead of showing the response: fun getRoadStatus(roadName: String) { // Couroutine to fetch data from the API viewModelScope.launch { ...
3 votes
0 answers
3k views
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found on Android 7.0
I'm using https://github.com/lingochamp/FileDownloader for downloading from https server. I'm getting the exception on below android 7 only while downloading. Trust anchor for certification path not ...
4 votes
0 answers
652 views
Android HttpURLConnection call starts to fail at 20:00 2021-09-29 with website using Let's Encrypt certificate
A website uses Let's Encrypt SSL certificate. An Android app calls an API of this website. It worked perfectly until around 20:00 2021-09-29 UTC URL url = new URL("https://my.domain.com/Home/...
0 votes
0 answers
176 views
How to solve error on HttpURLConnection in android with URL having special characters?
I am trying to call a get API call using HttpURLConnection in android. I am passing some values as headers on the URL. This API returns not found response if that value contains special characters ...
1 vote
2 answers
148 views
Android - Track down why app using so much data
I am currently having an issue with my app using a lot of mobile data and I am not 100% sure why as the typical request is just JSON sent/received data and typically very small (IE sending username/...
0 votes
2 answers
91 views
Android post image to php server always fail
Thanks to everyone who helped me. Here is my success method, use post method to post two parameter(no, key) and image file to php server. Hope can help other in need. static String ...
7 votes
3 answers
9k views
How to resolved http and Site Behavior: Navigation error in android app?
Recently I updated android 9 to android 10 but unfortunately, the app sometimes crashes and gives this error. com.fgapps.maker E/chromium: [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy ...
0 votes
1 answer
233 views
android studio use cleartext http on api 17
I am using xammp server for php on localhost , i was working before update (i think), but now http connection gives me an exception: W/System.err: java.io.IOException: Cleartext HTTP traffic to 192....
0 votes
2 answers
2k views
Getting response code from volley error response
How do we get response code and message of an errenous response from client? Here error.toString() returns: com.android.volley.ServerError error.getMEssage(): null error.getCause(): null ...
1 vote
0 answers
1k views
how to set proxy for all connections in an android app?
I want to use this library for playing some youtube video in my android app. but in my country youtube is blocked. I want to use proxy or anything else, only for my app to solving this problem. I ...
0 votes
2 answers
254 views
Problem with using httpclient for fetching data
I want to use httpclient in my android app. I know this library is deprecated a long time ago but I want to use it for some reason. When I write some code to fetch JSON data from an URL the emulator ...
1 vote
3 answers
2k views
android - how to hide url request
recently some one told me that he retrieves all the url requests from my android application and he sent them to me . I'm using proguard in my application but he told me there are some ways that he ...
0 votes
0 answers
483 views
Server returns error code 400, but works perfectly in localhost in HTTP request
I am making a HttpRequest to upload 3 images and some params.i have given the code below. Everything is working fine when i make request with localhost, but When i make request with an external server ...
0 votes
2 answers
783 views
How to check from a web if the versionName of apk with the installed apk at device it is the same or not in Android Studio
I am trying to check at runtime if there is a new version of the app from an url. I have deployed the app at the online domain which is something like this www.test.com/androidapp/app_debug.apk and ...
5 votes
1 answer
45k views
Android - Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
I'm using self-signed CA certificate for testing environment but facing issue to hit api using HttpClient.... Please help me to fix this issue.... W/System.err: javax.net.ssl.SSLHandshakeException: ...