Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/heavy-ghosts-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theoplayer/react-native-ui': minor
---

Updated the example app to use React Native v0.83.1
1 change: 1 addition & 0 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: "org.rnrepo.tools.prebuilds-plugin"

/**
* This is the configuration block to customize your React Native Android app.
Expand Down
9 changes: 9 additions & 0 deletions example/android/app/src/main/java/com/example/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.res.Configuration
import android.media.AudioManager
import android.os.Build
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
Expand All @@ -14,6 +15,14 @@ import com.google.android.gms.cast.framework.CastContext

class MainActivity : ReactActivity() {
public override fun onCreate(bundle: Bundle?) {
// Edge-to-edge is enforced on Android 15 so that the system bars are transparent or
// translucent by default. On earlier versions of Android, remove opaque system bars opaque by
// calling enableEdgeToEdge().
// On Android 15 and later devices, or after calling enableEdgeToEdge(), gesture navigation is
// transparent by default. Three-button navigation is translucent by default or opaque if it is
// inside the taskbar on large screen device.
// (@link https://developer.android.com/design/ui/mobile/guides/foundations/system-bars#immersive-mode}
enableEdgeToEdge()
super.onCreate(bundle)

// STREAM_MUSIC volume should be changed by the hardware volume controls.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
Expand Down Expand Up @@ -33,10 +34,6 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load(bridgelessEnabled = true)
}
loadReactNative(this)
}
}
14 changes: 14 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,28 @@ buildscript {
castFrameworkVersion = "22.0.0"
kotlinVersion = "2.2.10"
agpVersion = "8.12.3"
rnrepoVersion = "0.2.1"
}
repositories {
google()
mavenCentral()
maven { url "https://packages.rnrepo.org/releases" }
}
dependencies {
classpath("com.android.tools.build:gradle:$agpVersion")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("org.rnrepo.tools:prebuilds-plugin:$rnrepoVersion")
}
}

allprojects {
repositories {
maven { url "https://maven.theoplayer.com/releases" }
google()
mavenCentral()
maven { url "https://packages.rnrepo.org/releases" }
}
}

apply plugin: "com.facebook.react.rootproject"
6 changes: 5 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
Expand All @@ -43,3 +43,7 @@ hermesEnabled=true
# Enable THEOplayer Extensions (default: disabled)
THEOplayer_extensionGoogleIMA = true
THEOplayer_extensionGoogleDAI = true

# Toggle whether to reparent the playerView to the top-most node of the view hierarchy when going
# into PiP.
THEOplayer_reparent_on_PiP = true
15 changes: 1 addition & 14 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
[
'module-resolver',
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
[pak.name]: path.join(__dirname, '..', pak.source),
},
},
],
],
plugins: ['babel-plugin-react-compiler'],
};
Loading