2

my problem seems be without (smart) solution... please help

I'm working on app that update a persistent notification with temp and weather description.

The problem is that I want show current temp in notification bar but

mNotification = new Notification.Builder(ctx)
    .setTicker(number);

this code show but with auto-hide, the only value data still persist in bar it's smallIcon.

The problem is that setSmallIcon() want a resource (int) to work, this is carzy, there are other options?

I don't want put inside app 100 or more little images with number, it's no sense...

Thank you

Ivan
  • 978
  • 6
  • 13

1 Answers1

3

No it is not possible according to the current android notification design principle. You are only allowed to add text in the notification area/status bar.

BeingMIAkashs
  • 1,375
  • 11
  • 18
  • Ok, I think that there aren't any option to fix text in title bar? (by default text desapear after few ms) – Ivan Jan 09 '15 at 20:54
  • Ok, I know, by .setOngoing(true) but I can make permanent ticker too? – Ivan Jan 10 '15 at 15:55
  • This is useless, I did read it, the point isn't make permanent notification (that I did) but show info in title bar (in this case temp). I make some icon to test with a switch based on number but are too small – Ivan Jan 10 '15 at 17:44