Android Display a notification into the statusbar without an expandable view -


i need something. try display notification android statusbar.

it inform user synchronization server in progress.

now, use code , works fine :

    notificationcompat.builder builder = new notificationcompat.builder(this)             .setsmallicon(android.r.drawable.stat_notify_sync).setwhen(system.currenttimemillis())             .setautocancel(false).setongoing(true);      notificationmanager nm = (notificationmanager) this.getsystemservice(context.notification_service);     notification notif = builder.getnotification();     nm.notify(1, notif); 

the 1 problem view created when user expand statusbar. want display small icon on top of status bar, without contentview.

anyone know how ? in advance!

this not possible.

the rationale this: if user looks @ status bar , sees icon, should have way of figuring out icon means. therefore there must row in notification panel corresponding each icon.

i suggest creating notification explains, have done in question, synchronization in progress; great opportunity indicate app syncing (so if there's kind of problem or sync taking forever user knows app needs attention).


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -