The following code is no longer valid in new versions from react-native 0.29.0
import com.github.yamill.orientation.OrientationPackage; // <--- import
public class MainActivity extends ReactActivity {
......
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new OrientationPackage(this) <------- Add this
);
}
......
}
That is because this scope is Application instead of an activity.
Actually the code in github works with RN-0.29.2,it needs to be submitted to npm.
The current instructions are not working for me (using the latest version of react-native)
@aboutqx Thank you!
"react": "^15.3.1",
"react-native": "^0.32.0",
"react-native-orientation": "git+https://github.com/yamill/react-native-orientation",
Works fine on iOS. Something broken on Android?? Not seeing any clues in adb.
Android 6.0.1 and RN 0.33
https://github.com/yamill/react-native-orientation/issues/100 Orientation not changing on Android 6.0.1
"react": "^15.3.1",
"react-native": "^0.33.0",
"react-native-orientation": "git+https://github.com/yamill/react-native-orientation",
@yamill can you push another release to npmjs.com please?
+1
+1
+1
+1
+1
+1
+1
2.0 version of this will be published to NPM as soon as it's release-ready. Please follow the updates through on #174.
Most helpful comment
@yamill can you push another release to npmjs.com please?