How to display a pop-up within an agol link

807
3
08-08-2017 05:47 PM
JoaoGrand_Junior
New Contributor II

I'm using the WebView to display an arcgis web app inside an window:

import QtQuick 2.5
import QtQuick.Controls 2.1
import QtQuick.Window 2.0
import QtWebEngine 1.1

import ArcGIS.AppFramework 1.0
import ArcGIS.AppFramework.Controls 1.0
import ArcGIS.AppFramework.WebView 1.0
App {
    id: app
    width: 400
    height: 640
    visible: true
    WebView{
        anchors.fill: parent
        url:"https://pcrj.maps.arcgis.com/apps/StoryMapCrowdsource/index.html?appid=5d132f5efea4466f84dd79bef539b..."
    }
}



Inside that App window I can load the page properly, but  external pop-up it is not working.
How should I approach to handle external links like facebook auth, twitter, etc?

0 Kudos
3 Replies
nakulmanocha
Esri Regular Contributor

Use Qt.openUrlExternally(url)

For e.g.

Qt.openUrlExternally("https://pcrj.maps.arcgis.com/apps/StoryMapCrowdsource/index.html?appid=5d132f5efea4466f84dd79bef539b9a3"); 

Does this help?

Nakul

0 Kudos
JoaoGrand_Junior
New Contributor II

I don't think it does. This would call the browser outside the window.
I'd like to encapsulate an web application within an chosen window but to allow  facebook auth, gmail auth, facebook sharing and twitter sharing with pop-up metod.

I think we want to create another window to instatiate those pop-ups and after doing auth or sharing.

I thought about it, but never actually did it. I'm not shure how to handle external websites requests.

0 Kudos
nakulmanocha
Esri Regular Contributor

Have you looked into Sign-in OAuth sample?

arcgis-appstudio-samples/Sign in OAuth2 at master · Esri/arcgis-appstudio-samples · GitHub 

This is based on the 10.2.6 Runtime but can be easily upgraded to 100.1

Does this help?

0 Kudos