I made an apk with angular and capacitor, how can I consume an api in spring boot?

When I launch the ng serve in angular I can consume the api in spring boot by making a configuration with the ip of my laptop as a spring server, I would like to be able to achieve the same but with the apk that I generate with capacitor.

Thanks for your help

I recommend using HTTP Capacitor: GitHub - capacitor-community/http: Community plugin for native HTTP to call API to your Spring Server. Assuming your Android device is within the same network as your laptop, you should be able to access your API with your laptop’s IP in your local network.