Search and navigate intent for google maps #5

Merged
sriramsv merged 1 commits from maps into master 2022-08-28 07:34:32 -04:00
Showing only changes of commit b0400c6c59 - Show all commits

View File

@@ -0,0 +1,31 @@
-- name = "Navigate"
-- description = "Navigate to address"
-- data_source = "internal"
-- type = "search"
-- author = "Sriram SV"
-- version = "1.0"
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