Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:help:v2:intents [2020/04/21 20:01] – created alpinequesten:help:v2:intents [2024/02/20 09:37] (current) psyberia
Line 1: Line 1:
-<sub>[[en:help|Online Help]] > [[en:help:v2|AlpineQuest 2.x]] > Maps & Layers</sub>+<sub>[[en:help:v2|Online Help]] > Intents</sub>
  
 ====== Intents ====== ====== Intents ======
 +\\
 +The application responds to various intent actions, allowing you to control few features from external application like [[https://play.google.com/store/apps/details?id=com.llamalab.automate|Automate]] or [[https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm|Tasker]].
  
-The application does respond to various intent actions, allowing you to control few features from external application like [[https://play.google.com/store/apps/details?id=com.llamalab.automate|Automate]] or [[https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm|Tasker]].+\\
  
-General intents: +===== Global intents ===== 
-  * **''"APP_STOP"''**: Close the application.+\\ 
 +The application responds to the following intents, even if it is not explicitly targeted.
  
-Placemarks: +\\
-  * **''"LANDMARKS_FAST_WAYPOINT"''**: Create a waypoint on the map, saved in the default placemarks folder. The screen center location or GPS location (if available) is used based on the last created waypoint choices. Extra fields: **''"name"''** (//''String''//; the waypoint name).+
  
-Track recorder: +  * **Intent action "net.psyberia.intent.action.DISPLAY_LOCATION"**
-  * **''"TRACKER_START"''**: Start the track recorder; +
-  * **''"TRACKER_STOP"''**: Stop the track recorder; +
-  * **''"TRACKER_ADD_WAYPOINT"''**: Add a waypoint to the recorded trackExtra fields: **''"name"''** (//''String''//; the waypoint name).+
  
 +Displays a location on the map.
 +
 +^ Optional extras  ^ Type  ^ Description  ^
 +| net.psyberia.intent.extra.MEM_ID  | String  | Memory ID. If specified, replaces a previous location displayed with this same ID.  |
 +| net.psyberia.intent.extra.TRACK_ID  | String  | Track ID. If specified, appends the location to a track named after this ID.   |
 +| net.psyberia.intent.extra.SET_ID  | String  | Set ID. If specified, adds the location to a waypoints set named after this ID.  |
 +| net.psyberia.intent.extra.LONGITUDE  | Double  | WGS84 longitude.  |
 +| net.psyberia.intent.extra.LATITUDE  | Double  | WGS84 latitude.  |
 +| net.psyberia.intent.extra.ELEVATION  | Double  | WGS84 elevation (meters).  |
 +| net.psyberia.intent.extra.HEADING  | Double  | Heading of movement (degrees).  |
 +| net.psyberia.intent.extra.TIMESTAMP  | Double  | Unix timestamp in seconds, instead of current date. Set to ''"0.0"'' for no date.  |
 +| net.psyberia.intent.extra.NAME  | String  | name of the point (ignored if using a track ID).  |
 +| net.psyberia.intent.extra.COMMENT  | String  | comment of the point (ignored if using a track ID).  |
 +| net.psyberia.intent.extra.DESCRIPTION  | String  | description of the point (ignored if using a track ID).  |
 +| net.psyberia.intent.extra.ICON  | String  | icon name of the point (ignored if using a track ID).  |
 +| net.psyberia.intent.extra.MOVE_TO  | Boolean  | Whether or not move the map center over the location.  |
 +
 +__Example in Automate__:\\
 +- Block type: ''App start''\\
 +- Action: ''"net.psyberia.intent.action.DISPLAY_LOCATION"''\\
 +- Extras: ''{"net.psyberia.intent.extra.LONGITUDE": -0.1, "net.psyberia.intent.extra.LATITUDE": 54.5, "net.psyberia.intent.extra.NAME": "Test", "net.psyberia.intent.extra.ICON": "Car", "net.psyberia.intent.extra.MOVE_TO" as boolean: 0}''
 +
 +\\
 +
 +  * **Intent scheme "geo"**
 +
 +Displays or searches a location.
 +
 +^ Supported formats examples  ^
 +| geo:{lat},{lon}  |
 +| geo:{lat},{lon}({name})  |
 +| geo:{lat},{lon}?z={osm_zoom_id}  |
 +| geo:?q={lat},{lon}({name})  |
 +| geo:0,0?q={lat},{lon}({name})  |
 +| geo:0,0?q={address}  |
 +
 +Some examples:
 +<html><br />
 +<a href="geo:38.8894716,-77.0352538">geo:38.8894716,-77.0352538</a><br />
 +<a href="geo:38.8894716,-77.0352538;name=Washington+Monument">geo:38.8894716,-77.0352538;name=Washington+Monument</a><br />
 +<a href="geo:38.8894716,-77.0352538(Washington+Monument)">geo:38.8894716,-77.0352538(Washington+Monument)</a><br />
 +<a href="geo:323482,4306480;crs=EPSG:32618;u=20">geo:323482,4306480;crs=EPSG:32618;u=20</a><br />
 +<a href="geo:18S+323482+4306480;crs=utm">geo:18S+323482+4306480;crs=utm</a><br />
 +</html>
 +
 +\\
 +
 +  * **Intent schemes "http" and "https"**
 +
 +Displays or searches a location.
 +
 +^ Supported formats examples  ^
 +| https://www.google.com/maps/place/{lat},{lon}  |
 +| https://www.google.com/maps/place/{lat},{lon},{google_zoom_id}z  |
 +| https://maps.google.com/?q={lat},{lon}  |
 +| https://maps.google.com/?q=loc:{lat},{lon},{google_zoom_id}z  |
 +| https://maps.google.com/?q=loc:{lat},{lon},{google_zoom_id}z({name})  |
 +
 +\\
 +
 +===== Application specific intents =====
 +\\
 +To use the following intents, you must explicitly target the application package.
 +
 +\\
 +
 +  * **Intent action "APP_STOP"**
 +
 +Closes the application.
 +
 +\\
 +
 +  * **Intent action "DISPLAY_LOCATION"**
 +
 +Displays a location on the map.
 +
 +^ Optional extras  ^ Type  ^ Description  ^
 +| mem_id  | String  | Memory ID. If specified, replaces a previous location displayed with this same ID.  |
 +| track_id  | String  | Track ID. If specified, appends the location to a track named after this ID.   |
 +| set_id  | String  | Set ID. If specified, adds the location to a waypoints set named after this ID.  |
 +| longitude  | Double  | WGS84 longitude.  |
 +| latitude  | Double  | WGS84 latitude.  |
 +| elevation  | Double  | WGS84 elevation (meters).  |
 +| heading  | Double  | Heading of movement (degrees).  |
 +| timestamp  | Double  | Unix timestamp in seconds, instead of current date. Set to ''"0.0"'' for no date.  |
 +| name  | String  | name of the point (ignored if using a track ID).  |
 +| comment  | String  | comment of the point (ignored if using a track ID).  |
 +| description  | String  | description of the point (ignored if using a track ID).  |
 +| icon  | String  | icon name of the point (ignored if using a track ID).  |
 +| move_to  | Boolean  | Whether or not move the map center over the location.  |
 +
 +__Example in Automate__:\\
 +- Block type: ''App start''\\
 +- Package: ''psyberia.alpinequest.full''\\
 +- Activity class: ''psyberia.alpinequest.full.AlpineQuestActivity''\\
 +- Action: ''"DISPLAY_LOCATION"''\\
 +- Extras: ''{"longitude": -0.1, "latitude": 54.5, "name": "Test", "icon": "Car", "move_to" as boolean: 0}''
 +
 +\\
 +
 +  * **Intent action "LANDMARKS_FAST_WAYPOINT"**
 +
 +Creates and displays a waypoint on the map. The waypoint is saved in the current placemarks Explorer place, the screen center location or the GPS location (if available) is used based on the last created waypoint choice.
 +
 +^ Optional extras  ^ Type  ^ Description  ^
 +| name  | String  | name of the waypoint.  |
 +
 +\\
 +
 +  * **Intent actions "TRACKER_START", "TRACKER_STOP" and "TRACKER_ADD_WAYPOINT"**
 +
 +Respectively starts the track recorder, stops the track recorder and add a waypoint to current recorded track.
 +
 +^ Optional extras for "TRACKER_ADD_WAYPOINT"  ^ Type  ^ Description  ^
 +| name  | String  | name of the waypoint.  |