Jump to Navigation

Me on Twitter

  • Looks huge ! #JavaEE8 http://t.co/NffP1OypY0 9 years 29 weeks ago
  • Sometimes #Python has #batteriesincluded sometimes not : see os.makedirs() http://t.co/lffkJy59Rn 9 years 31 weeks ago
  • @espylaub 1 year old already but very clear description of one big mobile software issue today. http://t.co/7q0I4wIRok 9 years 31 weeks ago
  • #ux #antipattern asking for a confirmation to exit the app when the user has already clicked twice or more just to find the button ! 9 years 33 weeks ago
  • UX designers: Side drawer navigation could be costing you half your user engagement http://t.co/o3YkClSmIW 9 years 47 weeks ago
  • CSS fans : The Future of Responsive Digital Layout http://t.co/zkAmlqV9zD 9 years 47 weeks ago
  • new SimpleDateFormat("yyyy-MM-dd kk:mm:ss").format(new Date()).replace(" 24", " 00"); Sorry but... #WTF!!!?? Can you just read the docs ? 10 years 1 week ago
  • #Argh ! http://t.co/oQ1MtqHWS7 10 years 7 weeks ago
  • @ubuntu #fail Typing "garmin" to get a GPS plugin in Software Center just finds crap when Synaptic got it right at first try 10 years 7 weeks ago
  • @SpiderOak what's going on with your website ? http://t.co/vS0p3UpsA8 10 years 8 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