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 […]
Author: Catzie
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:
|
1 2 3 4 |
@Override public void onMapReady(GoogleMap googleMap) { Location location = googleMap.getMyLocation(); } |
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() […]
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:
|
1 |
for f in *-*; do mv "$f" "${f//-/_}"; done |
And […]
This place will never be the same again
When I first came to that place, that “existence” was there. It was at first an annoyance to me and made my blood boil quite a few times, even after moving to this new place. Occasionally this existence would speak of wise words such as “Be the better person.” Now, that existence is gone. But […]
Android Studio: add Google Map from empty activity (dev note)
//Update: I prepared a simple Android app that features a Google Map with markers that form clusters together when zoomed out. Check it out: Simple Android Map Clustering on GitHub. This “dev note” of mine will give you a rough idea on how to add a Google Map to your Android up from an empty […]
Laravel update from v.5.0.35 to v.5.2.32 hiccups and solutions
I tried to update Laravel 5 today and here were the steps I had to take. First checked my Laravel version before the update:
|
1 2 |
$ php artisan --version Laravel Framework version 5.0.35 |
Edited composer.json in my laravel’s root folder like such:
|
1 2 3 |
"require": { "laravel/framework": "5.2.*" } |
Run this on command line:
|
1 |
composer update |
You might need to delete root folder’s composer.lock file before the update can actually […]
Laravel 5: Create controller under new folder and routing
So here I am on a Sunday, trying to make progress with a personal Laravel 5 site I need to work on. As I bear with the noise outside in the street (some crazy neighbors set up a swimming pool IN THE STREET! :oops:), I’m trying to figure out how too create a new Laravel […]
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:
|
1 2 |
Mac-mini:projname moi$ chmod +x gradlew Mac-mini:projname moi$ ./gradlew |
After those commands, my Mac downloaded numerous files […]
Android Studio and the 64K methods limit (DEX error)
Hi! I’ll share a few tips with you on how to find out the number of methods that your Android app has. I’m gonna show you a few tools such as APK file methods counter, and an Android plugin that will show you the number of methods each imported class or dependency has. These will […]
Oishinbo lunch at Little Tokyo, Makati
So I’m gonna write a really quick post about our meal at Oishinbo, a Japanese restaurant in Little Tokyo, Makati. I’m just passing time as my Android Studio is running its Gradle build. ^o^;; My workstation is a bit too slow for the job. We went there for our last lunch with an office friend […]