Ruby on Rails & Android
Posts tagged Android
[Android] Got always altitude 0.0 longitude 0.0 altitude 10.0 on DDMS
Jul 6th
I had a really disturbing issue with my first use of the GPS of Android with DDMS.
Always got Latitude 0.0, longitude 0.0, altitude 10.0, when sending coordinates with the Location Controls tool.
To correct this bug (coming from the locals of your machine, simply add this line to your eclipse.ini file :
-Duser.language=en
Enjoy
[Android] Timeout executing service
May 24th
Annoying, right ?
When I was binding my Activity to a Service with a ServiceConnection, I did this, and always got this error:
bindService(new Intent(this, PlayerService.class), this.psc, Context.BIND_AUTO_CREATE); |
To resolve that, I asked for more debug :
bindService(new Intent(this, PlayerService.class), this.psc, Context.BIND_DEBUG_UNBIND); |
Then this error disappeared !
Seriously, what happened ? I have no idea, but I’m happy my application doesn’t crash anymore after the user just closed it…
[Android] Block application orientation
Dec 19th
In my application, I set an AbsoluteLayout to put buttons on an exact positions.
But when I rotated the emulator (CTRL+F11), the layout was all broken.
So here’s how to block the application on the “Portrait” layout:
[Android] Add a modal dialog
Dec 18th
Here is the code to add something like in this image : a dialog (pop-up) with buttons in Android.
Normally, the user may come back to your application with the “back” button. I wanted it to be a dead-end dialog. My aim was to close the application if there is no Internet connexion at all.
