Community.Expo.Server.SDK
1.2.1
See the version list below for details.
dotnet add package Community.Expo.Server.SDK --version 1.2.1
NuGet\Install-Package Community.Expo.Server.SDK -Version 1.2.1
<PackageReference Include="Community.Expo.Server.SDK" Version="1.2.1" />
paket add Community.Expo.Server.SDK --version 1.2.1
#r "nuget: Community.Expo.Server.SDK, 1.2.1"
// Install Community.Expo.Server.SDK as a Cake Addin #addin nuget:?package=Community.Expo.Server.SDK&version=1.2.1 // Install Community.Expo.Server.SDK as a Cake Tool #tool nuget:?package=Community.Expo.Server.SDK&version=1.2.1
community-expo-push-notification-server-sdk
Installation
Install package through NuGet - Community.Expo.Server.SDK
To send requests without access token use version 1.1.2
Since version 1.2.0 access token is required
Usage
Send push notification
IPushApiClient _client = new PushApiClient("your token here");
PushTicketRequest pushTicketRequest = new PushTicketRequest()
{
PushTo = new List<string>() { ... },
PushTitle = "TEST 1",
PushBody = "TEST 1",
PushChannelId = "test"
};
PushTicketResponse result = await _client.SendPushAsync(pushTicketRequest);
If no errors, then wait for a few moments for the notifications to be delivered.
Then request receipts for each push ticket.
Later, after the Expo push notification service has delivered the notifications to Apple or Google (usually quickly, but allow the the service up to 30 minutes when under load),
a "receipt" for each notification is created.
The receipts will be available for at least a day; stale receipts are deleted.
Get push notification receipts
The ID of each receipt is sent back in the response "ticket" for each notification.
In summary, sending a notification produces a ticket, which contains a receipt ID you later use to get the receipt.
The receipts may contain error codes to which you must respond.
In particular, Apple or Google may block apps that continue to send notifications to devices that have blocked notifications or have uninstalled your app.
Expo does not control this policy and sends back the feedback from Apple and Google so you can handle it appropriately.
IPushApiClient _client = new PushApiClient("your token here");
PushReceiptRequest pushReceiptRequest = new PushReceiptRequest() { PushTicketIds = new List<string>() { ... } };
PushReceiptResponse pushReceiptResult = await _client.GetReceiptsAsync(pushReceiptRequest);
foreach (var pushReceipt in pushReceiptResult.PushTicketReceipts)
{
// handle delivery status, etc
}
See Also
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Options (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
- Polly (>= 7.2.3)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
-
net6.0
- Microsoft.Extensions.Options (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
- Polly (>= 7.2.3)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
add retries