Skip to content

Commit

Permalink
normal call configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen-g09 committed Jan 2, 2024
1 parent a238c53 commit 68e0489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
29 changes: 1 addition & 28 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,8 @@ export default function TabOneScreen() {
prompt: false,
};

RNImmediatePhoneCall.immediatePhoneCall(args).catch(console.error);
call(args).catch(console.error);
};

// const handleCallPress = (contactNumber: string) => {
// const args = {
// number: contactNumber,
// prompt: false,
// };

// if (RNImmediatePhoneCall && RNImmediatePhoneCall.immediatePhoneCall) {
// RNImmediatePhoneCall.immediatePhoneCall(args).catch(() => {
// // If immediate call fails, use the alternative method
// handleAlternativeCall(args);
// });
// } else {
// // If RNImmediatePhoneCall is not available, use the alternative method
// handleAlternativeCall(args);
// }
// };

// const handleAlternativeCall = (callArgs: {
// number: string;
// prompt: boolean;
// }) => {
// call(callArgs).catch((error) => {
// console.error("Error making the call:", error);
// });
// };

return (
<View className="flex-1 items-center justify-center">
<View
Expand Down
2 changes: 1 addition & 1 deletion db.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{ "id": "1", "name": "Task 1", "contactNumber": "+917208208480", "trials": 3 },
{ "id": "2", "name": "Task 2", "contactNumber": "+919113317500", "trials": 5 },
{ "id": "3", "name": "Task 3", "contactNumber": "763454343", "trials": 2 },
{ "id": "4", "name": "Task 4", "contactNumber": "45345354353", "trials": 7 },
{ "id": "4", "name": "Task 4", "contactNumber": "111-222-3333", "trials": 7 },
{ "id": "5", "name": "Task 5", "contactNumber": "444-444-4444", "trials": 1 },
{ "id": "6", "name": "Task 6", "contactNumber": "888-888-8888", "trials": 4 },
{ "id": "7", "name": "Task 7", "contactNumber": "999-999-9999", "trials": 6 },
Expand Down

0 comments on commit 68e0489

Please sign in to comment.