mobile browser android (resolved)
Posted: Sat Mar 08, 2014 3:09 am
i am try to reproduce this code from dixie but still i can't figure out what i do wrong.
in the emulator and the phone i get the error "webpage is no available"
here is the code i use and the photos with info bellow..
in app settings ,internet and locations is checked and file included in the copy.(internet i have
)
any help will be nice!!!
in the emulator and the phone i get the error "webpage is no available"
here is the code i use and the photos with info bellow..
in app settings ,internet and locations is checked and file included in the copy.(internet i have

Code: Select all
global sBrowserid
# when the card is opened make sure that default settings are configured
on preOpenCard
# quit if we are not on a mobile device
if the environment is not "mobile" then exit preOpenCard
if mobileCanTrackLocation() then
mobileStartTrackingLocation -- Will fire locationChanged when GPS is found
else
Answer "This mobile is NOT able to track GPS location"
end if
end preOpenCard
/////
on opencard
if the environment is not "mobile" then exit OpenCard
put specialFolderPath("documents") & "/lcNav.html" into thehtmlFile
/* change the latitude & longditude in the html file to display the chosen city */
put URL("file:" & thehtmlFile) into theData
put "var myLatlng = new google.maps.LatLng(" & fld "f3" of card "showrecords" & ");" into line 16 of theData
put theData into URL ("file:" & thehtmlFile)
// answer theData
put "file://" & specialFolderPath("documents") & "/lcNav.html" into theURL
replace space with "%20" in theURL
answer theURL
gotourl
end opencard
on gotourl
# create the browser
mobileControlCreate "browser"
put the result into sBrowserId
# set up the basic defaults
mobileControlSet sBrowserId, "rect", the rect of group "Browser"
mobileControlSet sBrowserId, "visible", "true"
mobileControlSet sBrowserid, "url", theURL
end gotourl
# destroy the browser we created
on closeCard
mobileControlDelete sBrowserId
end closeCard