Ajax call not working on Android 8 built with Phonegap
Asked Answered
M

0

8

I have set a cheap certificate from Digicert on my server but I think it has an intermediate certificate. When testing my application on PhoneGap CLI using

phonegap serve

Ajax call to my server is working. But when the apk is built on PhoneGap, it is stuck on ajax call. How can I check if there is a problem? on Adobe PhoneGap build logs said it is build successfully.

Also, my server application is listening to 4000 port. Anyone can tell me how to fix this?

SSL Checker result

Mulvaney answered 29/6, 2020 at 16:14 Comment(9)
would you please edit to share your server public address? I'm assuming that's the same address you have in your app.Dicky
have you tested both with debug build and release build?Favourite
@Fabio, how it is same address in my app? my app is built on phonegap.Mulvaney
@MDP, I tried it on phonegap cli and it is working. But when I build it on adobe phonegap, it is not working. If I build it on adobe phonegap with lower API and android version, it is working.Mulvaney
I think it's related to minify feature of proguard. add annotation @keep to your object classes. see if it solves your problemFavourite
@M D P, can you provide where is the object classes?Mulvaney
@Mulvaney can you check android log cat and tell if you are getting IOException java.io.IOException: Cleartext HTTP traffic to * not permitted this exception because Starting with Android 9 (API level 28), cleartext support is disabled by default.Nikolaus
@arpan can you provide path for the log?Mulvaney
@Mulvaney you can use logcat of the Android Studio or you can use the command-line tool developer.android.com/studio/command-line/logcatNikolaus

© 2022 - 2024 — McMap. All rights reserved.