Jump to Navigation

Me on Twitter

  • @louistouzet et suspense = buzz ;-) Etant donnée l'heure de mon tweet, peu de chances.. 11 years 41 weeks ago
  • @ippontech plz... bon ou pas bon pour #devoxxfr ? 11 years 41 weeks ago
  • Jeu @IPPONTECH : le mot mystère est tatami 11 years 41 weeks ago
  • @apkudo it's chrome on ubuntu. I'll send a ss 11 years 41 weeks ago
  • @apkudo I've seen very good enhancements last days : still few visual bugs but you're on the good way ! 11 years 41 weeks ago
  • @humble bundle 5 with #android looks less attractive than 4 + bids are going fast = I'll probably leave this one... 11 years 41 weeks ago
  • @joenrv assisté à ta (super) prez hier : en voyant le nbre de tweets @falcon_android je comprends mieux le travail à fournir ;-) #GoodJob 11 years 41 weeks ago
  • @louistouzet le stock de #nexus4 est remis à flot ! 11 years 41 weeks ago
  • @CedN "@DidierGirard: AngularJS, ce n'est pas pour jouer : http://t.co/Joh6cofBKn" 11 years 42 weeks ago
  • I should have read this article last week. It looks amazing ! The Official #Ubuntu Tablet Videos http://t.co/yCQMfebrdb 11 years 42 weeks ago

switchdataswitch

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