UnifiedPush / flutter-connector

UnifiedPush connector library for flutter
Apache License 2.0
31 stars 9 forks source link

Can't send arbitrary bytes #64

Closed emersion closed 2 years ago

emersion commented 2 years ago

It seems like this library assume that the incoming messages are valid UTF-8 characters. However it doesn't seem like the spec requires this: any byte sequence should be passed through to the user.

My use-case is sending encrypted payloads via UP. Right now parts of the payload are replaced with the UTF-8 replacement character (65533), which breaks my decryption logic. I'd rather not use a layer of base64 encoding since this would deviate from the Web Push specification and require an additional HTTP proxy.

emersion commented 2 years ago

Ah, it seems like this was a planned changed anyways: https://github.com/UnifiedPush/flutter-connector/pull/56#issuecomment-1016206549

p1gp1g commented 2 years ago

We have just released a new spec for android and a new library version to address this problem. We are on a new flutter-connector version too (https://github.com/UnifiedPush/flutter-connector/tree/platform-interface).

The last thing to do is how the flutter lib passes platform specific features requests.

emersion commented 2 years ago

I've updated android-connector to v2.0.0 in this branch, if that helps:

https://github.com/emersion/flutter-connector/commits/platform-interface

karmanyaahm commented 2 years ago

I think v4.0.0 fixes this?