Ruby on Rails & Android
Posts tagged Java
[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] 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.
