Follow along with the video below to see how to install our site as a web app on your home screen.
Beleška: this_feature_currently_requires_accessing_site_using_safari
createState("st_SMSSendLocation", {
init = function()
local phone_number = {}
MODEL.other.country_info.select_country_by_pos(MODEL.navigation.car.position())
local emergency_number = MODEL.other.country_info.list[current].emergency_number()
local s = tostring(sc_GetSysEntry("sos", "phone_number", emergency_number))
s = string.gsub(s, "[%s]", "")
s = string.gsub(s, "+?%d+", function(s2)
return "\"" .. s2 .. "\""
end)
phone_number = loadstring(" return {" .. s .. "}")()
local message = towstring(MODEL.navigation.car.position())
message = wstring.gsub(message, L"longitude = ", L"")
message = L"http://maps.google.com/?ll=" .. wstring.gsub(message, L"latitude = ", L"")
message = wstring.gsub(message, L"%s", L"")
message = wstring.gsub(message, L"(%d+.%d+),(%d+.%d+)", L"%2,%1")
MODEL.my.map.select_address(MODEL.navigation.car.position())
local message2 = L"Address: " .. sc_wformat_replace_shield(MODEL.my.map.selected_item.address.long_format())
local message3 = L"TEKST TRECE PORUKE UPISATI OVDE PO ZELJI"
local warning = tostring(sc_GetSysEntry("sos", "warning", "false"))
for i = 1, #phone_number do
java:call("android.startSendSMS", tostring(phone_number[i]), message, warning)
warning = "false"
java:call("android.startSendSMS", tostring(phone_number[i]), message2, warning)
java:call("android.startSendSMS", tostring(phone_number[i]), message3, warning)
end