Ionic HTTPS request pending after 5 minutes Android

I have a Foreground Service that take User Position. And I need to send that position to my Server to update user position.

If I put the App in background (open another app, lock screen…) I take his position for all the time I need, but after 5 minutes that the app is in background the HTTPS request to my server stay in pending.

  1. Put App in Background
  2. Take Position with a ForegroundService (@capacitor-community/background-geolocation) (work fine for all of the time)
  3. Send position to my HTTPS API (work fine for 5 minute and after the request stay in pending status)

(I try to disabled Battery Saver, I try to disabled sleep mode).

capacitor → 2
angular → 11
ionic → 5

Service in AndroidManifest.xml

<service
            android:name="com.equimaps.capacitor_background_geolocation.BackgroundGeolocationService"
            android:enabled="true"
            android:exported="true"
            android:foregroundServiceType="location|dataSync"
            android:directBootAware="true" />

Hi. Did you find any solution? I’m struggling with some similar issue: after fetching some files from firebase firestorage, from time to time, one gets stuck on ‘pending’ status. It is an audiofile.
The point is I have no issue on web. Any thought will be appreciated.
thanks !
dx

Same here, any solution?

Hello, did you find a solution ?

installing GitHub - capacitor-community/http: Community plugin for native HTTP to make background request no angular/http or web based libraries