How to show notification in android? - android

I have created an android application for a RSS reader it is working fine .Now i want to show a notification to the user at the time of receiving a new blog or feed
please any one help me how to do that
Thanks in advance

Check out the NotificationManager class.

Given answer is good only #Krishna wants to develop a notification. But in his scenario, he needs to tell the user, when they receives an updates. So while you are studying the given link, also remember you should have a mechanism to Broadcast when you receive a notification even when the user is not already open your application. As a hint: you have to provide some services and permissions in Manifest file.
This documentation page also explain very well with coding.

Related

i need to change topics in my app every day or every week automaticlly without the user updates the app

I have Christian Android App and there are 5 buttons in my app , I need to update the topics , news and Verses daily or weekly without let the user update the app , is there any way to do that ? I will be grateful if any one help me with tutorials , Please Guide Me THANKS
You can either prepare all possible buttons and choose which to display according to the current timestamp, or you need to build a web API that can provide you with the necessary data and is updatable independent from the app itself.
You must use webservice and SQL DB for this. If you want to add more information for user you just need to update your data base. And in each button tap you should call web api for getting the data.
For web service creation you can use retrofit.
Refer these links
http://www.vogella.com/tutorials/Retrofit/article.html
http://www.journaldev.com/13639/retrofit-android-example-tutorial
https://developer.android.com/training/basics/data-storage/databases.html
Perfect answer by Jacob you can also use cache along with the API call which expires after a specific period. So you don't have to force the user to go online every time he uses your app.
I would do this with notifications, you can have scripts that run weekly to change a topic... and on message receive you can update your topics based on the data coming from the "data-load" this is good because on top of that you can notify them "You have a new topic" or something like that.
There is a lot of resources to set up notifications, and if you are using android studio it is already built in.
https://firebase.google.com/docs/cloud-messaging/
Thanks all for helping me , i already solve my problem through Firebase Realtime Database Because of your posts , thanks again for your help
here is the tutorial https://www.youtube.com/watch?v=QETnC6SEwa0

Push notification integration in meteor

I am having two applications one is for admin and another is for users.I want to implement push notification in it so that when ever user rate the offer in application then Admin can get notification of it with user phone-number and rating count.I found one good example of push notification but unable to implement in my application as its storing data in local mongoDb not in main so that my other application do not get the stored value in order to hit push notification.I am stuck at this point. can any one provide me a simple approach/process to achieve my goal.I am really new to meteor and have not much knowledge about it.
To implement Push-Notification I am taking reference of :-
1) https://github.com/richsilv/meteor-cordova-notifications/
2) https://github.com/richsilv/cordova-notifications-demo
Any help will be greatly appreciated.
Thanks.
I highly recommend using Parse:
https://parse.com/docs
They make push notifications super easy, and for an affordable price.

Hide App Notifications in Android

I'm attempting to write an app that clears certain notifications based on Lollipops new profile features. I've read this: Android: remove notification from notification bar
But it doesn't give me the information I need. What I want to know is: theoretically, how would I get another apps notification ID from within mine? So if I wanted to get the ID for G+, how would I code that? Do I even have access without elevated permissions (device admin or root)?
Thanks.
Ive done something very similar with one of my apps.
https://play.google.com/store/apps/details?id=com.t3hh4xx0r.privatenotifications
You need access to the NotificationListener
https://developer.android.com/reference/android/service/notification/NotificationListenerService.html

How can I change the notification sound from parse.com?

I've searched a lot on google ,parse.com and stackoverflow.But I really did not find what I need exactly.
I use custom BroadcastReceiver for understand the notification came.
But the sound is default sound. Is it possible to change it on android? How can I do this?
(should I do this in parse.com api or can I do this without parse.com api)
thanks in advance
As you can see in the Parse docs, you need to recieve the notification using an Intent. You can see an example of an intent implementation here, under the "Creating Android Project", item 8.
Hope it helps.
Quote from the Parse Push Developer Guide:
"For example, to send a notification that would increases the badge number by 1 and plays a custom sound, you can do the following. Note that you can set these properties from your Android client, but they would only take effect in the iOS version of your app. The badge and sound fields would have no effects for Android recipients."

notify user when website has changed using c2dm in android

i want to make app that make a notification when breaking news has arrived to news website
during my search i found two ways to do that
1- using c2dm server & php & database
2- using timer that scan the website automaticly every time period i decide it
can any one help me by give me an example code for each method or a Tutorial for each method
I'm working on GCM as well. The first comment already told you the right way to solve your problem, but I wanna add something more is that This excellent tutorial
Read it, try to understand it. I think it is quite clear. Hope this help :)
C2DM is deprecated. You could use GCM instead. Go through this tutorial how to get started with it.
You can refer this too.

Categories

Resources