hello everyone ? i have an issue regarding ionic app ? the app works fine on chrome browser but not working on my android device , when i login it shows me “please wait” and stays longer ? please help me as soon as possible ?
what error it is showing, console logs
i donot get any error ? it works fine on chrome browser ? but not work on android device ? it shows me loadind loading all the time ? i call login api and after successful login , i navigate to other page , but on device it shows me loading loading all the time and on browser it works fine ?
this is my code which i calling on button click ?
Signin()
{
if (this.login.Email === ‘’ || this.login.Password === ‘’)
{
let alert = this.alert.create({
title: ‘Login Error’,
subTitle: ‘All fields are rquired !’,
buttons: [‘OK’]
});
alert.present();
return;
}
else
{
let loadingPopup = this.loadingCtrl.create({
content: ' Checking ! Please wait...'
});
loadingPopup.present();
this.restapiService.Btclogin(this.login).then((result) =>
{
result => result;
this.Obj = result;
this.globalservice._GlobalapiSecret = this.Obj.ApiKey
this.restapiService.btcaddressafterlogin();
this.restapiService.Getbtcpriceafterlogin();
if (this.Obj.ErrorMessage === 'Invalid Username or Password')
{
let alert = this.alert.create({
title: 'login error !',
subTitle: 'Invalid username or password !',
buttons: ['OK']
});
alert.present();
loadingPopup.dismiss();
this.loginform.reset();
return;
}
else
{
loadingPopup.dismiss();
this.navCtrl.push(TabsPage)
}
}
)
}
}
Please edit your post, it is not very readable at the moment.
Use the </>
button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ```
manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.
Also post your ionic info
output please.
Actually i got the issue ? my app is not connected to internet , and when i run this app through android device it does not connect to internet ? but when i run it on chrome browser , it run fine ? Please Help ?
you shld handle api error as well . check about permission of internet as well
i checked it ? everything is fine ? but the problem is persist ?