Xamarin.Forms Notification Service for Android - c#

I'm relatively new to Android app development and Xamarin.Forms development in general, so I'm looking for an advice on what is the best way to implement the following:
When active, my app downloads data using a simple REST appi service (I'm using a HttpClient for this). Now what I want is when the app is closed, to still check if some data is changed on the server, using the same method as it was used when the app is running, and if so, to fire up the notification to the user.
I've been reading about the services, and that seems like a solution to my problems, but what I need to know is: what kind of service is most suitable for this task? Is it a Bound service, Intent service or Started service? Or is there a way to achieve this without the use of the service?

azure notification hubs sends to apple and google play

Related

Real time notifications for chatting applications

I am creating chatting web app. I implemented realtime functionality and typing indicator using pusher, but m unable to apply real time notification functionality.
please tell me how I can do that.
and is there any way to use bootstrap tickers for notifications ?
If you creating just simple web app, I advise to you to read about SignalR in ASP.NET. It is easy to use, and simple to control.
Also you can check out this url:The Simplest Thing Possible: Creating Push Notifications with SignalR
By the way, here the best example to create chat application using Pusher: Web PUSH Notifications быстро и просто ...but in Russian language))

Create Push notifications for Xamarin.Android without using FCM

I'm creating a xamarin.forms application and have got most of the app completed. My only hickup is push notifications. I'm sending my notifications to the app using SignalR and a .Net Web API Server. I'm able to receive notifications while the app is running however, I can't see tutorials for push notifications while the app is asleep. I've checked out services as well. Thank you for you help in advance.
SignalR is not a push notification and there is a difference between them.The main difference is that in case of SignalR you have to keep an opened connection to your hub in order to receive events / signals. So if you want to receive notifications while the app is killed or in background SignalR is a wrong solution since it is technically impossible to keep your application always running on a mobile device. However, push notification can awake your application when it is killed or in background.
I would suggest to rethink your current solution instead of looking for hacks.

What is the best way of communicating from web->web api->console app and back again?

I'm starting up a little code project to learn from the process, but I am not sure what's the best way of communicating between the different parts.
First, I have a pure html/js client where the users need to get live updates frequently.
Secondly, I'm considering having a web api application running to provide data.
Thirdly I have a console application running, that needs to communicate with the web api application.
So I'm thinking about using WebSockets all the way from client->web api->console app, but I have trouble making it work. I can make the console app work as a server, but I can't figure out how to make the web api work as a client, so that when it spins up, creates a connection to the console app, and keeps it open for communication, while it delivers data to the clients upon requests.
I tried with different implementations and I have ended up with SignalR, as it seems like that's what people use today :)
Since I have all these problems getting a connection I am wondering if there are better ways of sending data that fulfills my requirements?
If WebSocket (using SignalR) is the way to go, can you provide some links with working examples? I have tried all the top links from Google with no success ^^
Thanks in advance
Your WebAPI project can act as WebSocket server as well. Check this link that uses an IHttpHandler, but you can also do it in a WebAIP's controller how is explained here : Using WebSockets with ASP.NET Web API
The console application should connect as client, using for example ClientWebSocket class.
WebSockets are persistent full duplex connections, so once the client is connected both ends can push information to the other end.

Windows Phone App Background HTTP Connectivity

I am working on developing a non-VoIP Windows Phone application that needs to have a background HTTP connection to be notified when new messages are received. I noticed for Windows Store apps, there is an example for ControlChannelTrigger that allows you to connect an HttpRequestMessage and will send a push notification to the app when data is returned by the http request.
Is there a similar concept that I can use for Windows Phone, because just using a Periodic Task really isn't good enough.
You cannot do that with Windows Phone. Once your app is not on the foreground anymore, there is no way for it to maintain a connection.
You should instead look into push notifications implementation here.
There was a trick where you could use a background audio agent to maintain the connection but I don't think it's still doable. And is considered a very bad practice from both a developer and a user points of view.
So you should just go with the standard push notification thing linked above.

How to create and use my own url(svc) for push notification in windows phone7?

Hi iam new to windows phone push notification services.
My problem is
i should write a wcf service
By using this wcf service url i need to push the notification using one web application
and finally on windows phone i need to show all the notifications posted to that svc url.
please help me
I just implemented something like you want to achieve by reading and implementing this tutorial http://create.msdn.com/en-US/education/quickstarts/push_notifications, however in this example it only implements a service that sends push notifications, toasts and tile updates to be clear, to everyone that is subscribed, I modified it to send to the users I want...
I hope you find it useful :)
It also shows the implementation on Azure and on WP7...

Categories