Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always enable notifications + Fix them #3111

Merged
merged 2 commits into from Nov 6, 2018

Conversation

borisyankov
Copy link
Contributor

@borisyankov borisyankov commented Nov 5, 2018

Previously we did disable notifications on emulators. That is not
only not needed but also counter-productive as we want to be able
to test them on different device configurations.

Removes the config flag enableNotifications completely and the
check that uses this flag to enable/not enable the notifications.

Also, fixes notifications not working in Android emulator!

@gnprice gnprice added the review label Nov 5, 2018
@borisyankov borisyankov changed the title Always enable notifications Always enable notifications + Fix them Nov 6, 2018
Previously we did disable notifications on emulators. That is not
only not needed but also counter-productive as we want to be able
to test them on different device configurations.

Removes the config flag `enableNotifications` completely and the
check that uses this flag to enable/not enable the notifications.
Fixes zulip#3113.

The native code inside `react-native-notifications` varied its
behavior when reading the `gcm_id` value from the metadata.  Because
of this, in the emulator it was throwing a `MismatchSenderId` error.

From an upstream issue thread, we take the solution of changing
`android:value="your_sender_id\0"` to `android:value="your_sender_id\"`.
This works on both an emulated and a physical device, despite the
warning in the official documentation:
   // IMPORTANT: Leave the trailing \0 intact!!!

While here, clean up a bit: extract this value to a string resource
and refer to it by name.
@gnprice gnprice merged commit 66e8675 into zulip:master Nov 6, 2018
@gnprice
Copy link
Member

gnprice commented Nov 6, 2018

Merged. Thanks @borisyankov for debugging this!

@gnprice gnprice removed the review label Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants