I there something in B4i as the following code in B4A to check the screenorientation?
I know, that Page_Resize(Width As Int, Height As Int) gives the orientation, but I need to know, if the device is in right or left landscape.
In landscape, the heading of the device has always an 90° offset:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
thanks for help...
			
			I know, that Page_Resize(Width As Int, Height As Int) gives the orientation, but I need to know, if the device is in right or left landscape.
In landscape, the heading of the device has always an 90° offset:
			
				B4X:
			
		
		
		Private Sub LocManager_HeadingChanged (MagneticHeading As Double, TrueHeading As Double)
	
			
				B4X:
			
		
		
		'B4A-Code:
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
	thanks for help...