Background location using capacitor

Hello, I am using capacitor background-task in my android app. I want to get the location of the user every 15min and send it to the server even when the device is locked or app is in background. I am unable to send the location to the server. Can somebody please let me know, how to capture user locations in regular intervals and send to server if app is in background or device is locked using capacitor background-task ?

wait for cordova release dont go with capacitor its very less support and libraries.follow my blog with some capacitor tutorials about location,Firebase,push notfIcation etc.