Status Bar sensitive information like Telegram X - android

I`m digging for many days and didn't found the information about this functionality that presents in Telegram X (newest version which the source code isn't opened yet, running on nexus 5x api 27 emulator)
When application is in "waiting for network" , this information appears inside your translucid status bar, like this gif.
My questions is, how could I achieve this?
Sounds like they are using some kind of context to hide content inside status bar (look at notification icons and mobile network icons, they hide when the msg slide from top)

I found a third party library who can help you to archieve your question.
Check this repo https://github.com/fede87/StatusBarAlert
What is this?
This is a small library inspired by Telegram X status bar new alert, written in Kotlin. It shows custom message with optional indeterminate progress in status bar area.

Related

Notification Bar inside an app

I have something in mind that i would like to integrate into my android app and I dont know where to start researching.
I want to create a notification bar just as androids in my app, and hold an activity in it( eg. a menu ) and for it to dropdown when the user pulls it down just like android.
I didnt know what to exactly research about, i tried notification bar in android app but to no success as all the links go to customizing your android notification bar.
Thank you for your time.

Cordova Statusbar / Notifications

I'm sorry for asking something probably this basic, but since I've never programmed for native android or iOS, only with cordova, I don't even know how to search for this.
How can I add an icon to Android and iOS status bar? And when the status bar is open, how to add a line that once clicked leads to my app?
EDIT: Actually, it looks like "notification bar" is the name I'm looking for

Android: Replace Notification Bar

currently I'm working on an UI Replacement of Android, currently achived by writing a different launcher and different-styled apps. All's good so far, BUT: there is still the notification bar missing, means, I have no idea how to replace the notification bar.
The "new" notification bar shall show only generic informations like the clock and network state, similar to windows phone and ios, without NotificationManager-binding.
How can I achive this? I know that there are several notification bar replacement apps out there, like omega statusbar or statusbar+.
My idea was to make every app of my UI fullscreen and having its own NotificationBar-Instance, fed by a ContentProvider or Service. But if the user decides to use classic android apps, he also will see the generic notification bar, which isn't what I want.
Also it might be an idea to create a window on top the notification bar, but I have no clue either this is "the right way", nor if it is even possible to achive this in this way.

What/Where is the android ActionBar?

I've never really handled an android device before. I've read most of the discussion on here :
http://developer.android.com/guide/topics/ui/actionbar.html#ActionItems
From what I gather if I'm using a Holo theme and that my target is at least API level 11 I should have an action bar within my app.
How exactly do I open it up with the keyboard? My emulator has a custom size(8" tablet) and I don't know how to see the action bar :
As you see on the screen I have no idea where this bar is supposed to be at.
Its that bar at the top with the app title in it!
As most of us android developer - I assume - still want to support Froyo, many of us use
actionbarsherlock.com
which brings Action Bar down to API 2.x
- from my experience with it so far it is an awesome lib.
Just a hint for the case you start liking the Action Bar ...

Dynamic notification icons (large) in Android, targeting 2.2

This question has been asked before, but has not been properly answered yet. I know this is possible but we're feeling a little confused.
We need to display custom/dynamic images in the status bar when push notifications are received. We're concerned with the larger image seen in the pull-down, not the small image in the actual status bar. Because they need to be dynamic, the images can not be packaged with the apk and we are trying to target Android 2.2
What we're trying to achieve is similar to how Facebook displays the profile image of the user who initiated the notification in the notification bar. It's also similar to how whatsApp shows the group image in the notification bar when a new push notification arrives.
From what we've read, this is possible only in Android 3+, sdk 11. But that can't be true.
We've installed both Facebook and WhatsApp on an Android phone running 2.3.4 and sure enough, custom icons display in the notification bar.
So what's the secret? How do they do it? How can we do it?
so what you are trying to do is set the setLargeIcon(Bitmap icon) in the notification builder. This is available in APi 11 and above (honeycomb). The notification builder in the compatibility package v9 can set it for you, but it will only appear on api 11 and above.
To achieve the same effect in 2.3 and below you must create a custom notification layout and set it with setContent(RemoteViews views) in Notification.Builder to generate a custom layout. This can be styled with a large icon on the left side to imitate the > API 11 styles.
Creating custom layouts is tricky and many things have to be taken into account, such as available screen size on other devices to display the notification, and themed text colors (especially as notifications used to be dark text on white bg, now they are light text on dark bg) There plenty of guides and even SO posts that can help you out (such as this one)
In regards to getting a dynamic image, when the phone receives the message (push notification or whatever) and your app goes to build the notification, you can do a small http request to pull a dynamic image before building the notification. This will delay the posting a few seconds, but it doesn't really matter. Then you can get the resulting image and use it in the notification. The specific image can be chosen by sending some data with the (im assuming push notification) that identifies what photo, such as a url, or an id that you can append onto an already existing url in your notification building part of the app.
Hope this helps, any followups just ask :)
You can't use anything but prepackaged drawables as your notification icon as seen on status bar. And no, you did not see anything like you look for in FB app (or you talk about notification area seen when you pull it down).

Categories

Resources