The problem is when I generate the APK in release mode, the login in my app doesn’t work. But… I already done a lot of tests. And I found that the problem is when I change “Debuggable” to false. If I set it true, the app works like a charm.
The other problem is that I can’t upload a debuggable APK to Google Play.
Yes, I always build with ionic CLI with this commands:
ionic cordova build android --release
ionic cordova build android --prod --release
I just was using Android Studio for testing purposes. Just to have more advanced options in the build steps.
I already tried with a new project, but in all my projects the HTTP or HTTPCLIENT requests in debug mode work propperly. When I change to build a release APK the HTTP or HTTPCLIENT requests don’t return anything. (It’s the same code, same provider, etc for debug and release )
Only the first alert (“First”) is shown, the “Received” alert not.
I already tried with Observables, Http and HttpClient. But same problem. If it’s in debug mode works fine, but if I build a release the requests doesn’t work.
My ionic info is:
cli packages: (C:\Users\admin\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.13.1
ionic (Ionic CLI) : 3.13.2
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.0
System:
Node : v8.5.0
npm : 5.3.0
OS : Windows 10
Misc:
backend : pro
The site where I have my rest api, didn’t have a valid SSL certificate. I think HTTP and HTTPClient validates the url in release mode. I update my SSL and it worked