Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Type POI (id As Int, name As String, teaser As String, text As String, factsTitle As String, facts As String, Latitude As Double , Longitude As Double, _
SliderBild1 As String, sliderBild2 As String, sliderText1 As String, sliderText2 As String, ARBild As String, ARAngle As Int, _
Media1 As String, Mediasize1 As Double, Media2 As String, Mediasize2 As Double, icon As String, dist As Double)
Private POImap As Map
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("1")
Dim f As String
f = "testcontent_error.app" 'this produces the error
f = "testcontent.app" 'this kvs makes no error
If FirstTime Then
File.Copy(File.DirAssets,f, File.DirInternal, f)
End If
Dim kvs As KeyValueStore
kvs.Initialize(File.DirInternal,f)
POImap = kvs.getObject("poimap")
Dim p As POI
p = POImap.GetValueAt(1)
Log(p.text) 'output html with images base64 encoded
Dim html As String
html = p.text
html = html.replace("contenteditable=" & Chr(34) & "true" & Chr(34), "contenteditable=" & Chr(34) & "false" & Chr(34)) 'make the html non editable
WebView1.LoadHtml(html) 'show page of html
End Sub