Sub Activity_Create(FirstTime As Boolean)
GlobalVariazioniDB=False
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result1 As Boolean)
If Result1 = False Then
LogColor ("no PERMISSION_WRITE_EXTERNAL_STORAGE",Colors.red)
Msgbox ("L'app deve poter scrivere i risultati intermedi sul device.","INSTALLAZIONE INTERROTTA")
ExitApplication
Return
Else
Log("si PERMISSION_WRITE_EXTERNAL_STORAGE")
rp.CheckAndRequest(rp.PERMISSION_ACCESS_COARSE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result2 As Boolean)
If Result2=False Then
LogColor ("no PERMISSION_ACCESS_COARSE_LOCATION",Colors.red)
Msgbox ("L'app deve poter conoscere la posizione del device.","INSTALLAZIONE INTERROTTA")
ExitApplication
Else
Log ("si PERMISSION_ACCESS_COARSE_LOCATION")
rp.CheckAndRequest(rp.PERMISSION_ACCESS_COARSE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result3 As Boolean)
If Result3=False Then
LogColor ("no PERMISSION_ACCESS_FINE_LOCATION",Colors.red)
Msgbox ("L'app deve poter conoscere la posizione del device.","INSTALLAZIONE INTERROTTA")
ExitApplication
Else
Log ("si PERMISSION_ACCESS_FINE_LOCATION")
rp.CheckAndRequest(rp.PERMISSION_GET_ACCOUNTS)
Wait For Activity_PermissionResult (Permission As String, Result4 As Boolean)
If Result4=False Then
LogColor ("no PERMISSION_GET_ACCOUNTS",Colors.red)
LogColor ("no PERMISSION_ACCESS_FINE_LOCATION",Colors.red)
Msgbox ("L'app deve poter conoscere la posizione del device.","INSTALLAZIONE INTERROTTA")
ExitApplication
Else
Log ("si PERMISSION_GET_ACCOUNTS")
rp.CheckAndRequest(rp.PERMISSION_READ_CONTACTS)
Wait For Activity_PermissionResult (Permission As String, Result5 As Boolean)
If Result5=False Then
LogColor ("no PERMISSION_READ_CONTACTS",Colors.red)
Msgbox ("L'app deve poter conoscere l'account principale.","INSTALLAZIONE INTERROTTA")
ExitApplication
Else
Log("si PERMISSION_READ_CONTACTS")
Crea(FirstTime)
End If
End If
End If
End If
End If
End Sub
Sub Crea(FirstTime As Boolean)
Dim cols1(2) As Int
cols1(1) = Colors.argb ( 80, 0, 0, 0) : 'gd1.Initialize("TOP_BOTTOM",cols1)
cdblu.Initialize(Colors.blue,7dip) : cols1(0) = Colors.argb ( 80, 136, 136, 136)
cdverde.Initialize(Verde,7dip) : cols1(0) = Colors.argb ( 80, 136, 136, 136)
Marrone=Colors.RGB(132,33,33)
Verde=Colors.RGB(10,124,10)
GiaAbilitatoPulsanti=False
ecc. ecc.