Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

Ionic HTTPS request pending after 5 minutes Android

$
0
0

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" />

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles