Support react-native > 0.40 (#437)

* Support react-native > 0.40

* Bumping major version. Breaking change.

* Upgrade example project from 0.33 => 0.40.
This commit is contained in:
Olof Dahlbom
2017-01-11 13:43:43 +01:00
committed by Matt Apperson
parent 9bcf70cbb5
commit fe6bc4f3df
24 changed files with 493 additions and 222 deletions

View File

@@ -9,6 +9,7 @@ import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
@@ -25,13 +26,19 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactVideoPackage()
new ReactVideoPackage()
);
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}