How to determine emulator or real device ?

MLDev

Active Member
Licensed User
Longtime User
This works on every device and emulator I've tried.

B4X:
Sub inEmulator As Boolean
   Dim r As Reflector
   Dim brand As String = r.GetStaticField("android.os.Build", "BRAND")
   Return "generic" = brand.ToLowerCase
End Sub
 
Upvote 0
Top