├── .gitignore ├── DUMMY.ev ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── supersimon │ │ │ └── meetingsApp │ │ │ └── ReactNativeFlipper.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── supersimon │ │ │ │ └── meetingsApp │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ └── splashscreen_image.png │ │ │ ├── drawable-mdpi │ │ │ └── splashscreen_image.png │ │ │ ├── drawable-xhdpi │ │ │ └── splashscreen_image.png │ │ │ ├── drawable-xxhdpi │ │ │ └── splashscreen_image.png │ │ │ ├── drawable-xxxhdpi │ │ │ └── splashscreen_image.png │ │ │ ├── drawable │ │ │ ├── rn_edit_text_material.xml │ │ │ └── splashscreen.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_foreground.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── colors.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── release │ │ └── java │ │ └── com │ │ └── supersimon │ │ └── meetingsApp │ │ └── ReactNativeFlipper.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── app ├── (inside) │ ├── (room) │ │ └── [id].tsx │ ├── _layout.tsx │ └── index.tsx ├── _layout.tsx └── index.tsx ├── assets ├── data │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ └── rooms.ts ├── fonts │ └── SpaceMono-Regular.ttf └── images │ ├── adaptive-icon.png │ ├── favicon.png │ ├── icon.png │ └── splash.png ├── babel.config.js ├── components ├── ChatView.tsx ├── CustomBottomSheet.tsx ├── CustomCallControls.tsx └── CustomTopView.tsx ├── constants └── Colors.ts ├── context └── AuthContext.tsx ├── install.sh ├── ios ├── .gitignore ├── .xcode.env ├── Podfile ├── Podfile.lock ├── Podfile.properties.json ├── meetingsApp.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── meetingsApp.xcscheme ├── meetingsApp.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── meetingsApp │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── App-Icon-1024x1024@1x.png │ │ └── Contents.json │ ├── Contents.json │ ├── SplashScreen.imageset │ │ ├── Contents.json │ │ └── image.png │ └── SplashScreenBackground.imageset │ │ ├── Contents.json │ │ └── image.png │ ├── Info.plist │ ├── SplashScreen.storyboard │ ├── Supporting │ └── Expo.plist │ ├── main.m │ ├── meetingsApp-Bridging-Header.h │ ├── meetingsApp.entitlements │ └── noop-file.swift ├── metro.config.js ├── package-lock.json ├── package.json ├── screenshots ├── 1.png ├── 2.png ├── 3.png └── 4.png └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | 11 | # Native 12 | *.orig.* 13 | *.jks 14 | *.p8 15 | *.p12 16 | *.key 17 | *.mobileprovision 18 | 19 | # Metro 20 | .metro-health-check* 21 | 22 | # debug 23 | npm-debug.* 24 | yarn-debug.* 25 | yarn-error.* 26 | 27 | # macOS 28 | .DS_Store 29 | *.pem 30 | 31 | # local env files 32 | .env*.local 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | 37 | .env 38 | # @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb 39 | # The following patterns were generated by expo-cli 40 | 41 | expo-env.d.ts 42 | # @end expo-cli -------------------------------------------------------------------------------- /DUMMY.ev: -------------------------------------------------------------------------------- 1 | EXPO_PUBLIC_STREAM_ACCESS_KEY= 2 | EXPO_PUBLIC_SERVER_URL= -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Live Meeting React Native App with Stream Video Call & Chat Integration 2 | 3 | This is a React Native app that uses [Stream](https://gstrm.io/devdactic-23-11) for live video calls and chat. It is built with Expo and uses a [Node API for authentication](https://github.com/Galaxies-dev/auth-api-stream). 4 | 5 | It works on both iOS and Android, as well as table and phone-sized devices! 6 | 7 | ## App Screenshots 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Android/IntelliJ 6 | # 7 | build/ 8 | .idea 9 | .gradle 10 | local.properties 11 | *.iml 12 | *.hprof 13 | 14 | # Bundle artifacts 15 | *.jsbundle 16 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.facebook.react" 3 | 4 | def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() 5 | 6 | /** 7 | * This is the configuration block to customize your React Native Android app. 8 | * By default you don't need to apply any configuration, just uncomment the lines you need. 9 | */ 10 | react { 11 | entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim()) 12 | reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() 13 | hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" 14 | codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() 15 | 16 | // Use Expo CLI to bundle the app, this ensures the Metro config 17 | // works correctly with Expo projects. 18 | cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim()) 19 | bundleCommand = "export:embed" 20 | 21 | /* Folders */ 22 | // The root of your project, i.e. where "package.json" lives. Default is '..' 23 | // root = file("../") 24 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native 25 | // reactNativeDir = file("../node_modules/react-native") 26 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen 27 | // codegenDir = file("../node_modules/@react-native/codegen") 28 | 29 | /* Variants */ 30 | // The list of variants to that are debuggable. For those we're going to 31 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 32 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 33 | // debuggableVariants = ["liteDebug", "prodDebug"] 34 | 35 | /* Bundling */ 36 | // A list containing the node command and its flags. Default is just 'node'. 37 | // nodeExecutableAndArgs = ["node"] 38 | 39 | // 40 | // The path to the CLI configuration file. Default is empty. 41 | // bundleConfig = file(../rn-cli.config.js) 42 | // 43 | // The name of the generated asset file containing your JS bundle 44 | // bundleAssetName = "MyApplication.android.bundle" 45 | // 46 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 47 | // entryFile = file("../js/MyApplication.android.js") 48 | // 49 | // A list of extra flags to pass to the 'bundle' commands. 50 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 51 | // extraPackagerArgs = [] 52 | 53 | /* Hermes Commands */ 54 | // The hermes compiler command to run. By default it is 'hermesc' 55 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 56 | // 57 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 58 | // hermesFlags = ["-O", "-output-source-map"] 59 | } 60 | 61 | /** 62 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 63 | */ 64 | def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean() 65 | 66 | /** 67 | * The preferred build flavor of JavaScriptCore (JSC) 68 | * 69 | * For example, to use the international variant, you can use: 70 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 71 | * 72 | * The international variant includes ICU i18n library and necessary data 73 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 74 | * give correct results when using with locales other than en-US. Note that 75 | * this variant is about 6MiB larger per architecture than default. 76 | */ 77 | def jscFlavor = 'org.webkit:android-jsc:+' 78 | 79 | android { 80 | ndkVersion rootProject.ext.ndkVersion 81 | 82 | compileSdkVersion rootProject.ext.compileSdkVersion 83 | 84 | namespace 'com.supersimon.meetingsApp' 85 | defaultConfig { 86 | applicationId 'com.supersimon.meetingsApp' 87 | minSdkVersion rootProject.ext.minSdkVersion 88 | targetSdkVersion rootProject.ext.targetSdkVersion 89 | versionCode 1 90 | versionName "1.0.0" 91 | 92 | buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString()) 93 | } 94 | signingConfigs { 95 | debug { 96 | storeFile file('debug.keystore') 97 | storePassword 'android' 98 | keyAlias 'androiddebugkey' 99 | keyPassword 'android' 100 | } 101 | } 102 | buildTypes { 103 | debug { 104 | signingConfig signingConfigs.debug 105 | } 106 | release { 107 | // Caution! In production, you need to generate your own keystore file. 108 | // see https://reactnative.dev/docs/signed-apk-android. 109 | signingConfig signingConfigs.debug 110 | shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false) 111 | minifyEnabled enableProguardInReleaseBuilds 112 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 113 | } 114 | } 115 | } 116 | 117 | // Apply static values from `gradle.properties` to the `android.packagingOptions` 118 | // Accepts values in comma delimited lists, example: 119 | // android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini 120 | ["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop -> 121 | // Split option: 'foo,bar' -> ['foo', 'bar'] 122 | def options = (findProperty("android.packagingOptions.$prop") ?: "").split(","); 123 | // Trim all elements in place. 124 | for (i in 0.. 0) { 129 | println "android.packagingOptions.$prop += $options ($options.length)" 130 | // Ex: android.packagingOptions.pickFirsts += '**/SCCS/**' 131 | options.each { 132 | android.packagingOptions[prop] += it 133 | } 134 | } 135 | } 136 | 137 | dependencies { 138 | // The version of react-native is set by the React Native Gradle Plugin 139 | implementation("com.facebook.react:react-android") 140 | 141 | def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; 142 | def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; 143 | def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; 144 | def frescoVersion = rootProject.ext.frescoVersion 145 | 146 | // If your app supports Android versions before Ice Cream Sandwich (API level 14) 147 | if (isGifEnabled || isWebpEnabled) { 148 | implementation("com.facebook.fresco:fresco:${frescoVersion}") 149 | implementation("com.facebook.fresco:imagepipeline-okhttp3:${frescoVersion}") 150 | } 151 | 152 | if (isGifEnabled) { 153 | // For animated gif support 154 | implementation("com.facebook.fresco:animated-gif:${frescoVersion}") 155 | } 156 | 157 | if (isWebpEnabled) { 158 | // For webp support 159 | implementation("com.facebook.fresco:webpsupport:${frescoVersion}") 160 | if (isWebpAnimatedEnabled) { 161 | // Animated webp support 162 | implementation("com.facebook.fresco:animated-webp:${frescoVersion}") 163 | } 164 | } 165 | 166 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") 167 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 168 | exclude group:'com.squareup.okhttp3', module:'okhttp' 169 | } 170 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") 171 | 172 | if (hermesEnabled.toBoolean()) { 173 | implementation("com.facebook.react:hermes-android") 174 | } else { 175 | implementation jscFlavor 176 | } 177 | } 178 | 179 | apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); 180 | applyNativeModulesAppBuildGradle(project) 181 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # react-native-reanimated 11 | -keep class com.swmansion.reanimated.** { *; } 12 | -keep class com.facebook.react.turbomodule.** { *; } 13 | 14 | # Add any project specific keep options here: 15 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/supersimon/meetingsApp/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.supersimon.meetingsApp; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 21 | import com.facebook.react.ReactInstanceEventListener; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | /** 28 | * Class responsible of loading Flipper inside your React Native application. This is the debug 29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup. 30 | */ 31 | public class ReactNativeFlipper { 32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 33 | if (FlipperUtils.shouldEnableFlipper(context)) { 34 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 35 | 36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 37 | client.addPlugin(new DatabasesFlipperPlugin(context)); 38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 39 | client.addPlugin(CrashReporterPlugin.getInstance()); 40 | 41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 42 | NetworkingModule.setCustomClientBuilder( 43 | new NetworkingModule.CustomClientBuilder() { 44 | @Override 45 | public void apply(OkHttpClient.Builder builder) { 46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 47 | } 48 | }); 49 | client.addPlugin(networkFlipperPlugin); 50 | client.start(); 51 | 52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 53 | // Hence we run if after all native modules have been initialized 54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 55 | if (reactContext == null) { 56 | reactInstanceManager.addReactInstanceEventListener( 57 | new ReactInstanceEventListener() { 58 | @Override 59 | public void onReactContextInitialized(ReactContext reactContext) { 60 | reactInstanceManager.removeReactInstanceEventListener(this); 61 | reactContext.runOnNativeModulesQueueThread( 62 | new Runnable() { 63 | @Override 64 | public void run() { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | }); 68 | } 69 | }); 70 | } else { 71 | client.addPlugin(new FrescoFlipperPlugin()); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/supersimon/meetingsApp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.supersimon.meetingsApp; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | 6 | import com.facebook.react.ReactActivity; 7 | import com.facebook.react.ReactActivityDelegate; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactActivityDelegate; 10 | 11 | import expo.modules.ReactActivityDelegateWrapper; 12 | 13 | public class MainActivity extends ReactActivity { 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | // Set the theme to AppTheme BEFORE onCreate to support 17 | // coloring the background, status bar, and navigation bar. 18 | // This is required for expo-splash-screen. 19 | setTheme(R.style.AppTheme); 20 | super.onCreate(null); 21 | } 22 | 23 | /** 24 | * Returns the name of the main component registered from JavaScript. 25 | * This is used to schedule rendering of the component. 26 | */ 27 | @Override 28 | protected String getMainComponentName() { 29 | return "main"; 30 | } 31 | 32 | /** 33 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link 34 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React 35 | * (aka React 18) with two boolean flags. 36 | */ 37 | @Override 38 | protected ReactActivityDelegate createReactActivityDelegate() { 39 | return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate( 40 | this, 41 | getMainComponentName(), 42 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 43 | DefaultNewArchitectureEntryPoint.getFabricEnabled())); 44 | } 45 | 46 | /** 47 | * Align the back button behavior with Android S 48 | * where moving root activities to background instead of finishing activities. 49 | * @see onBackPressed 50 | */ 51 | @Override 52 | public void invokeDefaultOnBackPressed() { 53 | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { 54 | if (!moveTaskToBack(false)) { 55 | // For non-root activities, use the default implementation to finish them. 56 | super.invokeDefaultOnBackPressed(); 57 | } 58 | return; 59 | } 60 | 61 | // Use the default back button implementation on Android S 62 | // because it's doing more than {@link Activity#moveTaskToBack} in fact. 63 | super.invokeDefaultOnBackPressed(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/supersimon/meetingsApp/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.supersimon.meetingsApp; 2 | 3 | import android.app.Application; 4 | import android.content.res.Configuration; 5 | import androidx.annotation.NonNull; 6 | 7 | import com.facebook.react.PackageList; 8 | import com.facebook.react.ReactApplication; 9 | import com.facebook.react.ReactNativeHost; 10 | import com.facebook.react.ReactPackage; 11 | import com.facebook.react.config.ReactFeatureFlags; 12 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 13 | import com.facebook.react.defaults.DefaultReactNativeHost; 14 | import com.facebook.soloader.SoLoader; 15 | 16 | import expo.modules.ApplicationLifecycleDispatcher; 17 | import expo.modules.ReactNativeHostWrapper; 18 | 19 | import java.util.List; 20 | 21 | public class MainApplication extends Application implements ReactApplication { 22 | 23 | private final ReactNativeHost mReactNativeHost = 24 | new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) { 25 | @Override 26 | public boolean getUseDeveloperSupport() { 27 | return BuildConfig.DEBUG; 28 | } 29 | 30 | @Override 31 | protected List getPackages() { 32 | @SuppressWarnings("UnnecessaryLocalVariable") 33 | List packages = new PackageList(this).getPackages(); 34 | // Packages that cannot be autolinked yet can be added manually here, for example: 35 | // packages.add(new MyReactNativePackage()); 36 | return packages; 37 | } 38 | 39 | @Override 40 | protected String getJSMainModuleName() { 41 | return ".expo/.virtual-metro-entry"; 42 | } 43 | 44 | @Override 45 | protected boolean isNewArchEnabled() { 46 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 47 | } 48 | 49 | @Override 50 | protected Boolean isHermesEnabled() { 51 | return BuildConfig.IS_HERMES_ENABLED; 52 | } 53 | }); 54 | 55 | @Override 56 | public ReactNativeHost getReactNativeHost() { 57 | return mReactNativeHost; 58 | } 59 | 60 | @Override 61 | public void onCreate() { 62 | super.onCreate(); 63 | SoLoader.init(this, /* native exopackage */ false); 64 | if (!BuildConfig.REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS) { 65 | ReactFeatureFlags.unstable_useRuntimeSchedulerAlways = false; 66 | } 67 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 68 | // If you opted-in for the New Architecture, we load the native entry point for this app. 69 | DefaultNewArchitectureEntryPoint.load(); 70 | } 71 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 72 | ApplicationLifecycleDispatcher.onApplicationCreate(this); 73 | } 74 | 75 | @Override 76 | public void onConfigurationChanged(@NonNull Configuration newConfig) { 77 | super.onConfigurationChanged(newConfig); 78 | ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/drawable-hdpi/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/drawable-mdpi/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/drawable-xhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff 3 | #ffffff 4 | #023c69 5 | #ffffff 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | meetingsApp 3 | contain 4 | false 5 | automatic 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 14 | 17 | -------------------------------------------------------------------------------- /android/app/src/release/java/com/supersimon/meetingsApp/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.supersimon.meetingsApp; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0' 6 | minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21') 7 | compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33') 8 | targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33') 9 | kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10' 10 | frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0' 11 | 12 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 13 | ndkVersion = "23.1.7779620" 14 | } 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | dependencies { 20 | classpath('com.android.tools.build:gradle:7.4.2') 21 | classpath('com.facebook.react:react-native-gradle-plugin') 22 | } 23 | } 24 | 25 | allprojects { 26 | repositories { 27 | maven { 28 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 29 | url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android')) 30 | } 31 | maven { 32 | // Android JSC is installed from npm 33 | url(new File(['node', '--print', "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), '../dist')) 34 | } 35 | 36 | google() 37 | mavenCentral() 38 | maven { url 'https://www.jitpack.io' } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Automatically convert third-party libraries to use AndroidX 26 | android.enableJetifier=true 27 | 28 | # Version of flipper SDK to use with React Native 29 | FLIPPER_VERSION=0.182.0 30 | 31 | # Use this property to specify which architecture you want to build. 32 | # You can also override it from the CLI using 33 | # ./gradlew -PreactNativeArchitectures=x86_64 34 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 35 | 36 | # Use this property to enable support to the new architecture. 37 | # This will allow you to use TurboModules and the Fabric render in 38 | # your application. You should enable this flag either if you want 39 | # to write custom TurboModules/Fabric components OR use libraries that 40 | # are providing them. 41 | newArchEnabled=false 42 | 43 | # Use this property to enable or disable the Hermes JS engine. 44 | # If set to false, you will be using JSC instead. 45 | hermesEnabled=true 46 | 47 | # Enable GIF support in React Native images (~200 B increase) 48 | expo.gif.enabled=true 49 | # Enable webp support in React Native images (~85 KB increase) 50 | expo.webp.enabled=true 51 | # Enable animated webp support (~3.4 MB increase) 52 | # Disabled by default because iOS doesn't support animated webp 53 | expo.webp.animated=false 54 | 55 | # Enable network inspector 56 | EX_DEV_CLIENT_NETWORK_INSPECTOR=true 57 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Stop when "xargs" is not available. 209 | if ! command -v xargs >/dev/null 2>&1 210 | then 211 | die "xargs is not available" 212 | fi 213 | 214 | # Use "xargs" to parse quoted args. 215 | # 216 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 217 | # 218 | # In Bash we could simply go: 219 | # 220 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 221 | # set -- "${ARGS[@]}" "$@" 222 | # 223 | # but POSIX shell has neither arrays nor command substitution, so instead we 224 | # post-process each arg (as a line of input to sed) to backslash-escape any 225 | # character that might be a shell metacharacter, then use eval to reverse 226 | # that process (while maintaining the separation between arguments), and wrap 227 | # the whole thing up as a single "set" statement. 228 | # 229 | # This will of course break if any of these variables contains a newline or 230 | # an unmatched quote. 231 | # 232 | 233 | eval "set -- $( 234 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 235 | xargs -n1 | 236 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 237 | tr '\n' ' ' 238 | )" '"$@"' 239 | 240 | exec "$JAVACMD" "$@" 241 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if %ERRORLEVEL% equ 0 goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if %ERRORLEVEL% equ 0 goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | set EXIT_CODE=%ERRORLEVEL% 84 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 85 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 86 | exit /b %EXIT_CODE% 87 | 88 | :mainEnd 89 | if "%OS%"=="Windows_NT" endlocal 90 | 91 | :omega 92 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'meetingsApp' 2 | 3 | apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); 4 | useExpoModules() 5 | 6 | apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) 11 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "meetingsApp", 4 | "slug": "meetingsApp", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/images/icon.png", 8 | "scheme": "myapp", 9 | "userInterfaceStyle": "automatic", 10 | "splash": { 11 | "image": "./assets/images/splash.png", 12 | "resizeMode": "contain", 13 | "backgroundColor": "#ffffff" 14 | }, 15 | "assetBundlePatterns": ["**/*"], 16 | "ios": { 17 | "supportsTablet": true, 18 | "bundleIdentifier": "com.supersimon.meetingsApp" 19 | }, 20 | "android": { 21 | "adaptiveIcon": { 22 | "foregroundImage": "./assets/images/adaptive-icon.png", 23 | "backgroundColor": "#ffffff" 24 | }, 25 | "package": "com.supersimon.meetingsApp" 26 | }, 27 | "web": { 28 | "bundler": "metro", 29 | "output": "static", 30 | "favicon": "./assets/images/favicon.png" 31 | }, 32 | "plugins": [ 33 | "expo-router", 34 | "@stream-io/video-react-native-sdk", 35 | [ 36 | "@config-plugins/react-native-webrtc", 37 | { 38 | // optionally you can add your own explanations for permissions on iOS 39 | "cameraPermission": "Allow $(PRODUCT_NAME) to access your camera", 40 | "microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone" 41 | } 42 | ], 43 | [ 44 | "expo-build-properties", 45 | { 46 | "android": { 47 | "extraMavenRepos": ["$rootDir/../../../node_modules/@notifee/react-native/android/libs"] 48 | } 49 | } 50 | ] 51 | ], 52 | "experiments": { 53 | "typedRoutes": true 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/(inside)/(room)/[id].tsx: -------------------------------------------------------------------------------- 1 | import { View, StyleSheet, Dimensions, TouchableOpacity, Share } from 'react-native'; 2 | import React, { useEffect, useState } from 'react'; 3 | import { useLocalSearchParams, useNavigation, useRouter } from 'expo-router'; 4 | 5 | import Spinner from 'react-native-loading-spinner-overlay'; 6 | import { 7 | Call, 8 | CallContent, 9 | StreamCall, 10 | StreamVideoEvent, 11 | useStreamVideoClient, 12 | } from '@stream-io/video-react-native-sdk'; 13 | import Toast from 'react-native-toast-message'; 14 | 15 | import CustomCallControls from '../../../components/CustomCallControls'; 16 | import CustomTopView from '../../../components/CustomTopView'; 17 | import { reactions } from '../../../components/CustomCallControls'; 18 | import { Ionicons } from '@expo/vector-icons'; 19 | import CustomBottomSheet from '../../../components/CustomBottomSheet'; 20 | import ChatView from '../../../components/ChatView'; 21 | const WIDTH = Dimensions.get('window').width; 22 | const HEIGHT = Dimensions.get('window').height; 23 | 24 | const Page = () => { 25 | const { id } = useLocalSearchParams<{ id: string }>(); 26 | const router = useRouter(); 27 | const navigation = useNavigation(); 28 | 29 | const [call, setCall] = useState(null); 30 | const client = useStreamVideoClient(); 31 | 32 | useEffect(() => { 33 | navigation.setOptions({ 34 | headerRight: () => ( 35 | 36 | 37 | 38 | ), 39 | }); 40 | 41 | // Listen to call events 42 | const unsubscribe = client!.on('all', (event: StreamVideoEvent) => { 43 | console.log(event); 44 | 45 | if (event.type === 'call.reaction_new') { 46 | console.log(`New reaction: ${event.reaction}`); 47 | } 48 | 49 | if (event.type === 'call.session_participant_joined') { 50 | console.log(`New user joined the call: ${event.participant}`); 51 | const user = event.participant.user.name; 52 | Toast.show({ 53 | text1: 'User joined', 54 | text2: `Say hello to ${user} 👋`, 55 | }); 56 | } 57 | 58 | if (event.type === 'call.session_participant_left') { 59 | console.log(`Someone left the call: ${event.participant}`); 60 | const user = event.participant.user.name; 61 | Toast.show({ 62 | text1: 'User left', 63 | text2: `Say goodbye to ${user} 👋`, 64 | }); 65 | } 66 | }); 67 | 68 | // Stop the listener when the component unmounts 69 | return () => { 70 | unsubscribe(); 71 | }; 72 | }, []); 73 | 74 | // Join the call 75 | useEffect(() => { 76 | if (!client || call) return; 77 | 78 | const joinCall = async () => { 79 | const call = client!.call('default', id); 80 | await call.join({ create: true }); 81 | setCall(call); 82 | }; 83 | 84 | joinCall(); 85 | }, [call]); 86 | 87 | // Navigate back home on hangup 88 | const goToHomeScreen = async () => { 89 | router.back(); 90 | }; 91 | 92 | // Share the meeting link 93 | const shareMeeting = async () => { 94 | Share.share({ 95 | message: `Join my meeting: myapp://(inside)/(room)/${id}`, 96 | }); 97 | }; 98 | 99 | if (!call) return null; 100 | 101 | return ( 102 | 103 | 104 | 105 | 106 | 107 | 114 | 115 | {WIDTH > HEIGHT ? ( 116 | 117 | 118 | 119 | ) : ( 120 | 121 | )} 122 | 123 | 124 | 125 | ); 126 | }; 127 | 128 | const styles = StyleSheet.create({ 129 | container: { 130 | flex: 1, 131 | flexDirection: WIDTH > HEIGHT ? 'row' : 'column', 132 | }, 133 | videoContainer: { 134 | flex: 1, 135 | justifyContent: 'center', 136 | textAlign: 'center', 137 | backgroundColor: '#fff', 138 | }, 139 | 140 | topView: { 141 | flex: 1, 142 | justifyContent: 'center', 143 | alignItems: 'center', 144 | backgroundColor: '#fff', 145 | }, 146 | }); 147 | 148 | export default Page; 149 | -------------------------------------------------------------------------------- /app/(inside)/_layout.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Stack } from 'expo-router'; 3 | import { TouchableOpacity } from 'react-native'; 4 | import { useAuth } from '../../context/AuthContext'; 5 | import { Ionicons } from '@expo/vector-icons'; 6 | 7 | const Layout = () => { 8 | const { onLogout } = useAuth(); 9 | 10 | return ( 11 | 18 | ( 23 | 24 | 25 | 26 | ), 27 | }} 28 | /> 29 | 30 | 31 | 32 | ); 33 | }; 34 | 35 | export default Layout; 36 | -------------------------------------------------------------------------------- /app/(inside)/index.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | View, 3 | StyleSheet, 4 | ScrollView, 5 | Text, 6 | ImageBackground, 7 | TouchableOpacity, 8 | Dimensions, 9 | Alert, 10 | } from 'react-native'; 11 | import { rooms } from '../../assets/data/rooms'; 12 | import { Link, useRouter } from 'expo-router'; 13 | const WIDTH = Dimensions.get('window').width; 14 | const HEIGHT = Dimensions.get('window').height; 15 | 16 | import { Ionicons } from '@expo/vector-icons'; 17 | import Colors from '../../constants/Colors'; 18 | 19 | const Page = () => { 20 | const router = useRouter(); 21 | 22 | // Create random id and navigate to the room 23 | const onStartMeeting = async () => { 24 | const randomId = Math.floor(Math.random() * 1000000000).toString(); 25 | router.push(`/(inside)/(room)/${randomId}`); 26 | }; 27 | 28 | // Prompt user to enter a call id and navigate to the room 29 | const onJoinMeeting = () => { 30 | Alert.prompt( 31 | 'Join', 32 | 'Please enter your Call ID:', 33 | (id) => { 34 | console.log('Joining call: ', id); 35 | router.push(`/(inside)/(room)/${id}`); 36 | }, 37 | 'plain-text' 38 | ); 39 | }; 40 | 41 | return ( 42 | 43 | 48 | 49 | 50 | Start new Meeting 51 | 52 | 53 | 54 | 55 | Join Meeting by ID 56 | 57 | 58 | 59 | 60 | 61 | or join public room 62 | 63 | 64 | 65 | 66 | {rooms.map((room, index) => ( 67 | 68 | 69 | 74 | 75 | {room.name} 76 | 77 | 78 | 79 | 80 | ))} 81 | 82 | 83 | ); 84 | }; 85 | 86 | const styles = StyleSheet.create({ 87 | container: { 88 | flex: 1, 89 | backgroundColor: '#fff', 90 | }, 91 | wrapper: { 92 | alignItems: 'center', 93 | justifyContent: 'center', 94 | flexDirection: WIDTH > HEIGHT ? 'row' : 'column', 95 | gap: 20, 96 | }, 97 | button: { 98 | flex: 1, 99 | gap: 10, 100 | flexDirection: 'row', 101 | alignItems: 'center', 102 | justifyContent: 'center', 103 | backgroundColor: Colors.secondary, 104 | margin: 20, 105 | padding: 30, 106 | borderRadius: 10, 107 | }, 108 | buttonText: { 109 | fontSize: 20, 110 | fontWeight: 'bold', 111 | marginRight: 10, 112 | }, 113 | divider: { 114 | flexDirection: 'row', 115 | alignItems: 'center', 116 | gap: 10, 117 | marginHorizontal: 20, 118 | marginTop: 20, 119 | marginBottom: 40, 120 | }, 121 | 122 | image: { 123 | width: WIDTH > HEIGHT ? WIDTH / 4 - 30 : WIDTH - 40, 124 | height: 300, 125 | }, 126 | overlay: { 127 | position: 'absolute', 128 | top: 0, 129 | left: 0, 130 | right: 0, 131 | bottom: 0, 132 | justifyContent: 'center', 133 | alignItems: 'center', 134 | backgroundColor: 'rgba(0,0,0,0.4)', 135 | borderRadius: 10, 136 | }, 137 | text: { 138 | color: '#fff', 139 | fontSize: 30, 140 | fontWeight: 'bold', 141 | textAlign: 'center', 142 | }, 143 | }); 144 | 145 | export default Page; 146 | -------------------------------------------------------------------------------- /app/_layout.tsx: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import React, { useEffect, useState } from 'react'; 3 | import { Slot, Stack, useRouter, useSegments } from 'expo-router'; 4 | import { StreamVideo, StreamVideoClient, User } from '@stream-io/video-react-native-sdk'; 5 | import { AuthProvider, useAuth } from '../context/AuthContext'; 6 | import { GestureHandlerRootView } from 'react-native-gesture-handler'; 7 | import { OverlayProvider } from 'stream-chat-expo'; 8 | import Toast from 'react-native-toast-message'; 9 | 10 | const STREAM_KEY = process.env.EXPO_PUBLIC_STREAM_ACCESS_KEY; 11 | 12 | const InitialLayout = () => { 13 | const { authState, initialized } = useAuth(); 14 | const [client, setClient] = useState(null); 15 | const segments = useSegments(); 16 | const router = useRouter(); 17 | 18 | // Navigate the user to the correct page based on their authentication state 19 | useEffect(() => { 20 | if (!initialized) return; 21 | 22 | // Check if the path/url is in the (inside) group 23 | const inAuthGroup = segments[0] === '(inside)'; 24 | 25 | if (authState?.authenticated && !inAuthGroup) { 26 | // Redirect authenticated users to the list page 27 | router.replace('/(inside)'); 28 | } else if (!authState?.authenticated) { 29 | // Redirect unauthenticated users to the login page 30 | client?.disconnectUser(); 31 | router.replace('/'); 32 | } 33 | }, [initialized, authState]); 34 | 35 | // Initialize the StreamVideoClient when the user is authenticated 36 | useEffect(() => { 37 | if (authState?.authenticated && authState.token) { 38 | const user: User = { id: authState.user_id! }; 39 | 40 | try { 41 | const client = new StreamVideoClient({ apiKey: STREAM_KEY!, user, token: authState.token }); 42 | setClient(client); 43 | } catch (e) { 44 | console.log('Error creating client: ', e); 45 | } 46 | } 47 | }, [authState]); 48 | 49 | // Conditionally render the correct layout 50 | return ( 51 | <> 52 | {!client && ( 53 | 54 | 55 | 56 | )} 57 | {client && ( 58 | 59 | 60 | 61 | 62 | 63 | 64 | )} 65 | 66 | ); 67 | }; 68 | 69 | // Wrap the app with the AuthProvider 70 | const RootLayout = () => { 71 | return ( 72 | 73 | 74 | 75 | 76 | 77 | ); 78 | }; 79 | 80 | export default RootLayout; 81 | -------------------------------------------------------------------------------- /app/index.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Text, 3 | StyleSheet, 4 | Alert, 5 | Button, 6 | TextInput, 7 | TouchableOpacity, 8 | KeyboardAvoidingView, 9 | Platform, 10 | } from 'react-native'; 11 | import React, { useState } from 'react'; 12 | import Colors from '../constants/Colors'; 13 | import Spinner from 'react-native-loading-spinner-overlay'; 14 | import { useAuth } from '../context/AuthContext'; 15 | 16 | const Page = () => { 17 | const [email, setEmail] = useState(''); 18 | const [password, setPassword] = useState(''); 19 | const [loading, setLoading] = useState(false); 20 | const { onLogin, onRegister } = useAuth(); 21 | 22 | // Sign in with email and password 23 | const onSignInPress = async () => { 24 | setLoading(true); 25 | 26 | try { 27 | const result = await onLogin!(email, password); 28 | } catch (e) { 29 | Alert.alert('Error', 'Could not log in'); 30 | } finally { 31 | setLoading(false); 32 | } 33 | }; 34 | 35 | // Create a new user 36 | const onSignUpPress = async () => { 37 | setLoading(true); 38 | try { 39 | const result = await onRegister!(email, password); 40 | } catch (e) { 41 | Alert.alert('Error', 'Could not log in'); 42 | } finally { 43 | setLoading(false); 44 | } 45 | }; 46 | 47 | return ( 48 | 51 | 52 | Meet Me 53 | The fastest way to meet 54 | 61 | 68 | 69 | 70 | Sign in 71 | 72 | 73 | 74 | ); 75 | }; 76 | const styles = StyleSheet.create({ 77 | container: { 78 | flex: 1, 79 | padding: 20, 80 | paddingHorizontal: '20%', 81 | justifyContent: 'center', 82 | }, 83 | header: { 84 | fontSize: 30, 85 | textAlign: 'center', 86 | marginBottom: 10, 87 | }, 88 | subheader: { 89 | fontSize: 18, 90 | textAlign: 'center', 91 | marginBottom: 40, 92 | }, 93 | inputField: { 94 | marginVertical: 4, 95 | height: 50, 96 | borderWidth: 1, 97 | borderColor: Colors.primary, 98 | borderRadius: 4, 99 | padding: 10, 100 | }, 101 | button: { 102 | marginVertical: 15, 103 | alignItems: 'center', 104 | backgroundColor: Colors.primary, 105 | padding: 12, 106 | borderRadius: 4, 107 | }, 108 | }); 109 | export default Page; 110 | -------------------------------------------------------------------------------- /assets/data/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/data/1.png -------------------------------------------------------------------------------- /assets/data/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/data/2.png -------------------------------------------------------------------------------- /assets/data/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/data/3.png -------------------------------------------------------------------------------- /assets/data/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/data/4.png -------------------------------------------------------------------------------- /assets/data/rooms.ts: -------------------------------------------------------------------------------- 1 | export const rooms = [ 2 | { 3 | id: 10001, 4 | name: 'Public Informations', 5 | img: require('./1.png'), 6 | }, 7 | { 8 | id: 10002, 9 | name: 'Meme Lovers', 10 | img: require('./2.png'), 11 | }, 12 | { 13 | id: 10003, 14 | name: 'Crypto Fans', 15 | img: require('./3.png'), 16 | }, 17 | { 18 | id: 10004, 19 | name: 'Gaming Fans', 20 | img: require('./4.png'), 21 | }, 22 | ]; 23 | -------------------------------------------------------------------------------- /assets/fonts/SpaceMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/fonts/SpaceMono-Regular.ttf -------------------------------------------------------------------------------- /assets/images/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/images/adaptive-icon.png -------------------------------------------------------------------------------- /assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/images/favicon.png -------------------------------------------------------------------------------- /assets/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/images/icon.png -------------------------------------------------------------------------------- /assets/images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Galaxies-dev/meetings-react-native-stream/ddc0d3badac206d5963271a89921686cfdfa924c/assets/images/splash.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | plugins: [ 6 | // Required for expo-router 7 | 'expo-router/babel', 8 | 'react-native-reanimated/plugin', 9 | ], 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /components/ChatView.tsx: -------------------------------------------------------------------------------- 1 | import { View, Text } from 'react-native'; 2 | import React, { useEffect, useState } from 'react'; 3 | import { StreamChat } from 'stream-chat'; 4 | import { useAuth } from '../context/AuthContext'; 5 | import { 6 | Channel, 7 | Chat, 8 | DefaultStreamChatGenerics, 9 | MessageInput, 10 | MessageList, 11 | } from 'stream-chat-expo'; 12 | import { Channel as ChannelType } from 'stream-chat'; 13 | 14 | const STREAM_KEY = process.env.EXPO_PUBLIC_STREAM_ACCESS_KEY; 15 | 16 | type Props = { 17 | channelId: string; 18 | }; 19 | 20 | const ChatView = ({ channelId }: Props) => { 21 | const chatClient = StreamChat.getInstance(STREAM_KEY!); 22 | const { authState } = useAuth(); 23 | const [channel, setChannel] = useState | undefined>( 24 | undefined 25 | ); 26 | 27 | // Connect to the channel with the same ID as the video call 28 | useEffect(() => { 29 | const connectToChannel = async () => { 30 | const user = { id: authState?.user_id! }; 31 | 32 | await chatClient.connectUser(user, authState?.token!); 33 | const channel = chatClient.channel('messaging', channelId); 34 | 35 | setChannel(channel); 36 | await channel.watch(); 37 | }; 38 | 39 | connectToChannel(); 40 | 41 | // Cleanup 42 | return () => { 43 | channel?.stopWatching(); 44 | chatClient.disconnectUser(); 45 | }; 46 | }, []); 47 | 48 | return ( 49 | <> 50 | {chatClient && channel ? ( 51 | 52 | 53 | 54 | 55 | 56 | 57 | ) : ( 58 | 59 | Loading Chat... 60 | 61 | )} 62 | 63 | ); 64 | }; 65 | 66 | export default ChatView; 67 | -------------------------------------------------------------------------------- /components/CustomBottomSheet.tsx: -------------------------------------------------------------------------------- 1 | import { StyleSheet, Text, KeyboardAvoidingView, Platform } from 'react-native'; 2 | import React, { forwardRef, useMemo } from 'react'; 3 | import BottomSheet, { BottomSheetView } from '@gorhom/bottom-sheet'; 4 | import ChatView from './ChatView'; 5 | import Colors from '../constants/Colors'; 6 | export type Ref = BottomSheet; 7 | 8 | interface Props { 9 | channelId: string; 10 | } 11 | 12 | // Custom Bottom Sheet to display the chat 13 | const CustomBottomSheet = forwardRef((props, ref) => { 14 | const snapPoints = useMemo(() => ['15%', '100%'], []); 15 | 16 | return ( 17 | 23 | 24 | Chat 25 | 29 | 30 | 31 | 32 | 33 | ); 34 | }); 35 | 36 | const styles = StyleSheet.create({ 37 | contentContainer: { 38 | flex: 1, 39 | paddingBottom: 20, 40 | }, 41 | containerHeadline: { 42 | fontSize: 24, 43 | fontWeight: '600', 44 | padding: 20, 45 | textAlign: 'center', 46 | }, 47 | }); 48 | 49 | export default CustomBottomSheet; 50 | -------------------------------------------------------------------------------- /components/CustomCallControls.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | CallControlProps, 3 | useCall, 4 | HangUpCallButton, 5 | ToggleAudioPublishingButton, 6 | ToggleVideoPublishingButton, 7 | ToggleCameraFaceButton, 8 | ReactionsButton, 9 | StreamReactionType, 10 | } from '@stream-io/video-react-native-sdk'; 11 | import React from 'react'; 12 | import { View, StyleSheet, Button } from 'react-native'; 13 | import Colors from '../constants/Colors'; 14 | 15 | export const reactions: StreamReactionType[] = [ 16 | { 17 | type: 'reaction', 18 | emoji_code: ':smile:', 19 | custom: {}, 20 | icon: '😊', 21 | }, 22 | { 23 | type: 'raised-hand', 24 | emoji_code: ':raise-hand:', 25 | custom: {}, 26 | icon: '✋', 27 | }, 28 | { 29 | type: 'reaction', 30 | emoji_code: ':fireworks:', 31 | custom: {}, 32 | icon: '🎉', 33 | }, 34 | { 35 | type: 'reaction', 36 | emoji_code: ':like:', 37 | custom: {}, 38 | icon: '😍', 39 | }, 40 | ]; 41 | 42 | // Custom View for the call controls and reactions 43 | const CustomCallControls = (props: CallControlProps) => { 44 | const call = useCall(); 45 | 46 | const onLike = () => { 47 | const reaction = { 48 | type: 'reaction', 49 | emoji_code: ':like:', 50 | custom: {}, 51 | icon: '😍', 52 | }; 53 | call?.sendReaction(reaction); 54 | }; 55 | 56 | return ( 57 | 58 | call?.microphone.toggle()} /> 59 | call?.camera.toggle()} /> 60 | call?.camera.flip()} /> 61 | 62 | 63 |