Jump to Navigation

Me on Twitter

  • RT @codinghorror: Don't forget to have an extra special scary programmer halloween.. by doing the SCARIEST THING IMAGINABLE... looking at y… 6 years 8 weeks ago
  • @instapaper @Pocket @wallabagapp I'm now using a personal instance of #wallabag and it really does the job ! 6 years 8 weeks ago
  • @instapaper @Pocket @wallabagapp I'm now using a personal instance of #wallabag and it really does the job ! 6 years 9 weeks ago
  • RT @gavinsblog: Spot the robot dog dancing to UpTown Funk is simultaneously both terrifying and hilarious. https://t.co/UNPsXZrXvh 6 years 9 weeks ago
  • Almost full screen cookie warning... On the cookie policy page ! The Internet is going crazy... #GDPR https://t.co/n3RtuNYJC8 6 years 9 weeks ago
  • @TwidereProject I hope not. Twidere is the best Twitter client around. I've tried many before, including Twitter's… https://t.co/XZWJNwqk1U 6 years 10 weeks ago
  • Not being aware of an exploit doesn't mean there wasn't... New Bluetooth Hack Affects Millions of Devices from Maj… https://t.co/Prjj3VMCnV 6 years 10 weeks ago
  • @_FranceConnect_ A est-il prévu pour fournir l'équivalent d'un justificatif de domicile à toute société le demandant ? 6 years 13 weeks ago
  • @GroupeLaPoste Bravo pour https://t.co/cBOQQDdlVq Le facteur est venu vérifier mon identité en 24h et mon identité… https://t.co/xixwTwxsCF 6 years 13 weeks ago
  • Soooo true.... https://t.co/vhEsNGV0uQ 6 years 14 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