|
POST
|
The API does not provide a way to constrain the map extent. You could implement this in a webmap or programmatically use the OnStatusChangedListener on the MapView to detect changes to the map and implement the logic to constrain the maps extent.
... View more
10-28-2013
01:50 PM
|
0
|
0
|
344
|
|
POST
|
I will address the 2GB limitation you reference. There is an issue in Android v10.1.1 and earlier that limits the size to 2GB which comes from our native library implementation. We have a fix from in our native library in our upcoming 10.2 release which increases the file size limit to 2e64Bytes (~16777216TB). While we will support such large file sizes, the ability to take advantage will depend on your device. Limitations to 4GB exist in NTFS (2GB on FAT32) but increases with ext4 up to 16TB and exFAT.
... View more
10-24-2013
11:54 PM
|
0
|
0
|
442
|
|
POST
|
Your best workflow for shapefiles is to convert them to a file geodatabase and use ArcGIS Desktop 10.2.1 to export as a Runtime geodatabase which will be supported in our upcoming v10.2 release.
... View more
10-24-2013
11:47 PM
|
0
|
0
|
1377
|
|
POST
|
We have an emulator doc and will support x86 emulator in the upcoming 10.2 SDK release.
... View more
10-24-2013
11:43 PM
|
0
|
2
|
2057
|
|
POST
|
The Hello World sample depends on Android Build Target 10 API level 2.3.3. Please ensure that you have the platform installed. You can refer to this document to add platforms and packages to your Android SDK.
... View more
10-24-2013
11:35 PM
|
0
|
0
|
1533
|
|
POST
|
We support offline basemaps as *.tpk and offline features a JSON. Currently the API does not support the shapefile format. The next release will have added support for other offline files types. To see our current support, refer to ArcGISLocalTileLayer. The CreateLocalJsonFeatures sample shows a local *.tpk basemap and features from a feature layer persisted as JSON for offline usage.
... View more
10-09-2013
10:57 AM
|
0
|
0
|
1377
|
|
POST
|
And for the ESRI people, this behaviour is going to be implemented in future realeses of the SDK? Yes, we are planning to support file based KML in a future release.
... View more
09-30-2013
12:12 PM
|
0
|
0
|
1165
|
|
POST
|
The Android API provides Unit.convertUnits() to convert between the same UnitType.
... View more
09-30-2013
12:06 PM
|
0
|
0
|
524
|
|
POST
|
We have reproduced the issue of only classes showing up on javadoc hover in Eclipse. I am looking into the issue and will provide an update soon.
... View more
09-25-2013
05:52 PM
|
0
|
0
|
1198
|
|
POST
|
With the v10.1.1-u1 release you can access OAuth2 services but there is not support in the API. You can authenticate OAuth2 services by requesting a token via URL and parse response via JSON. Once authenticated you can load the resource. Here is an example DialogFragment that authenticates OAuth2 using Android, Jackson, and Java API.
public class WebViewDialogFragment extends DialogFragment {
// The redirect_uri can be either a special value of urn:ietf:wg:oauth:2.0:oob
// or an application-specific custom URI that is handled on the device.
private static final String REDIRECT_URI = "";
// OAuth2 client_id = APPID
private static final String CLIENT_ID = "";
String username;
String access_token;
String refresh_token;
private CountDownLatch latch;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
getDialog().setTitle("Sign in to ArcGIS Online");
final View root = inflater.inflate(R.layout.activity_main, null);
root.findViewById(R.id.progressbar).setVisibility(View.VISIBLE);
final WebView webView = (WebView) root.findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
final String code = url.substring(url.indexOf("?code=") + 6,
url.length());
AsyncTask.execute(new Runnable() {
@Override
public void run() {
try {
requestToken("https://www.arcgis.com/sharing/rest/oauth2/token?client_id="
+ CLIENT_ID
+ "&redirect_uri="
+ REDIRECT_URI
+ "&grant_type=authorization_code&code="
+ code);
} catch (Exception e) {
Log.e(getClass().getSimpleName(), "", e);
}
dismiss();
}
});
return true;
}
@Override
public void onPageFinished(WebView view, String url) {
webView.setVisibility(View.VISIBLE);
root.findViewById(R.id.progressbar).setVisibility(View.GONE);
}
});
webView.loadUrl("https://www.arcgis.com/sharing/oauth2/authorize?client_id="
+ CLIENT_ID
+ "&response_type=code&redirect_uri="
+ REDIRECT_URI);
return root;
}
@Override
public void onDismiss(DialogInterface dialog) {
if (latch != null)
latch.countDown();
super.onDismiss(dialog);
}
public void setLatch(CountDownLatch latch) {
this.latch = latch;
}
private void requestToken(String url) throws JsonParseException,
MalformedURLException, IOException {
JsonFactory f = new JsonFactory();
JsonParser json = f.createJsonParser(new URL(url));
json.nextToken();
while (json.nextToken() != JsonToken.END_OBJECT) {
String name = json.getCurrentName();
json.nextToken();
if ("username".equals(name))
username = json.getText();
else if ("access_token".equals(name))
access_token = json.getText();
else if ("refresh_token".equals(name))
refresh_token = json.getText();
Log.i(getClass().getSimpleName(), name + " = " + json.getText());
}
}
}
Then you can launch the dialog from your Map Class with the following:
// Create and show the dialog.
WebViewDialogFragment dialog = new WebViewDialogFragment();
CountDownLatch latch = new CountDownLatch(1);
dialog.setLatch(latch);
dialog.show(getFragmentManager(), "dialog");
try {
latch.await();
if (!TextUtils.isEmpty(dialog.access_token)) {
credentials = new UserCredentials();
credentials.setUserAccount(dialog.username, "-");
credentials.setUserToken(dialog.access_token, "-");
credentials.setAuthenticationType(AuthenticationType.TOKEN);
return new MapLoadAction<UserCredentials>(
Action.CONTINUE_OPEN_WITH_THE_PARAMETER,
credentials);
}
} catch (InterruptedException e) {
Log.e(getClass().getSimpleName(), "", e);
}
The 10.2 Android SDK release will have support for authenticating in the API. It will include a class to authenticate and set listeners to. In the listener callback you can load the map or save the credentials to disk or both. We will release an OAuth2 sample with the next release of the SDK, v10.2.
... View more
09-25-2013
04:04 PM
|
1
|
1
|
1086
|
|
POST
|
Although I have not seen memory issues in the app, I have made the change to the maps-app by removing the static qualifier as it is not the recommended pattern for MapView.
... View more
09-25-2013
08:50 AM
|
0
|
0
|
502
|
|
POST
|
What physical device are you deploying to, e.g. Galaxy Nexus, HTC, etc. I am still trying to reproduce.
... View more
08-23-2013
10:24 AM
|
0
|
0
|
1752
|
|
POST
|
Trying to keep these posts in synch. I will add that we are testing with genymotion emulator as well since this post referenced it.
... View more
08-22-2013
01:15 PM
|
0
|
0
|
639
|
|
POST
|
android:configChanges="orientation|screenSize" Add this bit of code to your manifest -> activity. In android 4.x screenSize flag is a must, as it also triggers activity to be recreated. Edit: Also, it would be great if someone updated SDK samples to include this for android 4.x ... If your application targets API level 13 or higher you should declare the "screenSize" configuration, becuase it changes when a device switches between portrait and landscape. We have added it to SDK samples targeting API level 13 and higher. Here is the android guide topic.
... View more
08-22-2013
01:10 PM
|
0
|
0
|
902
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-28-2014 11:13 AM | |
| 1 | 04-29-2015 06:36 PM | |
| 1 | 09-15-2014 12:01 PM | |
| 1 | 06-02-2017 04:43 PM | |
| 1 | 01-21-2015 07:00 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|