Skip to content

Commit

Permalink
Merge pull request #77 from team-telnyx/docs-change
Browse files Browse the repository at this point in the history
Chore: Adjsut documentation to match recent release
  • Loading branch information
Oliver-Zimmerman authored Dec 13, 2024
2 parents 18db1c7 + d94f5be commit 82065b1
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 158 deletions.
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,23 +180,6 @@ In order to end a call, we can get a stored instance of Call and call the .endCa
}
```

### Handling Late Notifications
If notifcations arrive very late due to no internet connectivity, It is good to always flag it as a missed call. You can do that using the
code snippet below :

```dart
const CALL_MISSED_TIMEOUT = 60;
DateTime nowTime = DateTime.now();
Duration? difference = nowTime?.difference(message.sentTime!);
if (difference.inSeconds > CALL_MISSED_TIMEOUT) {
NotificationService.showMissedCallNotification(message);
return;
}
```


### DTMF (Dual Tone Multi Frequency)

In order to send a DTMF message while on a call you can call the .dtmf(callID, tone), method where tone is a String value of the character you would like pressed:
Expand Down Expand Up @@ -476,7 +459,21 @@ For a detailed tutorial, please visit our official [Push Notification Docs](http
});
```

### Handling Late Notifications
If notifications arrive very late due to no internet connectivity, It is good to always flag it as a missed call. You can do that using the
code snippet below :

```dart
const CALL_MISSED_TIMEOUT = 60;
DateTime nowTime = DateTime.now();
Duration? difference = nowTime?.difference(message.sentTime!);
if (difference.inSeconds > CALL_MISSED_TIMEOUT) {
NotificationService.showMissedCallNotification(message);
return;
}
```

#### Best Practices for Push Notifications on iOS
1. Push Notifications only work in foreground for apps that are run in `debug` mode (You will not receive push notifications when you terminate the app while running in debug mode). Make sure you are in `release` mode. Preferably test using Testfight or Appstore.
Expand Down
17 changes: 0 additions & 17 deletions docs-markdown/classes/Call.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,6 @@ In order to end a call, we can get a stored instance of Call and call the .endCa
}
```

### Handling Late Notifications
If notifcations arrive very late due to no internet connectivity, It is good to always flag it as a missed call. You can do that using the
code snippet below :

```dart
const CALL_MISSED_TIMEOUT = 60;
DateTime nowTime = DateTime.now();
Duration? difference = nowTime?.difference(message.sentTime!);
if (difference.inSeconds > CALL_MISSED_TIMEOUT) {
NotificationService.showMissedCallNotification(message);
return;
}
```


### DTMF (Dual Tone Multi Frequency)

In order to send a DTMF message while on a call you can call the .dtmf(callID, tone), method where tone is a String value of the character you would like pressed:
Expand Down
Loading

0 comments on commit 82065b1

Please sign in to comment.