Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
manager.Initialize("manager", key)
manager.DebugLogging = True
aplayer.Initialize
timer.Initialize("Timer1", 100)
'tracker.Initialize
End If
If isFirstStart Then
Dim jo As JavaObject
jo.InitializeStatic("java.util.Locale")
Log(jo.RunMethodJO("getDefault", Null).RunMethod("getLanguage", Null))
speak = 2
setSavedSpeak(speak)
speak = loadSpeak
Else
speak = loadSpeak
End If
Width = GetDeviceLayoutValues.Width
Height = GetDeviceLayoutValues.Height
If FirstTime Then
If Premium Then
Else
adMobMinus = True
Height = Height - getAdMobHeight
End If
End If
Activity.LoadLayout("main")
Panel1.Width = GetDeviceLayoutValues.Width
Panel1.Height = GetDeviceLayoutValues.Height
Panel1.Top = 0
Panel1.Left = 0
setupLoadingScreen
End Sub
Sub setupLoadingScreen
page = 1
Dim iv As ImageView
iv.Initialize("")
Panel1.AddView(iv, 0, 0, Width, Height)
iv.Bitmap = sResizeBitmap(LoadBitmap(File.DirAssets, "screen.png"), Width, GetDeviceLayoutValues.Height)
tim.Initialize("LoadTimer", 2000)
tim.Enabled = True
End Sub
Sub LoadTimer_Tick
tim.Enabled = False
If pruefeInternetConnection Then
StartService(Starter)
Else
sql.Initialize("tracks")
favoriet.Initialize
playlistt.Initialize
Msgbox(sql.getString(19,speak), "")
Wait(1000)
setupPage2
End If
End Sub