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

fix: use proper context instead of activity #1232

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

g4rb4g3
Copy link
Contributor

@g4rb4g3 g4rb4g3 commented Aug 6, 2024

As Samuel pointed out in this issue the createClient currently might fail if there is no activity launched yet. This can happen especially on apps making use of Android Auto since that runs on a service only and has no activity.

This PR makes use of the reactContext that is passed when creating an instance of BlePlxModule so there should be a valid context all the time now.

@dimninik you changed that a while ago, do you remember why you came up with this solution to use the activity instead of the reactContext? c610878#diff-a1a97970184ebc2e5a60c771e7f36d7679d4977f1232a0f9247a77957c707a39R87

@intent-kacper-cyranowski intent-kacper-cyranowski merged commit 99b33b7 into dotintent:master Aug 27, 2024
10 checks passed
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