Can full senor be used with android 2.2?
Closed this issue · 3 comments
Hey,
Going to be using this plugin to be able to lock and unlock orientation. Followed the directions and receiving these errors for the last 5 possible settings in ScreenOrientation.java includeing full sensor
SCREEN_ORIENTATION_FULL_SENSOR cannot be resolved or is not a field
The top 5 have no error.
Thinking maybe sensor_landscape, reverse_portrait, full_sensor ect were not implemented in 2.2?
If this is so, is there a way around it or is something wrong with my code maybe?
Any help would be appreciated. Thanks!
Josh
Yes, you are right. The last 5 orientations are not supported in 2.2.
I found that by checking the "Filter by API Level" and selecting "8" in the right upper corner of the API document(http://developer.android.com/reference/android/content/pm/ActivityInfo.html).
You just don't need to use these unsupported orientation. For example, instead of "fullSensor", you may use "unspecified" to unlock the orientation.(It works with my 2.2 device)
If problem persists, just delete code related to the unsupported orientations from ScreenOrientation.java(https://github.com/champierre/pg-plugin-screen-orientation/blob/master/src/com/tsukurusha/phonegap/plugins/ScreenOrientation.java)
Regards,
Junya
Sorry I did not respond sooner. I got it working. Thank you very much
On Tue, Jun 19, 2012 at 5:34 AM, Junya Ishihara
reply@reply.github.com
wrote:
Yes, you are right. The last 5 orientations are not supported in 2.2.
I found that by checking the "Filter by API Level" and selecting "8" in the right upper corner of the API document(http://developer.android.com/reference/android/content/pm/ActivityInfo.html).You just don't need to use these unsupported orientation. For example, instead of "fullSensor", you may use "unspecified" to unlock the orientation.(It works with my 2.2 device)
If problem persists, just delete code related to the unsupported orientations from ScreenOrientation.java(https://github.com/champierre/pg-plugin-screen-orientation/blob/master/src/com/tsukurusha/phonegap/plugins/ScreenOrientation.java)
Regards,
Junya
Reply to this email directly or view it on GitHub:
#2 (comment)
Great! I will close this issue.