Skip to content

Migrate sample from GCM to FCM#87

Merged
lbalmaceda merged 6 commits intomasterfrom
update-sample
Apr 5, 2019
Merged

Migrate sample from GCM to FCM#87
lbalmaceda merged 6 commits intomasterfrom
update-sample

Conversation

@lbalmaceda
Copy link
Copy Markdown
Contributor

Followed this migration guide.

Sample app won't run unless a valid google-services.json file is present on the app's module root.

.setRequestedPreviewSize(1024, 600)
.setRequestedFps(15.0f)
.setFocusMode(autoFocus ? Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE : null);
.setFocusMode(true ? Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE : null);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the conditionals.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Left this to linter auto-fix.

android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:textIsSelectable="true"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only affects the sample app. It makes the text selectable so one can easily copy the device name / fcm token and use it on the firebase console to send test fcm notifications . No cosmetic change.

+ "." + base64UrlSafeEncode(gson.toJson(claims).getBytes());
final byte[] messageBytes = headerAndPayload.getBytes();
final Signature signer = Signature.getInstance("SHA256withRSA", "BC");
final Signature signer = Signature.getInstance("SHA256withRSA");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caused by: java.security.NoSuchAlgorithmException: The BC provider no longer provides an implementation for Signature.SHA256withRSA.  

Please see https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html for more details.

@lbalmaceda lbalmaceda added this to the 0.4.0 milestone Apr 5, 2019
@lbalmaceda lbalmaceda merged commit 1ac2956 into master Apr 5, 2019
@lbalmaceda lbalmaceda deleted the update-sample branch April 5, 2019 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants