I used android httpClient to make my requests, everything works perfectly in ios or web. When i build my app in Android Studio my requests all error with this message:
Msg: Native: tried accessing the undefined plugin but it's not installed.
This is the code from the function:
login() {
this.loading = true;
if (this.loginForm.value)
this.api.login(this.loginForm.value)
.pipe(catchError((e) => {
this.loading = false;
console.log(e);
console.log("NAYYYY");
throw e;
}))
.subscribe(async (r) => {
console.log("YAY");
await this.auth.login(r)
this.loading = false;
}
);
}
and the request from the service:
login(data: any) {
this.headers.append('Content-Type', 'application/json; charset=utf-8');
return this.http.post(`http://127.0.0.1:3000/login`, data, { headers: this.headers })
}
Any help or guidance is greatly appreciated