Expo Location.startLocationUpdatesAsync background service doesn't work on real device(both ios, android)

I use expo framework to develop a react native mobile application, one of the requirements of this app is to send the user location(lat, lng) to our backend service using axio API request when user’s location is out of boundary. That means we need to keep monitoring current user’s location and calculate the distance from the user’s initial location to the user’s current location. Therefore, I implemented Location.startLocationUpdatesAsync to receiving location updates that can also come when the app is in the background. However,Expo Location.startLocationUpdatesAsync method only works on simulator, and it doesn’t work when we use the real device to test it. I was wondering if there is any configuration missing in my project so that this method cannot be process using the real device(both ios and android)

componentDidMount = async () => {
    const { status } = await Location.requestPermissionsAsync();

    if (status === 'granted') {
        await Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, {
            accuracy: Location.Accuracy.Balanced,
            showsBackgroundLocationIndicator: true
            // deferredUpdatesInterval : 10000

        });
    }
};......................
const calculateBoundary = (lat1, lon1, lat2, lon2, unit) => {
if ((lat1 == lat2) && (lon1 == lon2)) {
    return 0;
}
else {
    var radlat1 = Math.PI * lat1 / 180;
    var radlat2 = Math.PI * lat2 / 180;
    var theta = lon1 - lon2;
    var radtheta = Math.PI * theta / 180;
    var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
    if (dist > 1) {
        dist = 1;
    }
    dist = Math.acos(dist);
    dist = dist * 180 / Math.PI;
    dist = dist * 60 * 1.1515;
    if (unit == "K") { dist = dist * 1.609344 }
    if (unit == "N") { dist = dist * 0.8684 }
    return dist;
}
```.....

TaskManager.defineTask(LOCATION_TASK_NAME, async({ data, error }) => {
if (error) {
// Error occurred - check error.message for more details.
return;
}
if (data) {
const { locations } = data;
const timeStamp = (new Date().getTime()/1000).toString().split(".")[0];

try {
    const value = await AsyncStorage.getItem('user');
    if (value !== null) {
        //console.log(value);
        // We have data!!
        const email = '';
        const phone = JSON.parse(value).phone_number;
        const name = JSON.parse(value).given_name

        const urlList = "https://coxj3a2v77.execute-api.ap-southeast-2.amazonaws.com/production/profile/list";
        const urlSns ="https://coxj3a2v77.execute-api.ap-southeast-2.amazonaws.com/production/sns";
        const urlEvent ="https://coxj3a2v77.execute-api.ap-southeast-2.amazonaws.com/production/event";

        axios.get(urlList)
            .then(function (response) {
                // handle success
                //console.log("!!!" + JSON.stringify(response.data));
                const initLocation = { lat: response.data.lat, lng: response.data.lng };
                const initLat = initLocation.lat;
                const initLng = initLocation.lng;
                //let count=0;
                const K = calculateBoundary(initLat, initLng, locations[0].coords.latitude, locations[0].coords.longitude, "K");
                if(K>0.25){
                    console.log("Warning!!"+K)
                    const SnsPayload ={
                        name: name, 
                        email: email, 
                        phone_number: phone, 
                        lat: locations[0].coords.latitude, 
                        lng: locations[0].coords.longitude
                    }
                    const EventPayload={
                        email: email, 
                        lat: locations[0].coords.latitude, 
                        lng: locations[0].coords.longitude, 
                        time_stamp: timeStamp
                    }
                    console.log(SnsPayload);
                    axios.post(urlSns, SnsPayload)
                        .then(function (response) {
                            console.log("SNS:"+response);
                            //self.setState({ dialogVisible: true })
                        })
                        .catch(function (error) {
                            console.log(error);
                        });