Hello Erel,
I did not put the Service.StartForeground command as it works with Wifi and Ble. With the Usb after four minutes it no longer updates the db, however as soon as I reactivate the app the records are written of the db and sent on the web. I saw your Mylocation example but I don't know how to apply the StartForeground command
Thanks for your help
Marco