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

[AND-209] Revert public api changes. #25

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

VelikovPetar
Copy link

🎯 Goal

  • Reverts some of the breaking changes in the public api introduced with the KMP migration.

🛠 Implementation details

  • Move firebase-related changes from commonMain to androidMain to utilise Android specific classes (Context, FirebaseMessaging)
  • Change PushDeviceGenerator suspend fun generatePushDevice to fun asyncGeneratePushDevice
  • Remove the isValidForThisDevice lambda from the PushDeviceGenerators constructors, and put the checks in their own isValidForThisDevice methods
  • Change FirebaseMessagingDelegate from handleRemoteMessage(StreamRemoteMessage) to handleRemoteMessage(RemoteMessage)
  • 🚨 Breaking change that couldn't be reverted: The PushDeviceGenerator isValidForThisDevice(Context) method is no longer possible, as stream-android-push is KMP, and we cannot access Context there. Therefore, instead of passing Context to the isValidForThisDevice method, we need to pass it as contractor param to the implementations of the PushDeviceGenerator. This is relevant for FirebasePushDeviceGenerator, Huawei/Xiaomi already accepted Context via their constructors.

@VelikovPetar VelikovPetar requested a review from a team January 17, 2025 11:59
@JcMinarro JcMinarro merged commit c889079 into main Jan 20, 2025
4 checks passed
@JcMinarro JcMinarro deleted the feature/revert-public-api-changes branch January 20, 2025 22:58
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.

2 participants