Launch application automatically from a push notification on Windows 10 Mobile? - push-notification

This is a reboot of question Launch application automatically from a push notification on Windows Phone 8 but for Windows 10 Mobile.
Is there any positive development on this in Windows 10 Mobile?

It's basically the same as on Windows Phone 8.1.
You cannot directly launch an app into the foreground on receiving a push notification, but you can trigger a background task by push notification. The task can then decrypt the payload and fire a toast and tile notification to display it to the user. For a long message the toast can let the user launch the app to view the full message.
See Background tasks triggered by raw notifications in MSDN.
The Raw notifications sample demonstrates this for Windows and Windows Phone 8.1.

Related

How to make video call with IceLink, when the peer app is closed

I have a Xamarin.Forms app. In it, I implemented video chat functionality (that supports iOS and Android) using IceLink. The video chat works when both the caller and the recipient have their apps open. Now I wonder how I can make a call to a device which has the app not open.
For Android
You can send notification by Firebase Cloud Messaging when device do not open, click the notification to open your application, show the video chat page.
If you use a high priority FCM for an app, it will allow that app to run services in the background for a short period of time. This would be a good alternative to having a background service that polls an app in the background:https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/services/#background-execution-limits-in-android-80
For iOS
You can refer to Jack's reply.
https://stackoverflow.com/a/60001529/10627299

Is a Firebase Notification Received for a web app running on a mobile browser in the background?

The natural way to use Firebase on mobile is using Android or iOS.
However, I'm in this situation where a client who developed a web app wants to receive push notifications when:
The web app runs on a mobile browser
The mobile browser app is in background
Is that possible?
Note: According to Firebase Documentation, client web apps can receive push notifications when they are in background, but I'm not sure if that extends to web apps running on a mobile browser in background.
Yes, you can receive push notifications on your mobile even when your browser is not open, but you need to enable it by pressing Allow when prompted, as below.

Tapping on the app icon does not display the notification in the app

I am using the Event source-based notifications in hybrid applications sample from https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/push-notifications-hybrid-applications/event-source-based-notifications
When I receive a push notification and I tap on the app icon instead of tapping the notification in the notification bar, the notification isn't pushed and still appearing on the notification bar. Only if I tap on the notification bar, even if the app is open, the notification is pushed and is deleted from the notification bar.
There are no problems if the app is open when I receive the notification.
How I can force the notification to be pushed when I tap on the app icon rather than tapping the notification in the notification bar?
MobileFirst 7.0.0
Android Environment
I have indeed reproduced this. It appears to be a regression.
After a push is received and you then tap either the incoming notification in the notifications bar or the app icon
the app is supposed to launch
you are then prompted to login
push support etc is checked for, and finally
if there's a notification in the queue then it is supposed to be displayed (the pushNotificationReceived function is supposed to be called). This is not happening when tapping on the app icon
If you are an IBM customer or business partner I suggest for you to open a PMR (support ticket). This is going to be investigated by the development team...

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.

Can we receive Raw push notification if WP 8.1 app is closed?

I am creating a Windows Phone 8.1 App,in which I am capable of receiving a raw push notification using WNS.
I discovered following two scenarios:
1)Notification delivery event,used when app is running i.e. in foreground
2)Background task triggered by the raw notification,used when app is not running .
I am able to receive Push notification when application is in foreground and when not running(in background).To receive notification in background I used background task.
Means I can receive notification in these scenarios:
1)when app is in foreground
2)when app is in background
I am able to get notification when app is in background as I registered background task.
Will that background task work when app is not in memory?
I am not able to receive notification when application is closed.
My question is:Can I be able to get that raw push notification when my app is closed and I registered with background task?
Any help is appreciated.
Thanks.
Yes, you should be able to get the raw push notification when your Windows Phone XAML or Silverlight 8.1 app is closed and you've registered a PushNotificationTrigger. See http://code.msdn.microsoft.com/windowsapps/Raw-notifications-sample-3bc28c5d for a sample that does this (it's a universal app that works across windows\window phone 8.1).
One common issue for PushNotificationTrigger not firing is if you have not called BackgroundExecutionManager.RequestAccessAsync() and validated its return value before registering your background task. This is required for both Windows and Windows Phone when using PushNotificationTrigger (note: all triggers requires this call for Windows Phone unlike Windows).
I think, Windows Azure Mobile Services can do that. If you want to try this is the link. Windows Azure is trial for 90 days.
Windows Azure Free Trial 90 Days. Click to Register.
Here is the Mobile Services Tutorials.
Windows Azure Mobile Services .Net Backend. Tutorial
Windows Azure Mobile Services Javascript Backend. Tutorial

Resources