Jump to Navigation

Me on Twitter

  • RT @jeanhelou: Je suis développeur freelance et je peux vous aider à faire une appli qui fonctionne même le 1er du mois @TCL_SYTRAL https:… 6 years 31 weeks ago
  • Il faut que j'essaye ça ! RT @Numerama: 6 years 31 weeks ago
  • RT @vogella: If I get this right, #javaee soon called Eclipse Enterprise for Java (EE4J) https://t.co/X1L6jADcng 6 years 31 weeks ago
  • "How standards proliferate" - probably old but makes me laugh since it's #sotrue https://t.co/6ygxIBf7Lh #xkcd 6 years 35 weeks ago
  • RT @Numerama: Enquête : comment les apps Figaro, L'Équipe ou Closer participent au pistage de 10 millions de Français - https://t.co/GBcnT0… 6 years 37 weeks ago
  • When industry meets open source... https://t.co/uJbhJhZFyK Subscribe here https://t.co/NAOLqb4AL9 6 years 37 weeks ago
  • @Fyrd Do you know of a tool to list features used on a given website in order to obtain the minimum browsers requirements to make it work ? 7 years 4 weeks ago
  • Quelqu'un aurait une place disponible pour #devoxx pour un collègue ? 7 years 11 weeks ago
  • Favorite tool of the day : https://t.co/1wGUhgh5rc @AtomEditor It also displays @PlantUML diagrams ! 7 years 19 weeks ago
  • With typeset you can do weird things like : myvar=hello echo $myvar # prints 'HELLO' in caps https://t.co/bLNDQrmokn 7 years 22 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