POST
|
We have an app listing in the ArcGIS Marketplace. Users who want to access our app using their ArcGIS Online credentials simply sign up for the app on the Marketplace and provision the user with the appropriate licensing. It works great! I want to sign up for my own app so I can create a sample account. When I view my app, the "Free Trial" button is disabled and I see options to edit my listing instead (see below). How do I sign up for my own app on the ArcGIS Marketplace? Thanks! Matt
... View more
06-18-2019
11:20 AM
|
0
|
0
|
160
|
POST
|
Hi AppStudio Team! I need to bring ArcGIS Runtime into Survey123 so I can sync feature services. I saw Erwin answered a similar question previously, but my situation is slightly different, so I thought it would be best to create a new thread. I asked about this over on the Survey123 forum. James Suggested we look at using parallel portal objects. We tried creating a parallel Portal object and we were able to get sync working (yeah!), the only problem is we have to sign in twice - once for the Survey123 portal object and once for the runtime object. Below is the code we are currently using. We will always be signed into Survey123 and have an Esri user access token when we run sync. Is it possible to create a new portal object using an access token instead of a username and password? var portal = ArcGISRuntimeEnvironment . createObject ( "Portal" , { url : " https://www.arcgis.com " } ) ; var credential = ArcGISRuntimeEnvironment . createObject ( "Credential" ) ; credential . username = "[portal username]" ; credential . password = "[portal password]" ; portal . credential = credential ; portal . loadStatusChanged . connect ( function ( ) { if ( portal . loadStatus === Enums . LoadStatusLoaded ) { var info = portal . portalInfo ; var licenseInfo = info . licenseInfo ; // update licence Info ArcGISRuntimeEnvironment . setLicense ( licenseInfo ) ; console . log ( "licensceLevel after Update:" + ArcGISRuntimeEnvironment . license . licenseLevel ) ; } Thanks! Matt
... View more
01-18-2019
10:40 AM
|
0
|
1
|
105
|
POST
|
Thanks James. I will take it up with the AppStudio forum.
... View more
01-15-2019
02:38 PM
|
0
|
0
|
14
|
POST
|
I have a web app that uses OAuth2 to authenticate Esri named users. I have an access token for the user and, if the feature service is "secured" (not shared with public), I append the token to the feature service to load it (e.g. "[feature service url]?token=[token]") . It used to be that if I appended the token to a "public" feature service (share with everyone), then I would get an error and the service wouldn't load. That meant I would have to track which services were "secured" and which were "public" and request the data accordingly. I noticed on AGOL the other day when I looked at the details page of a "public" feature service that an access token was appended to it. I thought that was interesting, so I started experimenting. It appears that I can now append an any Esri access token to a "public" feature service and it will still load as long as the token is valid. I have 3 questions on this topic: Is my understanding correct, that you can append an access token to a "public" feature service and it will still load? If that is correct, when was the change made? Is it documented somewhere? Will that always work in the future? If so, I am going to simplify my codebase and always append an access token to feature services. If it is uncertain, I might need to leave it all in "just in case". Thanks!
... View more
01-15-2019
02:35 PM
|
0
|
0
|
62
|
POST
|
I just learned over on this thread that Survey123 doesn't actually use the Runtime Portal object. I am modifying Survey123 in AppStudio and I need to be able to sync feature services, so I need Runtime. Any recommendations on how to approach this? Should I replace portal or make a new object that uses Runtime Portal? Thanks, Matt
... View more
01-11-2019
11:32 AM
|
0
|
2
|
96
|
POST
|
Paul, Yes! That is what I was missing. Survey123 doesn't use the Portal Runtime object. I switched to the sample "Portal User Info" and it worked great. If anyone is curious, below is the code I used: Portal { id : portal credential : Credential { oAuthClientInfo : OAuthClientInfo { oAuthMode : Enums . OAuthModeUser clientId : "T3Gjh6a2d0MK14ke" } } Component . onCompleted : load ( ) ; onLoadStatusChanged : { if ( loadStatus === Enums . LoadStatusLoaded ) { console . log ( "**************** Signed in! ****************" ) console . log ( "license level before: " + ArcGISRuntimeEnvironment . license . licenseLevel ) } if ( loadStatus === Enums . LoadStatusFailedToLoad ) retryLoad ( ) ; } } Which resulted in: License level 2! Just as I was hoping. Thanks for everyone for helping with this! Matt
... View more
01-11-2019
11:23 AM
|
0
|
0
|
19
|
POST
|
I just can't figure out if portal is an object or a string. Let me show you what I mean. Below is what I put into the S123 app: console . log ( "Signed in!" ) ; console . log ( "portal:" + portal ) ; console . log ( "portal JSON:" + JSON . stringify ( portal . json ) ) ; console . log ( "portal.user:" + JSON . stringify ( portal . user ) ) ; console . log ( "portal.portalInfo:" + portal . portalInfo ) ; Here is what shows in the log: When I try to stringify portal, I get undefined, but when I stringify portal.user I get an object. That doesn't make any sense to me. If portal.user contains information, then portal should be an object, right? What is going on? Would it be helpful if I shared the entire codebase so you could run it yourself? It is simply the Survey123 template with the console.log added to onSignedInChanged in SurveyApp.qml.
... View more
01-10-2019
02:06 PM
|
0
|
2
|
73
|
POST
|
Hi Thomas, I am just trying to use the Survey123 template. With the code for that app, it looks like the portal object is created on line 503 of SurveyApp.qml (see the file I uploaded previously and below). Portal { id : portal . . . onSignedInChanged : { . . . if ( signedIn ) { userInfo = portal . user ; writeUserInfo ( ) ; console . log ( qsTr ( "Signed in!" ) ) ; console . log ( "Signed in!" ) ; console . log ( "portal:" + portal ) ; console . log ( "portal.portalInfo:" + portal . portalInfo ) ; console . log ( "portal.portalInfo.licenseInf:" + portal . portalInfo . licenseInf ) ; ArcGISRuntime . license . setLicense ( portal . portalInfo . licenseInfo ) } } } There is a function onSignedInChanged (see line 536) inside Portal. I'm just really confused with the object portal. When I use console.log to view portal, I just get a string. But when I use portal.user, it returns the user information. However, portal.portalInfo is undefined. So, I have 2 questions. What is up with the portal object? Why do I get a string with console.log("portal:"+portal) but I get an object with console .log( "portal:" + portal.user ). Shouldn't portal.portalInfo be defined in the code block above? What am I missing? Thanks, Matt
... View more
01-09-2019
10:31 AM
|
0
|
4
|
73
|
POST
|
Is anyone else having this issue where portal.portalInfo is undefined? I'm confused. I would have thought portal would be a big JSON object, not a string like is shown above. I must be missing something.
... View more
01-08-2019
07:54 PM
|
0
|
6
|
73
|
POST
|
Hi Lauren, The named user licensing sounds perfect, but I'm having some issues accessing portal.portalInfo. For testing purposes, I created a new app using the Survey123 template. I added the following lines to the onSignedInChanged function (see attached for the modified file). console . log ( "Signed in!" ) ; console . log ( "portal:" + portal ) ; console . log ( "portal.portalInfo:" + portal . portalInfo ) ; console . log ( "portal.portalInfo.licenseInf:" + portal . portalInfo . licenseInf ) ; And below is what I'm getting in the log: portal.portalInfo is undefined. It appears that portal is a string and not a JSON object. What am I missing? Thanks, Matt
... View more
01-07-2019
11:56 AM
|
0
|
0
|
73
|
Online Status |
Offline
|
Date Last Visited |
Monday
|