Files
react-navigation/android
Krzysztof Magiera c741acf7cc Unwrap Context in order to retrieve Activity subclass (#59)
This fixes crash on Expo client which is wrapping Activity prior to passing it as a context to the root view.

After my recent change in the logic on how we access main activity we know extract the reference to it using `getContext` from the root view. Previously we were using `getTopLevelActivity` which wasn't working well in the cases where other non-react-native activities were transitioning in or out. The new approach however turned out not to be the best as for example expo client does not pass activity instance as a context directly to the root view. Instead the activity class is wrapped in ContextThemeWrapper ([see it here](41458d1de9/android/expoview/src/main/java/versioned/host/exp/exponent/ReactUnthemedRootView.java (L13))).

We now try to unwrap the context if it is not a fragment activity using `getBaseContext`

This fixes https://github.com/expo/expo/issues/3191
2019-01-15 16:29:46 +01:00
..
2018-08-03 13:54:11 +02:00
2018-12-18 12:53:56 +01:00
2018-08-03 13:54:11 +02:00
2018-08-03 13:54:11 +02:00
2018-08-03 13:54:11 +02:00
2018-08-03 13:54:11 +02:00
2018-08-03 13:54:11 +02:00

README

If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm:

  1. Be sure to have the Android SDK and NDK installed
  2. Be sure to have a local.properties file in this folder that points to the Android SDK and NDK
ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/{username}/Library/Android/sdk
  1. Delete the maven folder
  2. Run sudo ./gradlew installArchives
  3. Verify that latest set of generated files is in the maven folder with the correct version number