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

[android][brightness] Fix: add event to module definition #24942

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

alanjhughes
Copy link
Collaborator

@alanjhughes alanjhughes commented Oct 19, 2023

Why

Same as #24943

How

This module has an event that is only supported on iOS but it still needs to be added to the module definition onAndroid to prevent a warning.

Test Plan

bare-expo. The warning is cleared

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Oct 19, 2023
@alanjhughes alanjhughes marked this pull request as ready for review October 19, 2023 07:49
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Oct 19, 2023
class BrightnessModule : Module() {
private val currentActivity
get() = appContext.currentActivity ?: throw Exceptions.MissingActivity()

override fun definition() = ModuleDefinition {
Name("ExpoBrightness")

Events(brightnessChangeEvent)
Copy link
Member

Choose a reason for hiding this comment

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

@alanjhughes alanjhughes merged commit c0e7f9d into main Oct 19, 2023
8 checks passed
@alanjhughes alanjhughes deleted the @alanhughes/fix/android-brightness branch October 19, 2023 11:56
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Oct 20, 2023
@chrisnojima
Copy link

I belive this also happens in the ex-av module. If i edit the logline to include the nativeModule it shows
WARN {"getAudioRecordingStatus": [Function getAudioRecordingStatus], "getAvailableInputs": [Function getAvailableInputs], "getCurrentInput": [Function getCurrentInput], "getPermissionsAsync": [Function getPermissionsAsync], "getStatusForSound": [Function getStatusForSound], "getStatusForVideo": [Function getStatusForVideo], "loadForSound": [Function loadForSound], "loadForVideo": [Function loadForVideo], "pauseAudioRecording": [Function pauseAudioRecording], "prepareAudioRecorder": [Function prepareAudioRecorder], "replaySound": [Function replaySound], "replayVideo": [Function replayVideo], "requestPermissionsAsync": [Function requestPermissionsAsync], "setAudioIsEnabled": [Function setAudioIsEnabled], "setAudioMode": [Function setAudioMode], "setInput": [Function setInput], "setStatusForSound": [Function setStatusForSound], "setStatusForVideo": [Function setStatusForVideo], "startAudioRecording": [Function startAudioRecording], "stopAudioRecording": [Function stopAudioRecording], "unloadAudioRecorder": [Function unloadAudioRecorder], "unloadForSound": [Function unloadForSound], "unloadForVideo": [Function unloadForVideo]} `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants