Sub Globals
Dim list1 As List
Dim akt_pos As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim job3 As HttpJob
list1.Initialize
' list1.AddAll(Array As String("http://img.geocaching.com/cache/large/5d53aaf9-f92c-4691-9141-130054b72f75.jpg","GC1YRK0-Test1.jpg"))
' list1.AddAll(Array As String("http://img.geocaching.com/cache/large/2e335b83-ddbe-4370-b2c9-ba42de733093.jpg","GC3GWDT-Test2.jpg"))
' list1.AddAll(Array As String("http://img.geocaching.com/cache/large/9b6a99dc-4cf1-4f41-93fd-47841444f2d9.jpg","GC3BM6H-Test3.jpg"))
' list1.AddAll(Array As String("http://img.geocaching.com/cache/large/ef0af76f-6285-4458-88a6-5e4385ab45ce.jpg","GC3BM6H-Test4.jpg"))
list1.AddAll(Array As String("http://img.geocaching.com/cache/large/5d53aaf9-f92c-4691-9141-130054b72f75.jpg@GC1YRK0-Test1.jpg"))
list1.AddAll(Array As String("http://img.geocaching.com/cache/large/2e335b83-ddbe-4370-b2c9-ba42de733093.jpg@GC3GWDT-Test2.jpg"))
list1.AddAll(Array As String("http://img.geocaching.com/cache/large/9b6a99dc-4cf1-4f41-93fd-47841444f2d9.jpg@GC3BM6H-Test3.jpg"))
list1.AddAll(Array As String("http://img.geocaching.com/cache/large/ef0af76f-6285-4458-88a6-5e4385ab45ce.jpg@GC3BM6H-Test4.jpg"))
job3.Initialize("Job3", Me)
' job3.Download("http://img.geocaching.com/cache/large/5d53aaf9-f92c-4691-9141-130054b72f75.jpg")
For i = 0 To list1.Size - 1
Dim j As HttpJob
akt_pos = i
j.Initialize("j", Me)
Dim str1 As String
str1 = list1.get(akt_pos)
Dim zw_zeile As String
Dim bis As Int
bis = str1.IndexOf("@")
zw_zeile = str1.SubString2(0,bis)
j.Download(zw_zeile)
Next
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success = True Then
Activity.SetBackgroundImage(Job.GetBitmap)
Dim out As OutputStream
' out = File.OpenOutput(File.DirRootExternal&"/Test_Mystery","Test.jpg",False )
Dim str1 As String
str1 = list1.get(akt_pos)
Dim zw_zeile As String
Dim von As Int
von = str1.IndexOf("@")
zw_zeile = str1.SubString2(von + 1 , str1.Length)
Msgbox(zw_zeile,"Save "&akt_pos)
out = File.OpenOutput(File.DirRootExternal&"/Test_Mystery",zw_zeile,False )
File.Copy2(Job.GetInputStream, out)
out.Close
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub