Disable App Center Push in UWP - push-notification

I have integrated the Microsoft App Center push notification feature in one of my UWP apps. Now I'd like to let the user decide if he wants to receive push notifications or not.
According to the SDK I can Enable or disable App Center Push at runtime, but this will not actually disable anything...
disabling the App Center Push in the SDK will NOT stop your application from receiving push notifications.
So, is there even anything I can do?

Can't seem to find the exact solution but would like to offer the following workarounds:
App Center allows to create Audiences to target different segments of app users when sending push notifications. You could create an Audience for those who don't want to receive push notifications and simply avoid them when sending the pushes.
There's a way to unregister for push notifications sent from Dev Center. If you used the later instead of App Center to send notifications your problem would be solved.
To get pushes from App Center it's required that an app calls AppCenter.Start(...) method on start-up. What if it doesn't?

Related

Sending an individual push notification to a specific user of webview Android application

Is it possible to send an individual push notification to a specific user of webview Android application?
I have a webview based Android application. Android 8 blocks all background processes and my application can not anymore check for messages every 5 minutes and to show push notifications is there are new messages. As I understand almost the only solution is to use firebase to show notifications.
My question is: can I send individual Firebase notifications to webview application users? If yes, how? People who login to my website from Android phones, enter their data in a login form that loads my website. It's not a Android login form. How can I at the same time login to Firebase and how Firebase will know that this user is already logged in if it's only a webwiew application?
A webview is not capable of directly receiving Cloud Message payloads. The only browsers that works with Cloud Messaging are those that support the Push API.
What you can do instead is receive the payload in the native layer of your Android app (using a normal Android integration with a service that receives the payload), then proxy it to your webview as needed, using webview's ability to inject javascript into it (while it's visible). This definitely is not a trivial amount of work.

How to Send Push Notification from Xamarin Form app?

Hi I am new to Xamarin forms App development. I recently set up Push Notifications through App center & Firebase. This allows me to send push notifications through their console. However Is there Library or Nuget Package By which I can send These Push notifications through .NET? i.e Send a push notification through my C# Code.
Preferably not using Web Request etc.
This is broad question. We can't provide you exact solution. I have collected all the Proper Links these should get you Setup your App Center and your Xamarin Forms Apps. Please follow the instruction throughly.
Configure App Center Push Server :
As you said, You have already setup the App Center to send push notification. I hope you setup all the instruction correctly otherwise use the following link to read more in details :
iOS : https://learn.microsoft.com/en-us/appcenter/sdk/push/ios
Android : https://learn.microsoft.com/en-us/appcenter/sdk/push/android
Configure your Forms App:
To Setup your Xamarin forms app to receive the Push notification. Please following the following :
https://learn.microsoft.com/en-us/appcenter/sdk/push/xamarin-forms
Send/Subscribe/UnSubscribe the Push notification:
You can call the App Center Push notification API which will send the push notification to specified Device or to the group of devices.
Please go through the following link to learn more about App Center Push API's:
https://learn.microsoft.com/en-us/appcenter/push/pushapi
Let me know; If you stuck on specific problem.

Firebase web push notifications

Hey guys I am using firebase push notifications in the web application, I am showing the notification via the service worker as mentioned in the firebase documentation.
the problem is when I open the browser , I see multiple push notifications stacked upon one another , as its very annoying to see many push notifications , is there any way to combine push notifications into one, based on some attribute.
As far as I know, you cannot group them. That is why many users tend to turn off notifications in their mobile devices because it is annoying. You have to follow the basic principles of push notifications.
It must be timely
It must be relevant to the users

push notification without mobile app

I have a website. Currently I have been sending sms during some transactions as notification.
I want to use push notification instead of sms. But I don't have any mobile app.
How can I send push notifications without a app. Are there any way to do it?
Yes, Spontit enables you to send push notifications to all devices - desktop, iOS, Android, etc. You can do so for free and without your own app.
You can check out their API here.
As far as I know, there is no way to do this without developing an app for each platform (Android/iOS). You could also get away with something like a browser plugin. Essentially what your asking for is what your doing, an SMS or an Email. That is as close as you can get w/o an app. You can make a notification system on a website, but there is no way to push it to the user when they are not on your site w/o them downloading something like a plugin. :D
you can do this with https://pushed.co
they allow users to download their app and you push to the users with their app without needing to have your own mobile app

Push notification to iOS not working when message received

I have a Worklight app doing push notifications. Sending the push causes the notification to appear in the notification bar on both Android and iOS as expected. If the push is received while the app is running, it calls the message handler function as it is supposed to.
The issue I'm having is that if you launch the app by tapping on the notification on iOS, the message handler never gets called if another push is sent while the app is running. I have to exit the app and kill it completely, then relaunch the app from the launcher. Then if the push is received while the app is running, it will call the message handler.
This only occurs on iOS. The app will respond to a received message on Android while the app is running, even if the app has been launched by tapping on the notification.
EDIT:
I did struggle to verbalize the scenario, couldn't find the right words that made sense, but the steps you have done Idan are largely correct for what I'm trying to do. We are doing tag based notifications, so that is different that what you have done. We are also using PersistentCookieAuthentication as they wanted push notifications to be sent without the user having to explicitly logging in.
We are currently using WL build 6.2.0.01-20141216-0427
We've tried it on a couple of different models, an iPhone 4s running 8.0.2, and an iPhone 5 running 8.1.2.
Edit based on the edited question:
Tag-based notifications do not require any login, as it is the device that is to be subscribed to any tags that you define in application-descriptor.xml; it is not login-based, so any type of login that you are doing it irrelevant. The push will be sent to any device (app...) that was subscribed to your tag using the subscribeTag API.
I did another test in iOS using a broadcast-based notification (it's basically like tag-based notifications). I kept the app in the background and sent a notification. Tapping on the incoming notification in the notification bar brought the app to the foreground, which then displayed the alerts of the incoming notification.
You can try it with this application: https://www.dropbox.com/s/l2yk2pbvykrzfoh/broadcastNotificationsTest.zip?dl=0
Make sure to place your own .p12 certificate and pushSender password.
I've been trying to understand your scenario... I suspect you've left out something or need to better word the problem description.
Here's what I've tried using MobileFirst Platform 6.3 (no drastic push changes in iOS between 6.2 and 6.3) and iPhone 6 running iOS 8.1.2.
Launched sample push notifications app (which uses event source-based notifications) on device
Logged-in > Subscribed
Quit application
I then sent a notification by invoking the adapter in the Studio
The notification arrived and displayed in the notification bar
Tapping the notification launched application
Logged-in
The notification alerts were then displayed.
I then moved the application to the background.
Sent another notification, which was displayed in the notification bar upon arrival
Tapping this second notification brought the application to the background, displaying the alerts
I then kept the application in the background.
Sent a third notification
In this case, because the application is in the foreground, the notification did not display in the notification bar -- as expected -- and instead the alerts were displayed right away.
If your scenario is different than the above, such as: you're not even using event source-based notifications but rather broadcast- or tag-based notifications, or your application flow differs, etc then please edit the question with a more precise description.
When you edit the question, also mention the following:
Worklight version and build number
Device model
Used iOS version
I am aware of one possible issue (APAR #PI31988) that is currently under investigation, where the underlying native code dispatches the message before the JavaScript framework is ready to handle it, thus no message is displayed. This was found to happen in slower devices such as iPhone 4.

Resources