Private Sub Button1_Click
Wait For (IsEmulator) Complete (Emulator As Boolean)
Log(Emulator)
End Sub
Public Sub IsEmulator As ResumableSub
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim jo As JavaObject
jo = jo.InitializeStatic("com.framgia.android.emulator.EmulatorDetector").RunMethod("with", Array(ctxt))
Dim callback As Object = jo.CreateEventFromUI("com.framgia.android.emulator.EmulatorDetector.OnEmulatorDetectorListener", "callback", Null)
jo.RunMethod("detect", Array(callback))
Wait For Callback_Event (MethodName As String, Args() As Object)
Dim result As Boolean = Args(0)
Return result
End Sub