From ca3468bb22e4f7a794d7558946d7312de1974c4d Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sat, 14 Aug 2021 20:18:20 +0100 Subject: [PATCH] fix: Android add missing imports --- .../hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java b/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java index e06fee70..cab0d85d 100644 --- a/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java +++ b/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java @@ -37,7 +37,10 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; +import com.google.android.gms.tasks.OnCompleteListener; +import com.google.android.gms.tasks.Task; import com.google.firebase.iid.FirebaseInstanceId; +import com.google.firebase.iid.InstanceIdResult; import com.twilio.audioswitch.AudioDevice; import com.twilio.audioswitch.AudioSwitch; @@ -94,7 +97,7 @@ public class TwilioVoiceModule extends ReactContextBaseJavaModule implements Act static Map callNotificationMap; private RegistrationListener registrationListener = registrationListener(); - private UnregistrationListener unregistrationListener = unregistrationListener(); + private UnregistrationListener unregistrationListener = unregistrationListener(); private Call.Listener callListener = callListener(); private CallInvite activeCallInvite; @@ -677,7 +680,7 @@ private void registerForCallInvites() { Voice.register(accessToken, Voice.RegistrationChannel.FCM, fcmToken, registrationListener); } - /* + /* * Unregister your android device with Twilio * */ @@ -760,10 +763,10 @@ public void reject() { params.putString(Constants.CALL_TO, activeCallInvite.getTo()); activeCallInvite.reject(getReactApplicationContext()); } - + Intent intent = new Intent(getReactApplicationContext(), IncomingCallNotificationService.class); intent.setAction(Constants.ACTION_JS_REJECT); - + getReactApplicationContext().startService(intent); eventManager.sendEvent(EVENT_CALL_INVITE_CANCELLED, params);