I think we do not have such option in Android.
But we are here to help you. If you show the the problem in "landscape right side orientation" we may suggest some remedy for it.
Sorry, if I overlooked something. Is there any means of checking whether a screen orientation is reverse or 'normal'? If possible without the Phone library (my users dislike this permission). This seems important as the compass is 180 degrees off in reverse mode. It also appears as if...
Sorry, if I overlooked something. Is there any means of checking whether a screen orientation is reverse or 'normal'? If possible without the Phone library (my users dislike this permission). This seems important as the compass is 180 degrees off in reverse mode. It also appears as if...
NO! How should that work? I never saw any android app which shows two different orientations at the same time
As i wrote:
You can check the active Orientation and set another one if the wrong one is set. That´s the only thing i can imagine to prevent a specific orientation.
NO! How should that work? I never saw any android app which shows two different orientations at the same time
As i wrote:
You can check the active Orientation and set another one if the wrong one is set. That´s the only thing i can imagine to prevent a specific orientation.
ok so basically the logic is to check the current phone orientation and if orientation = reverse landscape than set orientation to portrait. Am i wrong?
If this is a non-B4XPages App you could use this to advice the user to change orientation.
Since orientation change triggers Activity_Create it will work all the time.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Do While GetOrientation = 3
xui.MsgboxAsync("Please rotate the device", "Orientation problem")
Wait For MsgBox_Result (Result As Int)
Loop
End Sub
Private Sub GetOrientation As Int
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "window", "java.lang.String")
r.Target = r.RunMethod("getDefaultDisplay")
Return r.RunMethod("getOrientation")
End Sub