TP-37153 | fixes
This commit is contained in:
Submodule RN-UI-LIB updated: e9eb21ab19...b3b8599b14
@@ -90,7 +90,6 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
if (!location) {
|
||||
return;
|
||||
}
|
||||
toast({ type: 'info', text1: `Location: ${location.latitude}, ${location.longitude}` });
|
||||
const isActiveOnApp: string | boolean = (await getItem(StorageKeys.IS_USER_ACTIVE)) || false;
|
||||
const geolocation: IGeolocationPayload = {
|
||||
latitude: location.latitude,
|
||||
@@ -192,7 +191,7 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
{
|
||||
taskId: FOREGROUND_TASKS.GEOLOCATION,
|
||||
task: handleSendGeolocation,
|
||||
delay: 3000, // 3 minutes
|
||||
delay: 3 * MILLISECONDS_IN_A_MINUTE, // 3 minutes
|
||||
onLoop: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -5,27 +5,6 @@ import { logError } from '../../utlis/errorUtils';
|
||||
import { addClickstreamEvent } from '../../../services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES } from '../../../common/Constants';
|
||||
const FIVE_MIN = 5 * 60 * 1000;
|
||||
export const requestLocationPermission = async () => {
|
||||
try {
|
||||
const granted = await PermissionsAndroid.request(
|
||||
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
|
||||
{
|
||||
title: 'Geolocation Permission',
|
||||
message: 'Can we access your location?',
|
||||
buttonNeutral: 'Ask Me Later',
|
||||
buttonNegative: 'Cancel',
|
||||
buttonPositive: 'OK',
|
||||
}
|
||||
);
|
||||
return granted === 'granted';
|
||||
} catch (err) {
|
||||
toast({
|
||||
type: 'error',
|
||||
text1: 'requestLocationPermission failed',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export class CaptureGeolocation {
|
||||
private static capturedLocation: {
|
||||
|
||||
@@ -10,7 +10,7 @@ import PhoneIcon from '../assets/icons/PhoneIcon';
|
||||
import NotificationIconSmall from '../../RN-UI-LIB/src/Icons/NotificationIconSmall';
|
||||
|
||||
export const permissionsScreenMessage =
|
||||
'NAVI Cosmos needs your permission to give you access to certain featuress';
|
||||
'NAVI Cosmos needs your permission to give you access to certain features';
|
||||
|
||||
export const androidPermissions = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user