DiscipleTools / DiscipleTools/disciple-tools-mobile-app-plugin

Handle Device ID with Push Notification Token

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

As of https://github.com/DiscipleTools/disciple-tools-mobile-app/issues/179, we are sending another field: `add_device_id` when submitting the Push Notification Token to the D.T API:

`https://${domain}/wp-json/dt/v1/user/update`

```
{
"add_push_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
"add_device_id": "Apple:iPhone XR:2018:iOS:13.3.1"
}
```

So we will want to decide how to best handle this on the D.T API side. We could use the Device ID as a `key` to a hashmap and store only the latest token for a given device:

```
$myhashmap = array();
$myhashmap[$fields["add_device_id"]] = $fields["add_push_token"];
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.