Jump to Navigation

Me on Twitter

  • #GooglePlay policy has changed "Ads must not simulate or impersonate system notifications or warnings." Cool ! http://t.co/Pyp1RgSk 11 years 40 weeks ago
  • IOS leads over Android as far as which 1 will win in enterprise marketplace - according to Appcelerator's may report http://t.co/zytDfOEF 11 years 40 weeks ago
  • Cannot simply ignore a file that's already in SVN control. Never bothered looking why. Old tool SVN... http://t.co/dkKO3eiP 11 years 40 weeks ago
  • "Good grammar is credibility, especially on the internet. [...] They are a projection of you in your physical absence." http://t.co/mJv0dUtb 11 years 40 weeks ago
  • @TheBrousse ok. Chapeau bas ! Cc @CedN 11 years 40 weeks ago
  • @TheBrousse au fait on peut savoir ce que fera cette appli ? cc @CedN 11 years 40 weeks ago
  • Tonight's @ParisAndroidUG : apps gain permissions of other apps in the same process 11 years 40 weeks ago
  • @TheBrousse ok. Bon a savoir ! 11 years 40 weeks ago
  • @TheBrousse bien dormi ? :-) c'est fait avec les api android ou titanium ? 11 years 41 weeks ago
  • #AddThis widget in #Firefox3D : #Google+ has a bigger one ;-) http://t.co/3eISv0rv 11 years 41 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