When testing the app with ‘ionic cordova run android’ on my cellphone, everything works fine. The problem comes after I download the same app from the play store. Apparently the problem revolves around the POST event:
this.http.post(‘https://chinchon.ga:8080/checarPonente’, JSON.stringify(this.myForm.value), {headers: { ‘Content-Type’: ‘application/json’ }}).subscribe(res => {
console.log(res);
if(res == true){
this.navCtrl.push(SpeakerPage);
}else if(res == 404){
let alert = this.alertCtrl.create({
message: “The user provided does not exist”,
buttons: [{
text: “Ok”,
role: ‘cancel’
}]
});
alert.present();
}else if(res == 405){
let alert = this.alertCtrl.create({
message: “The user or password are wrong”,
buttons: [{
text: “Ok”,
role: ‘cancel’
}]
});
alert.present();
}
});
Does anyone know how to solve this? Or why this is happening?