RN0.29 compatability#363
Conversation
… ensuring sony xperia android 6 compatability
|
Thanks for the PR! |
|
Hey, should the path of the file to update be pointing to |
|
Oops! I didn't see this and ended up submitting #366 |
|
I don't think you need to pass context through again and can use ThemeReactContext. Take a look at my PR if you get a chance. Maybe we can consolidate both our ideas into this PR and close mine out? |
|
@julien-rodrigues Yes, the docs would have to be updated for 0.29. We can use https://github.com/Microsoft/react-native-code-push#plugin-configuration-android |
|
@christopherdro Indeed it seems a great solution |
| @@ -1,5 +1,4 @@ | |||
| apply plugin: 'com.android.library' | |||
| apply from: 'gradle-maven-push.gradle' | |||
There was a problem hiding this comment.
this change seems unrelated
|
I'd like to get a release out for 0.29, so I'm going to go ahead and merge this. There's some gradle stuff that we might tweak before publishing though. Thanks @locly for your contribution! |
|
I'm getting an Android compile error now using rn 0.29.1: Any idea what might cause this? What exactly are the install instructions for android now? |
|
It's because we now require explicitly version 0.29. As stated above |
RN0.29 compatability
React native 0.29 has some changes to the way they initialize libraries, which means they are initialized from the
Applicationrather than theMainActivity. We added the Activity as a constructor argument toMapsPackagein PR#276 to fix Sony Xperia devices with Android 6.0 crashing #271.After some experimentation and testing we've found that if you supply
ReactContext.getBaseContext()to the Google Maps API you can get away with not needing the MainActivity. I have also left thepublic MapsPackage(Activity activity) { }constructor for backwards compatibility, but if you'd rather this was removed, let me know and I'll update the PR.I've also updated the
build.gradlefile as per #359 to get the lib building with RN0.29.Tested with:
Nexus 6P
Nexus 5
Sony Xperia z5 compact