Skip to content

laptiieff/android-auto-error-app

Repository files navigation

This repo contains a minimal app to reproduce the error when GridTemplate of the @iternio/react-native-auto-play library is set as a root template on Android Auto

Steps to reproduce

  1. npm install

  2. Connect Android device via USB

  3. Start the Metro server

npm run start
  1. Install the app to connected device
npm run android
  1. Go to the DHU emulator directory, run it with connection to the USB-connected device with running app
cd ~/Library/Android/sdk/extras/google/auto
./desktop-head-unit --usb
  1. Open the app on DHU emulator, click any grid item and see the error

Steps to fix the error

A patch for the library is included in the patches/ directory. To apply it:

  1. Apply the patch:
npx patch-package
  1. Run the app as described in the above section, the error should be fixed

The patch fixes AndroidAutoScreen.getScreenManager() to find the first non-cluster session instead of always looking up ROOT_SESSION, which caused a crash when navigating from a grid template.

Before patch After patch
error.mov
fixed.mov

About

A minimal app to reproduce the library error

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors