NTP-38623 | Dialer Bug Fixes
This commit is contained in:
@@ -113,8 +113,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
|
||||
def VERSION_CODE = 237
|
||||
def VERSION_NAME = "2.18.0"
|
||||
def VERSION_CODE = 247
|
||||
def VERSION_NAME = "2.18.4"
|
||||
|
||||
android {
|
||||
namespace "com.avapp"
|
||||
|
||||
@@ -202,10 +202,10 @@ public class CallModule extends ReactContextBaseJavaModule {
|
||||
@ReactMethod
|
||||
public void startDialerApp() {
|
||||
Intent launchIntent = reactContext.getPackageManager().getLaunchIntentForPackage(CALLING_APP_PACKAGE);
|
||||
launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
if (launchIntent != null) {
|
||||
Log.d(TAG, "Call initiated successfully.");
|
||||
launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
reactContext.startActivity(launchIntent);
|
||||
} else {
|
||||
Log.e(TAG, "No app found to handle the call.");
|
||||
|
||||
@@ -1 +1 @@
|
||||
238
|
||||
247
|
||||
@@ -1 +1 @@
|
||||
2.18.1
|
||||
2.18.4
|
||||
@@ -1 +1 @@
|
||||
307
|
||||
308
|
||||
@@ -1 +1 @@
|
||||
100.2.3
|
||||
100.2.4
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "AV_APP",
|
||||
"version": "2.18.0",
|
||||
"buildNumber": "237",
|
||||
"version": "2.18.4",
|
||||
"buildNumber": "247",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android:dev": "yarn move:dev && react-native run-android",
|
||||
|
||||
@@ -1484,6 +1484,10 @@ export const CLICKSTREAM_EVENT_NAMES = {
|
||||
name: 'FA_CALL_VIA_INHOUSE_DIALER_APP_FAILED',
|
||||
description: 'Call via inhouse dialer app failed',
|
||||
},
|
||||
FA_DEFAULT_DIALER_BLOCKER_SCREEN_LOADED: {
|
||||
name: 'FA_DEFAULT_DIALER_BLOCKER_SCREEN_LOADED',
|
||||
description: 'Default dialer blocker screen loaded',
|
||||
},
|
||||
FA_COSMOS_DEFAULT_DIALER: {
|
||||
name: 'FA_COSMOS_DEFAULT_DIALER',
|
||||
description: 'Cosmos default dialer',
|
||||
|
||||
@@ -6,9 +6,10 @@ import NavigationHeader from '@rn-ui-lib/components/NavigationHeader';
|
||||
import Text from '@rn-ui-lib/components/Text';
|
||||
import { GenericStyles } from '@rn-ui-lib/styles';
|
||||
import Layout from '@screens/layout/Layout';
|
||||
import React from 'react';
|
||||
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
||||
import React, { useEffect } from 'react';
|
||||
import { Linking, Pressable, StyleSheet, View } from 'react-native';
|
||||
|
||||
import { CLICKSTREAM_EVENT_NAMES } from './Constants';
|
||||
|
||||
const DefaultDialerScreen: React.FC = () => {
|
||||
const openHelpForm = () => {
|
||||
@@ -17,6 +18,10 @@ const DefaultDialerScreen: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_DIALER_APP_BLOCKER_SCREEN_LOADED);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<View style={[GenericStyles.fill]}>
|
||||
@@ -42,7 +47,7 @@ const DefaultDialerScreen: React.FC = () => {
|
||||
<View style={[GenericStyles.elevation10, GenericStyles.p16, GenericStyles.whiteBackground]}>
|
||||
<Button
|
||||
title="Open Cosmos dialer"
|
||||
onPress={()=>startDialerApp()}
|
||||
onPress={() => startDialerApp()}
|
||||
style={GenericStyles.w100}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -11,9 +11,7 @@ import CosmosForegroundService, {
|
||||
} from '../services/foregroundServices/foreground.service';
|
||||
import useIsOnline from '../hooks/useIsOnline';
|
||||
import { getSyncTime, sendCurrentGeolocationAndBuffer } from '../hooks/capturingApi';
|
||||
import {
|
||||
getAppVersion,
|
||||
} from '../components/utlis/commonFunctions';
|
||||
import { getAppVersion } from '../components/utlis/commonFunctions';
|
||||
|
||||
import { setServerTimestamp } from '../reducer/foregroundServiceSlice';
|
||||
import { logError } from '../components/utlis/errorUtils';
|
||||
@@ -21,7 +19,10 @@ import { useAppDispatch, useAppSelector } from '../hooks';
|
||||
import { dataSyncService } from '../services/dataSync.service';
|
||||
import { DATA_SYNC_TIME_INTERVAL, IS_DATA_SYNC_REQUIRED } from '../constants/config';
|
||||
import useIsLocationEnabled from '../hooks/useIsLocationEnabled';
|
||||
import { MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_SECOND } from '../../RN-UI-LIB/src/utlis/common';
|
||||
import {
|
||||
MILLISECONDS_IN_A_MINUTE,
|
||||
MILLISECONDS_IN_A_SECOND,
|
||||
} from '../../RN-UI-LIB/src/utlis/common';
|
||||
import { getConfigData } from '../action/configActions';
|
||||
import { AppStates } from '../types/appStates';
|
||||
import { StorageKeys } from '../types/storageKeys';
|
||||
@@ -74,6 +75,7 @@ export enum FOREGROUND_TASKS {
|
||||
NEARBY_CASES_GEOLOCATION_CHECK = 'NEARBY_CASES_GEOLOCATION_CHECK',
|
||||
COSMOS_SYNC_WITH_LONGHORN = 'COSMOS_SYNC_WITH_LONGHORN',
|
||||
WIFI_DETAILS_SYNC = 'WIFI_DETAILS_SYNC',
|
||||
DEFAULT_DIALER_APP = 'DEFAULT_DIALER_APP',
|
||||
}
|
||||
|
||||
interface ITrackingComponent {
|
||||
@@ -106,14 +108,14 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
|
||||
const resyncFirebase = useResyncFirebase();
|
||||
|
||||
const checkDefaultDialerApp = async () => {
|
||||
const defaultDialer = await getDefaultCallingApp();
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_COSMOS_DEFAULT_DIALER, {
|
||||
defaultDialer,
|
||||
});
|
||||
};
|
||||
|
||||
const handleUpdateActivity = async () => {
|
||||
const isDialerEnabled = store?.getState()?.user?.featureFlags?.isCosmosDiallerEnabled;
|
||||
if (isDialerEnabled) {
|
||||
const defaultDialer = await getDefaultCallingApp();
|
||||
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_COSMOS_DEFAULT_DIALER, {
|
||||
defaultDialer
|
||||
}, true);
|
||||
}
|
||||
const foregroundTimestamp = await getItem(StorageKeys.APP_FOREGROUND_TIMESTAMP);
|
||||
const backgroundTimestamp = await getItem(StorageKeys.APP_BACKGROUND_TIMESTAMP);
|
||||
const stateSetTimestamp = await getItem(StorageKeys.STATE_SET_TIMESTAMP);
|
||||
@@ -206,14 +208,12 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const checkPermissions = async () => {
|
||||
const permissionsToRequest = await getPermissionsToRequest();
|
||||
const allPermissionsGranted = permissionsToRequest?.length === 0;
|
||||
return allPermissionsGranted;
|
||||
};
|
||||
|
||||
|
||||
const appVersion = getAppVersion();
|
||||
|
||||
const taskSyncToLonghorn = async () => {
|
||||
@@ -245,6 +245,12 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
delay: ACTIVITY_TIME_WINDOW * MILLISECONDS_IN_A_MINUTE, // 10 minutes
|
||||
onLoop: true,
|
||||
},
|
||||
{
|
||||
taskId: FOREGROUND_TASKS.DEFAULT_DIALER_APP,
|
||||
task: checkDefaultDialerApp,
|
||||
delay: 5 * MILLISECONDS_IN_A_MINUTE, // 5 minutes
|
||||
onLoop: true,
|
||||
},
|
||||
{
|
||||
taskId: FOREGROUND_TASKS.DELETE_CACHE,
|
||||
task: deleteCache,
|
||||
@@ -321,18 +327,12 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
|
||||
if (IS_DATA_SYNC_REQUIRED) {
|
||||
tasks.push({
|
||||
taskId: FOREGROUND_TASKS.DATA_SYNC,
|
||||
delay:
|
||||
isCallingApp()
|
||||
? 5 * MILLISECONDS_IN_A_MINUTE
|
||||
: DATA_SYNC_TIME_INTERVAL,
|
||||
delay: isCallingApp() ? 5 * MILLISECONDS_IN_A_MINUTE : DATA_SYNC_TIME_INTERVAL,
|
||||
task: handleDataSync,
|
||||
onLoop: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const userActivityUpdateOnBackground = async () => {
|
||||
const foregroundTimestamp = await getItem(StorageKeys.APP_FOREGROUND_TIMESTAMP);
|
||||
const backgroundTimestamp = await getItem(StorageKeys.APP_BACKGROUND_TIMESTAMP);
|
||||
|
||||
Reference in New Issue
Block a user