NTP-38623 |copy changes| aman singh

This commit is contained in:
Aman Singh
2025-02-25 18:49:35 +05:30
parent a8447796a8
commit 95e5f763b4
4 changed files with 187 additions and 2 deletions

View File

@@ -110,8 +110,19 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
const checkDefaultDialerApp = async () => {
const defaultDialer = await getDefaultCallingApp();
const path = RNFS.CachesDirectoryPath + '/call_data.json'; // Path to your file
// Read the JSON file
RNFS.readFile(path).then((contents) => {
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_COSMOS_CONNECTED_CALL_EVENTS, {
data: JSON.stringify(contents)
});
RNFS.unlink(path);
}).catch((err) => {
console.error('Error reading file:', err);
});
addClickstreamEvent(CLICKSTREAM_EVENT_NAMES.FA_COSMOS_DEFAULT_DIALER, {
defaultDialer,
defaultDialer
});
};
@@ -248,7 +259,7 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
{
taskId: FOREGROUND_TASKS.DEFAULT_DIALER_APP,
task: checkDefaultDialerApp,
delay: 5 * MILLISECONDS_IN_A_MINUTE, // 5 minutes
delay: 0.5 * MILLISECONDS_IN_A_MINUTE, // 5 minutes
onLoop: true,
},
{