POST
|
I have a registered app (with client id and secret id). I want to enable users to download tiled map packages from the app ex: (https://tiledbasemaps.arcgis.com/arcgis/rest/services/USA_Topo_Maps/MapServer)... How do I use the new authentication patterns in version 100 to do an "app" login without having to present the user with the login screen. My users will not have logins to ArcGIS online or portal.
... View more
04-20-2017
04:49 PM
|
0
|
0
|
485
|
POST
|
Does anyone know if this works now in version 100.0.0?
... View more
12-16-2016
07:29 AM
|
0
|
1
|
569
|
POST
|
Andrew from Esri support was very helpful. To do "application" authentication (without a user name and password) using your app id and secret key you need something like the code below. However, there is a bug (BUG-000092420) in the android sdk and code below does not work at the present time. I'm being told that the fix may make in into the Quartz final release. private class AppLoginTask extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { Log.d("MyApp", "AppLoginTask"); Portal p = new Portal("https://www.arcgis.com", null); try { p.doOAuthAppAuthenticate(APP_SECRET, APP_ID, new CallbackListener<Portal>() { @Override public void onCallback(Portal portal) { Log.d("MyApp", "login callback"); //mCreds = new UserCredentials(); mCreds = portal.getCredentials(); setMapDataMode(MapDataMode.ONLINE); } @Override public void onError(Throwable throwable) { Log.e("MyApp", "login error"); } }); } catch (Exception e) { Log.d("MyApp", "login exception"); e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void results) { Log.d("MyApp", "login post execute"); //setMapDataMode(MapDataMode.ONLINE); } }
... View more
12-01-2015
04:34 PM
|
0
|
2
|
569
|
POST
|
It would be great if the Esri Android Dev team would respond.
... View more
11-09-2015
04:29 PM
|
0
|
0
|
569
|
POST
|
I'm developing an app using the ArcGIS Runtime SDK for Android. I'm accessing tiled basemaps from arcgis.com using the following code which works fine. UserCredentials creds = new UserCredentials(); creds.setUserToken("token", "referer"); String mapUrlUsaTopo = "https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer"; mBasemapLayer = new ArcGISTiledMapServiceLayer(mapUrlUsaTopo, creds); But... when I attempt to download the map tiles for offline use I get the following error: com.esri.core.io.EsriSecurityException: Message: Unable to generate token. Details: 'username' must be specified., 'password' must be specified. Here's the download code: String tileUrlUsaTopo = "https://tiledbasemaps.arcgis.com/arcgis/rest/services/USA_Topo_Maps/MapServer"; final ExportTileCacheTask exportTileCacheTask = new ExportTileCacheTask(tileUrlUsaTopo, creds); Is the only option hard coding the username and password?
... View more
11-05-2015
05:11 PM
|
0
|
5
|
3342
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|