Created
April 22, 2024 07:58
-
-
Save tmodoux/7e3cb52524efc6553ac172b907c5896c to your computer and use it in GitHub Desktop.
MainReactNativeHost kotlin code for twilio voice sdk integration in android app built with React native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.androidapp | |
import android.app.Application | |
import com.facebook.react.PackageList | |
import com.facebook.react.ReactPackage | |
import com.twiliovoicereactnative.VoiceApplicationProxy | |
class MainReactNativeHost(application: Application) : VoiceApplicationProxy.VoiceReactNativeHost(application) { | |
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG | |
override fun getPackages(): List<ReactPackage> { | |
val packages = PackageList(this).packages | |
// Packages that cannot be autolinked yet can be added manually here | |
// packages.add(MyReactNativePackage()) | |
return packages | |
} | |
override fun getJSMainModuleName(): String = "index" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment