2 part question:
Cheers,
Matt English
As a follow-on to this, based on the queryParameters I'd like to bypass the landing page and open up a particular map tour from the gallery - there may be 10 tours in the gallery. What would the code look like to do this?
Thanks,
Matt
Matt, no it is not possible to test this within the player. You will need to have a built app installed on your device. You can install a built app and test the app's link by accessing the link from a browser. Doing this prompts you to launch the app.
I can, for example, write the app below, and give it an app link of applink1. When I build and install the app on my device, I can call it from a browser by visiting the link applink1://?latitude=40
import QtQuick 2.7import ArcGIS.AppFramework 1.0App { id: app width: 400 height: 640 Text { id: txt text: "No parameter called latitude exists" anchors.fill: parent wrapMode: Text.WordWrap font.pointSize: 24 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } onOpenUrl: { var urlInfo = AppFramework.urlInfo(url); var openParameters = urlInfo.queryParameters; if (openParameters.hasOwnProperty("latitude")) { txt.text = "Latitude is " + openParameters.latitude; } }}
import QtQuick 2.7
import ArcGIS.AppFramework 1.0
App { id: app
width: 400 height: 640
Text { id: txt text: "No parameter called latitude exists" anchors.fill: parent wrapMode: Text.WordWrap font.pointSize: 24 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter }
onOpenUrl: { var urlInfo = AppFramework.urlInfo(url); var openParameters = urlInfo.queryParameters;
if (openParameters.hasOwnProperty("latitude")) { txt.text = "Latitude is " + openParameters.latitude; } }}
Is it possible to test this in AppStudio Player or from within Qt Creator? If so, how?
Hi Matt,
We have updated the github link with information on how you can capture the url parameters from a custom app link. Here is the code snippet.
We will include this as an upcoming enhancement for the map tour template.
Loayeh
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.