Android app codes for Google Maps with clustering

I prepared Android app codes with Google Maps and clustering feature. Feel free to use these as basis for your new projects. They are on GitHub: [1] Default Map Markers: catzie/SimpleAndroidMapClustering   [2] Custom Map Markers: catzie/Simple-Android-Map-Clustering-with-Custom-Markers   I simply took the necessary classes and res files from Android Maps Utility demo, and then placed […]

Read More

Android Maps: Get current location coordinates with Google API Client Builder

To get your current location via Google Map in an Android app, this was how we do it:

Stop. Don’t use that! The method GoogleMap.getMyLocation() is deprecated. Instead, we need to use FusedLocationApi and the callback onLocationChanged(). Here’s an example code that works for me ( consider copying the contents of onResume() into onStart() […]

Read More

Bash: rename all files in directory, replacing all hyphens (-) with underscores (_)

I don’t want to waste time doing things manually when I can run a script that will help me save time and effort. When using Linux or Mac command line (bash?), if you want to rename all files in your present directory and replace all hyphens – with underscores _, run this command:

And […]

Read More

Android Development: Permission denied when running ./gradlew in Mac

I’m using a Mac at the moment to work on my Android app projects. For some reason I need to run ./gradlew in the terminal, but I was getting this error: -bash: ./gradlew: Permission denied To fix this, what I did was run the following commands:

After those commands, my Mac downloaded numerous files […]

Read More