Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private auth As FirebaseAuth 'PARA REGISTRARME CON GOOGLE
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.
Dim IMGACCEDER As ImageView
Dim aliasgoogle, usuariogoogle As String
Dim GOOGLEINICIALIZADO As Boolean
GOOGLEINICIALIZADO=False
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")
CREAR_INTERFAZ
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub CREAR_INTERFAZ
IMGACCEDER.Initialize("IMGACCEDER")
Activity.AddView(IMGACCEDER,(Activity.Width/2)-100dip,(Activity.Height/2)-100dip,200dip,200dip)
IMGACCEDER.Bitmap=LoadBitmapResize(File.DirAssets,"CONECTAR.png",100%x,100%y,True)
IMGACCEDER.gravity=Gravity.fill
End Sub
Sub Auth_SignedIn (User As FirebaseUser)
Log("SignedIn: " & User.DisplayName)
aliasgoogle=User.DisplayName.ToUpperCase
usuariogoogle=User.Email.ToUpperCase
Log ("Alias: " & aliasgoogle & " usuario: " & usuariogoogle)
Msgbox(aliasgoogle & " " & usuariogoogle,"Datos")
End Sub
Sub IMGACCEDER_CLICK
If GOOGLEINICIALIZADO=False Then
auth.Initialize("auth")
End If
If auth.CurrentUser.IsInitialized Then
auth.SignOutFromGoogle
End If
auth.SignInWithGoogle
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
End Sub