Hello,
I have an old Android application that display local .tpk file.
I try to rewrite the application using Java and ArcGis Runtime 100.15.4, I have no errors, but the .TPK file is not displayed.
The .TPK file is located in a folder on the phone and the code is below:
public class MainActivity extends AppCompatActivity {
MapView mMapView;
ArcGISTiledLayer localTiledLayer;
@Override
protected void onCreate(
Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(
R.
layout.
main);
ArcGISRuntimeEnvironment.setApiKey("API_KEY");
String basemap = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+"/Folder_Name/MyFile.tpk";
mMapView = (MapView) findViewById(R.id.map);
localTiledLayer = new ArcGISTiledLayer(basemap);
Basemap b = new Basemap();
b.getBaseLayers().add(localTiledLayer);
ArcGISMap arcGISMap = new ArcGISMap(b);
mMapView.setMap(arcGISMap);
}
}
and the main.xml file:
The map from .TPK file is not visible, the only thing that is visible is the ESRI logo on bottom-right of the screen.
Can anybody help me with this issue?
Thank you.