diff --git a/App.tsx b/App.tsx index 9f52773..0eef8f6 100644 --- a/App.tsx +++ b/App.tsx @@ -16,7 +16,6 @@ import useNotificationsPermission from './app/util/useNotificationsPermission'; import useGoogleAnalyticsSetup from './app/util/useGoogleAnalyticsSetup'; import ThemeProvider from './app/theme/ThemeProvider'; import useCarPlayController from './app/car/useCarPlayController'; -import useTrackPlayerSetup from './app/car/useTrackPlayerSetup'; const ReduxProvider: React.FC> = ({children}) => { return ( @@ -33,7 +32,6 @@ const App: React.FC = () => { useAppTrackingPermission(); useGoogleAnalyticsSetup(); useGemiusSetup(); - useTrackPlayerSetup(); const {isConnected: _} = Platform.OS === 'ios' diff --git a/android/app/build.gradle b/android/app/build.gradle index 64a73b6..06e8113 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -87,8 +87,8 @@ android { applicationId "lt.mediapark.lrt" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 204105 - versionName "2.41.5" + versionCode 204106 + versionName "2.41.6" multiDexEnabled true } signingConfigs { diff --git a/app/car/useCarPlayController.ts b/app/car/useCarPlayController.ts index 522310c..7379994 100644 --- a/app/car/useCarPlayController.ts +++ b/app/car/useCarPlayController.ts @@ -5,12 +5,16 @@ import useCarPlayRootTemplate from './root/useCarPlayRootTemplate'; import Gemius from 'react-native-gemius-plugin'; import analytics from '@react-native-firebase/analytics'; import TrackPlayer from 'react-native-track-player'; +import useTrackPlayerSetup from './useTrackPlayerSetup'; type ReturnType = CarPlayContextType; const useCarPlayController = (): ReturnType => { const [isConnected, setIsConnected] = useState(CarPlay.connected); + // Setup TrackPlayer + useTrackPlayerSetup(); + const rootTemplate = useCarPlayRootTemplate(isConnected); useEffect(() => { diff --git a/index.js b/index.js index 6b78935..fa5e702 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,5 @@ if (Platform.OS === 'android') { AppRegistry.registerComponent(appName, () => App); } else { AppRegistry.registerComponent(appName, () => App); + TrackPlayer.registerPlaybackService(() => PlaybackService); } - -TrackPlayer.registerPlaybackService(() => PlaybackService); diff --git a/ios/lrtApp.xcodeproj/project.pbxproj b/ios/lrtApp.xcodeproj/project.pbxproj index 67af44a..0bb689f 100644 --- a/ios/lrtApp.xcodeproj/project.pbxproj +++ b/ios/lrtApp.xcodeproj/project.pbxproj @@ -783,7 +783,7 @@ CODE_SIGN_ENTITLEMENTS = lrtApp/lrtApp.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 100; + CURRENT_PROJECT_VERSION = 101; DEVELOPMENT_TEAM = TGMUP98888; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; @@ -817,7 +817,7 @@ CODE_SIGN_ENTITLEMENTS = lrtApp/lrtAppRelease.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 100; + CURRENT_PROJECT_VERSION = 101; DEVELOPMENT_TEAM = TGMUP98888; INFOPLIST_FILE = lrtApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";