This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final double lat = latlng.latitude; | |
final double lon = latlng.longitude; | |
String url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&key=API_KEY"; | |
RequestQueue requestQueue= Volley.newRequestQueue(getContext()); | |
StringRequest stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
//This code is executed if the server responds, whether or not the response contains data. | |
//The String 'response' contains the server's response. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run android app | |
# usage runDebugApp [module] [fully qualified start activity com.package/com.package.MainActivity] | |
function runDebugApp(){ | |
./gradlew -offline :"$1":installDebug && adb shell am start "$2" && adb logcat -d > logcat.log && terminal-notifier -message 'runDebugApp Done!' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# manage jdk's | |
function setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inflate MapView from layout | |
mMapView = (MapView) findViewById(R.id.mapView); | |
// create a map with the Basemap Type topographic | |
final ArcGISMap map = new ArcGISMap(Basemap.Type.TOPOGRAPHIC, 48.354406, -99.998267, 2); | |
// create a MapImageLayer with dynamically generated map images | |
mMapImageLayer = new ArcGISMapImageLayer(getResources().getString(R.string.highway)); | |
mMapImageLayer.loadAsync(); | |
mMapImageLayer.addDoneLoadingListener(new Runnable() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define permission to request | |
private val reqPermission = arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE) | |
// For API level 23+ request permission at runtime | |
val reqPermission = arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE) | |
val requestCode = 2 | |
if (ContextCompat.checkSelfPermission(this, reqPermission[0]) == PackageManager.PERMISSION_GRANTED) { | |
// run fun | |
} else { | |
ActivityCompat.requestPermissions(this, reqPermission, requestCode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inflate MapView from layout | |
mMapView = (MapView) findViewById(R.id.mapView); | |
// create an ArcGISMap with BasemapType topo | |
final ArcGISMap map = new ArcGISMap(Basemap.Type.DARK_GRAY_CANVAS_VECTOR, 65.783988, -83.447820, 6); | |
pointCollectionOne = new PointCollection(SpatialReference.create(102113)); | |
pointCollectionOne.add(-9080995.6424, 9910570.681900002); | |
pointCollectionOne.add(-9349175.207599999, 9361330.556400001); | |
pointCollectionOne.add(-9236116.532600001, 10398421.5554); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
<!-- Project configuration... --> | |
<repositories> | |
<repository> | |
<id>esri-arcgis</id> | |
<url>https://esri.bintray.com/arcgis</url> | |
</repository> | |
</repositories> | |
<pluginRepositories> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you will find some related property for check the device is 32bit or 64bit | |
# ro.product.cpu.abilist32 | |
# ro.product.cpu.abilist64 | |
# ro.product.cpu.abilist | |
# getprop is an android utility to retrieve a property via the android property service. | |
adb shell getprop | |
# ro.product.cpu.abi is android property, this property could help you confirm this device is ARM or Intel x86 | |
adb shell getprop ro.product.cpu.abi |