Demonstration of bridging to Java from Objective-C to respect device orientation lock setting via Apportable Android
Use when adapting Objective-C applications for execution on Android especially when original Objective-C application supports arbitrary orientation.
Fetches "is screen rotation locked" value from android.provider.Settings.System. For demonstration purposes, every 5 or so turns it will honor the rotation setting, then for another 5 it won't.
- SettingsSystemUtil.java - Java code to be exposed
- SettingsSystemUtil.m - Objective-C code exposing Java code via helper
+[SettingsSystemUtil isAccelerometerRotationAllowed]
- configuration.json - build integration of
SettingsSystemUtil
Java and Objective-C source files -[ViewController shouldAutorotateToInterfaceOrientation]
- usage demonstration of conditionally honoring and not honoring the device's rotation lock setting
- Apportable Platform - tested on v1.1.24