:::: MENU ::::

Android: draw LatLngBounds on a GoogleMap object

Quick question: If you have a LatLngBounds variable how to transform it to a polygon and draw it on a Google Map view in your Android Application?

LatLngBounds store a rectangle by storing only 2 points from the rectangle the North East and South West, to build a new polygon you need the rest of the points.


public void onMapReady(GoogleMap googleMap) {
   // get the bounds, for this example I will get the visible region on the google map view
   LatLngBounds b = mapObj.getProjection().getVisibleRegion().latLngBounds;

   PolygonOptions po = new PolygonOptions();

   LatLng northwest = new LatLng(b.southwest.latitude, b.northeast.longitude);
   LatLng southeast = new LatLng(b.northeast.latitude, b.southwest.longitude);

   po.add(b.northeast, northwest);
   po.add(northwest, b.southwest);
   po.add(b.southwest, southeast);
   po.add(southeast, b.northeast);



Do you need a city code for each city in the world? Search no more …

I did used a lot the country code the 2 or 3 letters version in the apps and websites I had worked, and did not care about city codes until now.

After a short research I did found that you can have a similar list of city codes (not the phone prefix) for cities. There is IATA airport/city codes however this have unique codes for each cities that have a airport. (not completed). The list can be downloaded from official IATA page (not free)

And there is a UN-LOCODE named United Nations Code for Trade and Transport Locations maintained by the UN. This is a complete list of code for each cities available as a free download in CSV form from Github and Open Data

TV Series Collector, the android app

For so long I was needed a TV show manager and a episode tracker in one app and I was found some version but every one had something missing or the interface was so outdated.

So the next best thing was to write a app that is what I need. This was the birth of TV Series Collector for android smartphones.

If you wander what you can do with this app check next lines.

First I was needed a source for TV shows data and the app is implementing the TMDb database API. Is something like IMDB and give the possibility to everyone to update information for movies, TV Shows and even to add new shows and episodes.

TV Series Collector app, group downloaded shows in watch list, each movie included in this playlist can be tracked, episode to episode. Also airing shows display next airing date for new episodes available.

App implement a Google Drive export feature because every one of as change the device.

One privacy feature is that you do not need to make a account to use the app, internet is required just when you add a new TV show, tracking episodes can be done offline.

App is 0.99$, it will be added later a Light free version. If you want to try I can offer for the first 5 who comment this app a Promo Code.

Also If you have a blog and want to write a article about this app I will provide a set of 5+1 Promo codes in order to offer them to your readers.

Android app on Google Play

Handle Windows folders with space in terminal

This is a tricky issue for someone with is not used to work with a dos terminal in windows.

So for short if you have a path like C:\Program Files\Java\jre1.8.0_73 you have a space and from DOS terminal that space is a issue.

Next 3 examples will handle that space.

cd "C:\Program Files\Java\jre1.8.0_73"
cd C:\Program^ Files\Java\jre1.8.0_73

First on first line I added the path in “”, on the second line I did escaped the space but not with a \ like you are used in linux enviroments but with a ^

Android issue: INSTALL_FAILED_UID_CHANGED fixed without root or device factory reset

If you are here you probably had the issue from the title the error INSTALL_FAILED_UID_CHANGED when you want to install for debug the app from Eclipse or Android Studio.

I had this issue yesterday and after hours of browsing the stackoverflow and groups and forums I found 3 methods to fix this.

1. if you test on an emulator then you just have to Clear/Wipe the AVD to defaults or create a new one.

2. you are on a real device. If you have root access to the device just go to folder


and delete it. You should ok now.

3. Device with no ROOT Access. On internet there is just one single method to factory reset the device. If this is acceptable for you this is easy.

None of this methods was OK for me. I was testing on a real device with NO-ROOT but I did not want to factory reset it. Continue Reading

Mobile AppWidget for WordPress a new way to promote mobile apps on your blog

Mobile AppWidget is a wordpress widget witch let any blogger which use wordpress framework to display in the sidebar one simple widget where mobile apps can be promoted.

Mobile app widget sidebar previewOn the left you can see a screenshot of how this plugin will display the Ad for a mobile app.

In this case an Android app is showed, however if the app is made for iOS or Windows Phone  or if it has versions for all mobile platforms links for them are displayed. Continue Reading

How to detect left mouse click and right mouse click with jQuery

If you want to implement a javascript interface probably you will get to a point where you have to know witch button was pressed. The next code will detect correctly for IE, Firefox, Chrome, Opera and Safari.

/* this will append click detection to whole document
 * if you want to add this feature just on one area
 * just change the selector for the jQuery
jQuery(document).click(function(event) {
   if (jQuery.browser.msie){
      if (event.which < 2){
         alert('Left button');
   switch (event.which) {
      case 1:
         alert('Left button');
      case 2:
         alert('Middle button');
      case 3:
         alert('Right button');


Continue Reading