Here is the process I used based on the documentation guide found here:

  1. Create the portal object by providing the URL string to the portal. In the example below, the public map is accessed from ArcGIS Online (www.arcgis.com):

    //construct the portal from the URL of the portal
    Portal portal = new Portal("http://www.arcgis.com");
    
  2. Construct the portal item object by providing the portal and the item ID string for the map:

     //construct a portal item from the portal and item ID string
     PortalItem mapPortalItem = new PortalItem(portal, 
    "e229d715f7ca4fa980308549fb288165");
    
  3. Pass the portal item to the map constructor:

    //construct a map from the portal item
    ArcGISMap map = new ArcGISMap(mapPortalItem);
    

However, I realized this would not work (the map would never load and display) whenever I passed an item ID for a Web App, but it did work when I passed in an item ID for a Web Map. Could anyone further explain why PortalItem does not support the display of Web Apps?

1

There are 1 best solutions below

0
On

Web Apps are not supported because the ArcGISMap is the runtime corollary to a Web Map. A Web App is an HTML/Javascript standalone application and not something that is supported within the runtime SDKs.