push notifications in Xamarin - xamarin

Current Working implementation : We have implemented notification through custom code in Xamarin.Forms as below:
On Resume of the application, we check certain conditions through Web API (Web API checks a flag in the SQL Server Database). If the conditions are met, We Open a display alert which is our notification.This is more of a polling Approach to the backend.
Rather than above, We want a Push notification from the backend to the Xamarin.Forms/Android/IOS whichever works.
Note : We are not using Azure anywhere, Both our WEB API and Backend host(SQL SERVER Database) are on premise.

I have used this approach in other projects:
Android GCM:
https://developer.xamarin.com/guides/android/application_fundamentals/notifications/remote-notifications-with-gcm/
iOS:
https://developer.xamarin.com/guides/ios/application_fundamentals/notifications/remote_notifications_in_ios/
I have followed those guides and they have worked before, hope this helps.

Related

How to use Google analytics in a Xamarin project?

I would like to use Google Analytics in my Xamarin project, but I always find articles showing how to use it with Firebase. Is that the only possibility? Can I use just Goggle Analytics without Firebase, as I use for example in my Angular project?
While the link to the repo google-analytics-dotnet-sdk created by me supplied by another another answer to this question.
Will work if you are using Universal analytics. It will not send hits to GA4. I have been working on a version for Ga4 but set aside while i wait for the Measurement protocol for Ga4 to be completed.
Currently the measurement protocol for GA4 does not allow for recreating hits similar to what is sent by the standard google analytics sdks for web and mobile.
Which means that you cant exactly recreate the same events.
Measurement Protocol (Google Analytics 4) I guess what I am saying is that if your goal is to recreate similar hits as firebase sends then your not going to be able to. We need to wait for them to open up for more of the Measurement protocol.
This is the current status of it.
GoogleAnalytics.Ga4-Dotnet.Sdk - Beta

How to use AppCenter Analytics on .net Core WebApi backend?

I'm able to send events to appcenter.ms from my XamarinForms App . However, sending the events requires the app secret key to be added to the android/ios app itself. This key can be easily extracted using a decompiler.
On my webapi backend, like the Xamarin app, I tried adding the nuget package and then in Startup.cs
AppCenter.Start("SECTETKEYHERE", typeof(Analytics));
And then tracking the event this way
Analytics.TrackEvent("MyTestEvent",new Dictionary<string, string>{{"EventNameHere","EventValueHere"}});
However, no event data ever arrives in the appcenter dashboard.
So my question is , how do I use the trackevent functionality on the serverside, or , at the very least, store the key on the app side securely(I'd really rather not do this).
My fallback plan is to use google analytics as it works fine .
Thanks

Sending web push notifications from Laravel

I have a website running Laravel in the back-end, where users can create reports for other users.
When the report is created I would like to send a push notification to recipient user's desktop.
Do I need to use services like Pusher, OneSignal?
Any useful site with examples would be appreciated.
Your question
You could use Pusher, Redis/Socket.io, Pubnub, etc. Which one to use? well, this is more an opinion-based question.
These services broadcast events, then in your client apps (like your web front-end) you configure the client-side libraries of the service you choose to subscribe (to channels) and listen to those events. The documentation explains it better.
Examples/tutorials
Pusher
This is a tutorial published by the Pusher team.
Redis/Socket.io
This one
is a Laracasts series about this.
Just google.
Update
There is a Laravel-specific alternative, a package created exclusively for Laravel:
Laravel WebSockets
This is the post talking about the package and its inner working.
This is the repo.
Here you have the documentation.
If you like to show Native Desktop notification then i would suggest Web Push notification. In this way once user subscribed to push notification ,they will get real time notification and does not need to be on your website.
https://github.com/laravel-notification-channels/webpush

Integrate Parse.com from Website

I have to prepare a web Admin for the mobile apps that have iPhone and android versions. I don't know how to send the push notifications to specific users or to all users from my ASP.net web Admin.
Take a look at the rest API.
Pratically you have to perform a POST (using maybe RestSharp) passing your app id\key and the content of the push.

How to make Office Web App Server able to edit a document with Cobalt

I am trying to build my own WOPI host using ASP.NET MVC and its WebAPI functions according to this example
https://code.msdn.microsoft.com/office/Building-an-Office-Web-f98650d6
I successfully used that example to connect to my Office Web App Server and I can use that to access files of Excel and PowerPoint in local path and I am able to edit it, but I cannot use it to open word document in editing mode as the Post action handler isn't implemented completely without any response so that it cannot handle any edit request.
In order to add support for editing of Office document, I tried this example with POST request handler based on Cobalt library extracted from Office Web App Server.
https://github.com/marx-yu/WopiHost
With this example I managed to edit ans save all kinds of document with Office Web App Server. However, when I tried to integrate these two together I found that even if I can enter the edit window of Excel and PowerPoint and I can see that Post Requests from Office Web App Server like locking and Cobalt are handled by my WOPI Post API action handler. Those change doesn't take any effect on my local file at all. Moreover, I still cannot edit word document and when I checked the back log of Office Web App Server, I found the error message is Cobalt is not supported while I have already set the SupportsCobalt in CheckFileInfo response to true! Any help is very appreciated!
I think I have exactly what you are looking for. Check out my implementation of the WOPI host. It's an MVC6 app that takes the best from the both examples you are referring to and adds some extra features.

Resources