#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim admin As BluetoothAdmin
Dim serial1 As Serial
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private LabelTitolo As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
If FirstTime Then
admin.Initialize("admin")
serial1.Initialize("serial1")
End If
Activity.LoadLayout("frmEmulaA775")
Dim is_en As Boolean = admin.IsEnabled
If is_en=True Then
SetBluetoothName("TEST")
Else
ToastMessageShow("Attivare il bluetooth",True)
End If
ridimensiona
End Sub
Sub ridimensiona
rsz.ridm_obj(LabelTitolo)
End Sub
Sub SetBluetoothName (Name As String)
Dim jo As JavaObject
Return jo.InitializeStatic("android.bluetooth.BluetoothAdapter").RunMethodJO("getDefaultAdapter", Null).RunMethod("setName", Array(Name))
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub