Blog of a developer
Ruby on Rails & Android
Ruby on Rails & Android
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
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…
Apr 20th
What ? A ruby developer using php as a blog ? Are you kidding ?!?
No, I’m not.
First, I used PHP before falling in love with Ruby. Secondly, I’m just a simple user. Users don’t care about technologies, only about solutions, and this one works fine for me !
So I merged my “portfolio” and my previous blog, to one central place.
Hurray for the new site ! Hurray !
Jan 3rd
Hi,
By default, ruby 1.8.7 came with my mac. But I could not update rubygems, I just got this error:
Updating installed gems Updating RedCloth WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/agherschon/.gem/ruby/1.8/bin in your PATH, gem executables will not run. Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb update mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h Gem files will remain installed in /Users/agherschon/.gem/ruby/1.8/gems/RedCloth-4.2.2 for inspection. Results logged to /Users/agherschon/.gem/ruby/1.8/gems/RedCloth-4.2.2/ext/redcloth_scan/gem_make.out |
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:
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.
Dec 16th
How to compare two passwords, one encrypted with the MySQL ENCRYPT function, when the other one is clear ?
Here’s how to compare: