AppStudio Player unable to edit features in .geodatabase ?

2280
1
Jump to solution
02-28-2016 01:14 PM
TobiasFimpel1
Occasional Contributor III

Can anyone replicate this or suggest how to troubleshoot?

(1)The AppStudio Desktop Edition has an ESRI sample named "Local geodatabase editing". I can download that into AppStudio Dektop, run it from AppStudio Desktop by clicking the Run button in the top left, and everything works great.

(2)Then in AppStudio Desktop I "create a new app from Local geodatabae editing". Again I run it from AppStudio Desktop and again everything works great.

(3)Now I upload my app that I created in (2) to ArcGIS Online, open it in the AppStudio Player App, and I am unable to update features.

Any ideas? Is this a known limitation of AppStudio Player? (I observe the same behavior with other apps that don't just update features but also insert and delete features/records/attachments - editing operations work great in AppStudio Desktop but not in the Player App.)

Thanks,

Tobias

0 Kudos
1 Solution

Accepted Solutions
TobiasFimpel1
Occasional Contributor III

Answering my own question, maybe it helps somebody else in the future: this is licencing related. As defined here​​​ to do offline editing the app needs to be ​​licensed at the Standard level. Whether or not you're signed into the Player App with an account that has a Standard level license for AppStudio seems to be irrelevant (unfortunately).

In the case of the Local geodatabase editing sample, one way to make it work is like this:

//insert on  approx. line 27, after "App {":

    // Define Portal components

      Portal {

          id: portal

          url: "http://www.arcgis.com"

          onSignInComplete: {

              console.log(qsTr("Signed in!"));

              ArcGISRuntime.license.setLicense(portal.portalInfo.licenseInfo)

          }

          onSignInError: {

              console.log(qsTr("Failed to sign in."));

          }

      }

//insert on approx. line 349, after "Component.onCompleted: {":

function portalSignIn ( ) {

      // Supply user credentials to login into online Portal

      portal.credentials.userName = "<your username>" //the username here

      portal.credentials.password =  "<your password>" //the password here

      portal.signIn();

  }

    portalSignIn();

View solution in original post

1 Reply
TobiasFimpel1
Occasional Contributor III

Answering my own question, maybe it helps somebody else in the future: this is licencing related. As defined here​​​ to do offline editing the app needs to be ​​licensed at the Standard level. Whether or not you're signed into the Player App with an account that has a Standard level license for AppStudio seems to be irrelevant (unfortunately).

In the case of the Local geodatabase editing sample, one way to make it work is like this:

//insert on  approx. line 27, after "App {":

    // Define Portal components

      Portal {

          id: portal

          url: "http://www.arcgis.com"

          onSignInComplete: {

              console.log(qsTr("Signed in!"));

              ArcGISRuntime.license.setLicense(portal.portalInfo.licenseInfo)

          }

          onSignInError: {

              console.log(qsTr("Failed to sign in."));

          }

      }

//insert on approx. line 349, after "Component.onCompleted: {":

function portalSignIn ( ) {

      // Supply user credentials to login into online Portal

      portal.credentials.userName = "<your username>" //the username here

      portal.credentials.password =  "<your password>" //the password here

      portal.signIn();

  }

    portalSignIn();