exponea / exponea-react-native-sdk

MIT License
8 stars 13 forks source link

Option to Exclude huawei_push_notification_id from Payload #118

Closed phuongwd closed 5 months ago

phuongwd commented 5 months ago

Hello guys,

Myy project does not support Huawei push notifications, and I would like to avoid sending the huawei_push_notification_id to the backend.

Currently, the request payload includes the huawei_push_notification_id field, even though it is not required for our use case:

curl 'https://api.eu1.exponea.com/track/v2/projects/***/customers' \
-X POST \
-H 'Authorization: Token ****' \
-H 'Host: api.eu1.exponea.com' \
-H 'Connection: Keep-Alive' \
-H 'User-Agent: okhttp/4.9.3' \
-H 'Content-Type: application/json; charset=utf-8' \
--data-raw '{"customer_ids":{"cookie":"****"},"properties":{"huawei_push_notification_id":" "},"timestamp": ***,"event_type":"campaign"}' \

I would greatly appreciate it if you could provide an option or a method to exclude the huawei_push_notification_id from the payload. This will help in ensuring that unnecessary data is not sent to the backend, aligning with our project's requirements.

Thank you,

adam1929 commented 5 months ago

Hi @phuongwd thank you for reporting. Sending push notification ID (google, ios, huawei) are required from our perspective of SDK usage and communication between Backend and SDK. Could you please describe you requirements? HTTPS communication is gzip-ed so few characters should not causing any problem. Also, push token is sending to BE only for customer identification, not in other tracked events. Thank you

phuongwd commented 5 months ago

Thanks for response @adam1929

For example, this use case when user logout on device. Please let me know if unclear

Screenshot 2024-06-13 at 18 19 26
phuongwd commented 5 months ago

bwt Do you see the status 403 screenshot above? its related to the appinbox/fetch. Id like to avoid this call!

adam1929 commented 5 months ago

Hi @phuongwd I truly understands that you don't want to send empty push token. But this behaviour is expected from SDK view and required. Especially for logging out process. What I meant by asking you for detailed description was for such cases as causing any issue or crash. I able to see only that sending of this property is not causing problem for your app. 403 response code is assigned to AppInbox fetch communication, you already opened that in separate thread. Please contact support to escalate your requirement to turn off AppInbox. Current version of SDK is unable to configure to turn this off. Thank you for understanding.

phuongwd commented 5 months ago

Hello @adam1929

So why do we send an empty huawei_push_notification_id from a non-Huawei device?