call other application from qml application

1147
4
Jump to solution
08-26-2020 03:13 AM
rsharma
Occasional Contributor III

how to call user mobile other application from inside my qml application.

0 Kudos
1 Solution

Accepted Solutions
ErwinSoekianto
Esri Regular Contributor

It's the same, you need to know the URL to the target apps, like Youtube or Google Maps. 

Here's an example I created to open Google Maps or Apple Maps (if running on iOS) with a click of a button, 

I found their link and parameters to send from their documentation, for example, Google Maps docs, Get Started  |  Maps URLs  |  Google Developers 

As far as opening it from AppStudio App, the QML code that you need is Qt.openUrlExternally(target), that's all.

Thank you,

Erwin

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

cc ArcGIS AppStudio‌ does AppFramework have any helpers for this?

ErwinSoekianto
Esri Regular Contributor

Hello, 

This can easily be done by calling Qt.openUrlExternally(target). Qt QML Type | Qt QML 5.15.0  . You need to know the URL Scheme or App link for the target application. 

For example to open Survey123 field app, based on this doc, Integrate with other apps—ArcGIS Survey123 | Documentation 

  •  Using URL Scheme,

 

Qt.openUrlExternally(arcgis-survey123://?itemID=89bc8c7844e548e09baa3aad4695e78b);‍‍
  •  Using App Links, 

  

Qt.openUrlExternally(https://survey123.arcgis.app/?itemID=36ff9e8c13e042a58cfce4ad87f55d19);‍‍

If you are going to use URL Scheme to open another app from your custom AppStudio app, you need to specify the target URL Scheme in the setting of your app, in AppStudio Desktop. Settings->Advanced->Launch URL Schemes

Thank you,

Erwin. 

0 Kudos
rsharma
Occasional Contributor III

Hi erwin,

 I want to know about non arcgis apps like open youtube and google maps .

How to open them from arcgis apps

0 Kudos
ErwinSoekianto
Esri Regular Contributor

It's the same, you need to know the URL to the target apps, like Youtube or Google Maps. 

Here's an example I created to open Google Maps or Apple Maps (if running on iOS) with a click of a button, 

I found their link and parameters to send from their documentation, for example, Google Maps docs, Get Started  |  Maps URLs  |  Google Developers 

As far as opening it from AppStudio App, the QML code that you need is Qt.openUrlExternally(target), that's all.

Thank you,

Erwin