I'm trying to implement remote notification on a PLC project that supports iOS and Android platforms. I will be using a web API to handle the register and push the notification. I need help on how to set up the remote notifications.
This what I have for the iOS.
My iOS approach:
In AppDelegate implement registration to APN and get device token.
Save that token to my shared project.
For demonstration and simplicity:
3.A In one of page have a button to register the device with the token to the server using the web API.
3.B In same page, another button to send notification to that device by using the token and using web API
Handle received notification in AppDelegate
Any hints or tips on to make my appraoch better?
As for android, I don't know any approach to it since I haven't had any experience using it.
I need help on both iOS and Android approach or links to tutorials or samples. Any help will be appreciated it.
I working with Azure Notification Hub and with this tutorials my app working perfect with remote notifications.
iOS
https://learn.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-ios-push-notification-apns-get-started
Android
https://learn.microsoft.com/en-us/azure/notification-hubs/xamarin-notification-hubs-push-notifications-android-gcm
Related
Can I use a WebView to receive push notifications and show them on my Android App using Xamarin, and if so, how can I do this? I've been looking and haven't found any direct way of making this happen. I'm trying to basically interface my website into a mobile app, and this appears to be the last thing necessary.
In my mobile App, we a requirement to show the count of unread notifications in the notification area (with notification stacking) and also show the notification even when the application is closed \terminated by the user.
We decided to use data payload so that we can develop our custom event handler to show the unread notification count and implement our custom logic to show notification stacking.
This working perfectly fine for an Android mobile app. But in the case of the iOS mobile app, the incoming push notification is not 'waking up' the iOS mobile application when that application is closed \terminated by the user explicitly.
I have referred some of the solutions found online which include the settings ‘content_available =1 and\or setting priority to High but nothing is worked so far.
It would be great if anybody shares their experience\solution on this topic.
We are using firebase cloud messaging to push the notifications to the mobile app and we are using Cordova plugin on the client side.
My mobile app does not use GPS or Voice over IP (like WhatsUp which receives the special treatment from iOS) .
Does anybody have a prior working solution for this problem?
Im new in mobile development. Now I write a little app.
User login in app
see list view of data from server. when I add something in server i send push to mobile and update data
Right now - i have Droid app that use this component(https://components.xamarin.com/view/gcmclient/) and receive messages
(c# console app for test ) -- all its work
Now question is - when i handle push from server - how to call method for update list view (this logic located in PCL and handle push located in droid app
P.S I still looking for good tutorial for iOS Push notification. Can somebody give me link?
P.S2 - if its possible use GCM for iOS?
You will need to call back into your PCL, either by Dependency Injection or some other method.
PS: GCM for iOS is here: https://components.xamarin.com/view/googleiosgcm
We have just upgraded our existing Windows phone 8 Silverlight app to Windows phone 8.1 Silverlight project with the help from here Basically we want to use WNS to send push notification and not MPNS. We changed the notificaiton type to WNS in menifest file. We added the tile in package.menifest file.
When we are registering the app we get the app id but notification is not being received on the app. We are using Azure notification hub to send the notification using WNS. When we look at the azure notification explorer it shows the registration but the platform is still MPNS. Any help will be highly appreciated.
I can't seem to open the link, but it seems like on registration, the service is noting the request with platform MPNS. Are you using the client SDKs or using REST directly? If REST, I would make sure the platform is set correctly. You will also need to update the WNS certificate with Notification Hubs in the Azure Portal.
I am developing an app for selling of products, but I am stuck up in a place where I am not understanding how to give notifications to android phone from database change(insert or update on that table) for new products availble and offers like discounts, schemes etc.
I followed androidhive.com and javapapers.com for the GCM push notifications concept and it is sort of clear:
PHP or C# or Java web service
MySQL or SQLServer Database
GCM
Android phone
The statement for my problem would be "App should receive push notifications for new products, and offers and discounts given by the person-in-charge for it"
My assumption for this problem is:The "offers and discounts" would be "inserted" to a table(tbl_products) in the database and same goes for new products, "inserted" into a table(tbl_offers) in the database.
As soon as that "insertion" is done, the web service (php and c#), which I don't know how it should know, but gets to know about the change and informs GCM, and GCM sends the notification to the respective users.
The logic behind this is not familiar to me. I would greatly appreciate it if someone would help me with the logic and point me in the right direction of the coding for Android and web service. Thank you in advance.
I have been there ,done that! The way you should to proceed is:-
Create your website backend, a web service connected to a database(You need to use and know SQL for this part). Define your database accordingly. PHP is the easiest way to get started. Look at the GCM backend tutorials on Google.
Create your mobile application which has google play services enabled to use GCM. Implement GCM in your android app following the tutorial at the Official Android Developer website. You need to create an XMPP or RESTful service to communicate with your server. Your server needs to support XMPP to communicate better with Google. HTTP(GET/POST/PUT) is a dirty alternative to get working when you do not have a VPS setup for languages like Java(Most hosting companies allow only PHP,HTML,JavaScript etc on shared hosting).Depending on your scale of operation you may have to rent a Virtual Private Server(VPS) for your web service.
Create a private backend application(can be web or a desktop application) to upload your offers and so on. Examples on www.androhive.info
Make sure you got steps 1,2,3 correct.
Test your mobile application.
The idea can be pictorially represented as :-