Form service cannot establish connection using the app but works in browser

Hello friends I’m developing a small app with login and a basic interaction with a REST server, but have a BIG problem i cannot understand.
In the simple HTML login form have the traditional two fields (login/passwd) and a sibmit button, when I’m working in the browser (ionic serve) all works fine, the credentials arrive to the server and this one check if is correct and allow to continue (the normal behaviour) BUT if i generate the apk and installl in a phone (ionic cordova build android) it doesn’t work and NO request arrive to the server so i cannot login and do anything.
The login HTML is:

           <form #form="ngForm" (ngSubmit)="login(form)">
    <ion-grid>
      <ion-row color="primary" justify-content-center>
        ....
          <div padding>
            <ion-button size="large" type="submit" [disabled]="form.invalid" expand="block">Ingresar</ion-button>
          </div>
    </ion-grid>
  </form>

The page.ts file with the method have:

login(form) {
     this.Datos.login(form.value.usuario,form.value.password).subscribe(data => {
      if(data.uid){
        ...
        this.router.navigate(['tabs/tab1']);
      } else {
        ....
      }
    });
  }

In the service the code have:


login(usuario,pw): Observable<any>  {
    const httpOptions = {
      headers: new HttpHeaders({
        "Accept": 'application/json',
        'Content-Type': 'application/json'
      })
    };
    
    let datos = {
      "usuario": usuario,
      "passwd": pw
    }
    
    return this.http.post(`${this.baseUrl}/autenticar`, datos, httpOptions);
  }

As I say this works fine in browser and no in the APK installer.

Any ideas?

I would suggest ensuring that baseUrl begins with “https”.