small fixes

This commit is contained in:
Evgeny
2022-09-17 10:41:43 +03:00
parent 8bdb2a84a9
commit fbb5789c2e
5 changed files with 4 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
-- name = "Navigate"
-- description = "Navigate to address"
-- data_source = "internal"
-- type = "search"
-- author = "Sriram SV"
-- version = "1.0"
-- prefix = "navigate|nav"
text_from = ""
text_to = ""
maps_intent_action = "android.intent.action.VIEW"
maps_intent_category = "android.intent.category.DEFAULT"
maps_package_name = "com.google.android.apps.maps"
local md_color = require "md_colors"
local blue = md_colors.light_blue_800
function on_search(input)
text_from = input
text_to = ""
search:show({input},{blue})
end
function on_click(idx)
intent:start_activity{
action = maps_intent_action,
category = maps_intent_category,
package = maps_package_name,
data = "google.navigation:q="..text_from
}
end