Jump to Navigation

Me on Twitter

  • https://t.co/hZ2dClP1fG #bitcoin 8 years 16 weeks ago
  • You can get all #RFC specs as ebooks at https://t.co/iP89IltzxW : i-d.httpbis is for HTTP including #HTTP2 #VeryHandyOnMobile 8 years 18 weeks ago
  • How is NSA breaking so much crypto? https://t.co/0fObkAsMEK 8 years 29 weeks ago
  • @parisweb 2015 c'est fini... Je recommande fortement si vous voulez suivre ou confronter les technos du web ! 8 years 31 weeks ago
  • De la pres de @nitot "There is no cloud. Just someone else's computer" #jadore 8 years 31 weeks ago
  • @Nico3333fr Super pres j'ai appris quelque-chose ce matin ! Des pensées / docs sur CSP pour contrer les extensions navigateurs de pub/spam ? 8 years 31 weeks ago
  • Et de déranger tt le monde car les conf sont légèrement décalées ;-) Bref le wifi est donc "anémique"... https://t.co/q0v9nFRnYo 8 years 31 weeks ago
  • RT @ParisWeb: @nic0b0 ce n’est pas particulièrement une bonne idée d’encombrer un wifi anémique quand on est sur place. Il suffit d’aller d… 8 years 31 weeks ago
  • @parisweb le streaming stream.pw ne marche pas sur le wifi fourni au Beffroi... 8 years 31 weeks ago
  • Got it ! https://t.co/RercFTIlll http://t.co/ns7H3WUhkh 8 years 33 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