Closed GantMan closed 8 years ago
The plugin needs to be updated to not pass activity reference in the constructor and use getCurrentActivity
(it's backward compatible). You should file an issue in the plugin's repo. Check the discussion here - https://github.com/facebook/react-native/commit/49f20f41546e3ba8e7fe43c84c4c701684d0434d
For anyone who ends up here trying to get the current activity in a SimpleViewManager
, I'm trying to get some traction on this issue: #8661. @satya164's solution only applies to Native Modules, not Native UI Components.
I'm using
react-native-maps
off of a branch that worked with 0.28.One of the things it needed for Android, was the Android Activity passed into the constructor, ergo
MapsPackage(this)
Now that the packages are moved to an Application context, I'm not exactly sure what to pass the constructor? It won't take the application context, and most things I read say you can't easily get the activity context.