rnTVLauncher is a custom launcher application specifically designed for Android TV. This launcher leverages React Native (React Native TVOS) and native modules to provide a seamless and integrated experience. The application requests accessibility settings to make it the default launcher and intercepts calls to ensure it remains the default launcher. Additionally, the app automatically starts when the TV is powered on.
- Custom launcher for Android TV
- Requests accessibility settings to set as the default launcher
- Intercepts calls to maintain default launcher status
- Automatically starts when the TV is powered on
- Displays a grid of installed applications
- Allows launching of installed applications
-
Clone the repository:
git clone https://github.com/Sammy970/React-native-launcher.git cd rnTVLauncher
-
Install dependencies:
npm install
-
Set up the Android project:
cd android ./gradlew clean cd ..
-
Start the Metro bundler:
npm start
-
Run the application on Android TV:
npm run android
- When the application is launched for the first time, it will request accessibility settings to set itself as the default launcher.
- Once accessibility settings are enabled, the launcher will intercept calls to ensure it remains the default launcher.
- The launcher will automatically start when the TV is powered on.
- The main screen displays a grid of installed applications. You can navigate through the applications and launch them by pressing the select button on the remote.
This is the main React Native component that renders the grid of installed applications. It uses the AppListModule
native module to fetch the list of installed applications and allows launching them.
This file contains the Android manifest configuration, including permissions, features, and components such as activities, receivers, and services.
This Kotlin file defines the AppListModule
native module, which provides methods to fetch the list of installed applications and launch them.
This Kotlin file defines the AppListPackage
class, which registers the AppListModule
native module.
This Kotlin file defines the BootReceiver
class, which ensures the launcher starts automatically when the TV is powered on.
This Kotlin file defines the HomeButtonService
class, which intercepts calls to maintain the launcher as the default launcher.
This Kotlin file defines the MainApplication
class, which initializes the React Native application and registers the native modules.
This XML file defines the configuration for the accessibility service.
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.