Jump to Navigation

Me on Twitter

  • RT @AskJamesApp: Merci à tous!! Trop fier de notre second prix! #BMAopentourisme #75 12 years 3 weeks ago
  • RT @Etalab: Prix Bouches du Rhône Tourisme : 1. #Groovons @papou31 2. #AskJames 3. @TerroirCaisse #BMAOpenTourisme http://t.co/DrqPqyVN 12 years 3 weeks ago
  • Ary, than et @louistouzet ont terminé la préz de #AskJamesApp ... Relax now! 12 years 3 weeks ago
  • RT @AskJamesApp: Il parait que nos tweets sont retransmis en direct, alors retweetez #BMAopentourisme #75 12 years 3 weeks ago
  • @AskJamesApp et le twitter de notre projet ! 12 years 3 weeks ago
  • Après une nuit blanche, dur de suivre le speech de martin görner #bmaopentourisme http://t.co/p918JqOG 12 years 3 weeks ago
  • Début du week-end #bmaopentourisme la télé est là ! http://t.co/rjrCeYG3 12 years 3 weeks ago
  • RT @spencerchen: PhoneGap built mobile apps are being rejected by Apple for not being 'native enough': http://t.co/q7Rcbfhc 12 years 4 weeks ago
  • Using 3rd party modules sometimes occurs problems with deprecated APIs http://t.co/KvBLvjg9 Anyway Twitter for #Drupal helps me a lot 12 years 5 weeks ago
  • @louistouzet @CedN on verra sur place... 12 years 5 weeks ago

Notification API

android Tweaking Android Notifications

For SwitchDataSwitch, I wanted to provide users with a 1-click solution to enable and disable data traffic (2G/3G/...).
I chose the notification bar since it is a very accessible place, visible almost all the time and that can be expanded without stopping the running activity :

Expanding the notification bar 
The notification bar is usually presented in its reduced form (here the dark bar at the top of the screen with the smallest icons) but can be expanded by sliding it downwards.

Unfortunately, Android's Notification API is really made for instant notifications, not persistent ones, and that implies several inconveniences :

  • when creating a notification, the developer has to put an icon in the reduced notification bar, taking some precious space
  • by default an 'event timestamp' is shown next to the expanded content of the notification, which means nothing for a permanent service
  • there is no programmatic way to know if a notification is currently displayed or not

This article describes a way to create a notification that :

  • doesn't show up in the reduced notification bar
  • doesn't have a timestamp in the expanded notification bar
...
Syndicate content