Local Notification in ionic framework - android

I am developing an android music app in ionic framework like gaana.com or saavn.
If any song is playing then one notification should appear (shown in image) with image, buttons or song details. So my problem is, I don't have any idea how to bring it.
Shall I need to use Cordova local Notification plugin? If I use this then how could I add buttons and button events? And one large image? I followed their docs but I didn't get anything to add buttons. (Or am I missing something?)
If cordova local notification is not the solution the what should I use?
I want to add this feature like: user can't close the notification. If song get stopped then only notification gets automatically closed. is that possible ?
May be the question is very very silly.. But I stucked.

Related

Cordova hide screen from recent activity list on Android

Is there a way in Cordova to clear the screen before the app goes into the recent activity list on Android?
I'm making a game where I don't want the user to be able to see the playfield during a pause. So I need to switch visuals or something before the app ends up in the recent activity list.
At the moment I'm listening for the 'pause' event from Cordova, but even if I render the canvas once more at this point (or even remove it entirely) this new state won't show on the recent app list and instead still shows the previous frame.
I've seen some banking apps have this behavior so it should be possible somehow.
PS: I'm using PIXI as framework but I assume that's of no concern here.
I finally found the solution via this blog post: https://medium.com/#lakshaydulani/hybrid-app-horror-hiding-the-screenshot-in-app-switcher-82c318a350bf
Apparently there is a Cordova plugin that does exactly what I need: https://github.com/devgeeks/PrivacyScreenPlugin
Just install and compile the app.. Sweet!

Android "Widget" in Notification Bar (native or cordova)

We try to create an app and would like to show some information for app on notification bar. I don't know how this is called on android, but some other apps have some widgets in the bar like this
I don't know how this is done and how this is called. We can not close the notification and it is still present there.
At the end we try to do this with a cordova app, but if we know how this is done native by android we can google for it and check if there is always a cordova plugin or if we have to implement this by our own.

MusicPlayer in Android status bar

I have an Android app which plays mp3 files. I have programmed its main functions like play/pause forward, backward buttons, manipulating by SeekBar, getting current position and so on. Now I want to make my app to continue playing even I closed my app. And when I close it, I want to appear thing like widget in status bar with basic actions (displaying app icon, track name, play/pause button). And also, I want to SeekBar work properly when I reopen my app. Can anyone help me. I'm beginner in Android Java, so it would be perfect if your answer contains steps. Thanks beforehand
I think this tutorial perfectly match your query
Android custom notification for music player Example
It think you need to read this articles:
1) https://developer.android.com/guide/components/services.html?hl=ru - this articles can help you to play music on background. It's very important component of youar app;
2) If you want to provide a widget - just see this article https://developer.android.com/guide/topics/appwidgets/index.html?hl=ru
3) If you want to show notification in status bar, see - https://developer.android.com/guide/topics/ui/notifiers/notifications.html
Also, you can find many iteresting solutions and lessons here - http://startandroid.ru/ru/uroki/vse-uroki-spiskom/164-urok-99-service-uvedomlenija-notifications.html
https://developer.android.com/training/managing-audio/index.html?hl=ru - an interesting article about music players by Google Android Developers
Best regards,
Skidan Oleg

Android identifying what is on the upper part of the android notification bar

Currently I want to make an app but I don't know what this is called , I mean the android term for it, it's definately not a spinner, but more into the notifications.
I want to make an app that I can interact with just like the music bar here that can play music, stop next song , etc.
Can someone help me or tell me what that method is and where can I get some tutorials for it?
It doesn't seem to be an ongoing notification. (It's not being under the Ongoing tag being the clue, otherwise I could be sure that this was the case)
http://developer.android.com/reference/android/app/Notification.Builder.html#setOngoing%28boolean%29
It is probably a custom remote view
http://developer.android.com/reference/android/widget/RemoteViews.html
A quick google search will give you examples.

Downloads, Shown in notification bar?

As far as I know we can create notifications in Android using Notification Manager + remote Views.
I am Creating a notification for downloading Mp3 files. And I want an animations beside It. So far I have learned from forums that it is not possible.
However I saw A video for an android App which downloads and displays animation beside it while downloading it. Link: http://www.youtube.com/watch?v=yNcs-sS2nFU&feature=related
Moreover its the same animation used by the browser. How can they do it?
If any one suggests using level drawable for me, Please also suggest still I have to send a whole remote View to the notification manager with the same Notification ID. It will override it. That gives a animation like thing if I do it again and again. Is there no way to update remoteviews without sending the changed remoteviews to Notification manager.
WHY, I dont want the above mentioned animation effect?
Because It hangs the android. If the updates are sent more faster then 2000ms.
This question is also asked elsewhere at stackoverflow but never been answered.
The answer to all our problems,
http://developer.android.com/reference/android/app/DownloadManager.html
There is a built in download manager in android.
My guess is that particular animation you are seeing (the downward moving arrow) is provided by the system. I don't think you will be able to place your own custom animation in a standard notification.

Categories

Resources