Device is not showing in mfpconsole after registering for push notification via rest API - ibm-mobilefirst

Am using MFP confidential clients to register my device for push notification.
but after getting 201 (created response) from the server , my device is not showing in device section of mfp console.
MFP version: 8.0
This is the response i got after registering via REST API.
{
"createdTime": "2018-07-17T07:04:18Z",
"lastUpdatedTime": "2018-07-17T07:04:18Z",
"createdMode": "API",
"deviceId": "asadasdadadd",
"userId": "anonymous",
"token": "token",
"platform": "A",
"phoneNumber": "12345678",
"href": "http://xxx.xx.xx.xx:9080/imfpush/v1/apps/abc.abc.abc/devices/12345-678"
}

You have registered your device against the Push service endpoint. This is different from the Devices registration from MobileFirst SDK that shows up in the Devices console.
MobileFirst console lists devices only registered using Apps built with MobileFirst SDKs.
If you are only registering your device for Push, it does not appear in the console. If you want your device appearing in the Devices console, do Push device registration within a mobile app and not using confidential client.

Related

APNS handle obtained by Expo in React Native is incorrect

EXPO SDK Version: 42.0.01
Developing for: iOS
Our goal: successfully send a test notification from Test Send tool in Azure Notification Hub to a registered physical iPhone which is running a local instance of an EXPO app.
Progress: we're able to successfully register a physical iPhone with Azure Notification Hub without using a 3rd party library. We can see that registration in the Hub.
Issues: when using the Azure's Test Send tool we're getting an error "The Push Notification System handle for the registration is invalid" and the test notification does not get delivered.
Debugging:
we're using EXPO's Notifications.getDevicePushTokenAsync() API to obtain the push token.
Azure support team analysed the logs and concluded that the problem is the PNS handle i.e. Apple's ID of the phone registered for notifications.
the phone's PNS handle remains the same at all times.
by using "expo credentials:manager" I've added a new Push Notification Key using KeyID, TeamID and .p8 certificate - the PNS handle didn't change after doing that and notifications were failing too.
I haven't found any tools to validate the APNS handle. I'm currently awaiting a .p12 certificate from our corporate team to test notifications by using https://pushtry.com/.
How do we validate the APNS handle and if found that it's invalid - how do we cycle it / request another?
The PNS Handle from APNs does not change that often as it is tied to the device and app installation. See this answer for more details Does the APNS device token ever change, once created?

Branch.io link does not open app store if app is not installed

We're using branch.io to create deep links that should:
Open the app if the app is installed
Open the App store if the app is not installed
Unfortunately the case where the app is not installed does not work for links that we create using the branch.io API.
The following data is sent to the API (POST /v1/url)
{
"type": 2,
"data": {
"$fallback_url": "https://example.com/topic/123",
"$deeplink_path": "/topic/123",
"$marketing_title": "Topic Link",
"~campaign_id": "campaign-123",
"~ad_id": "ad-123",
"referredByUserId": "user-123"
}
}
On the branch.io dashboard we configured that when the app is not installed the app store should be openend. But it seems the configuration of the branch.io dashboard is ignored when using the API? What parameters do I have to set to what in order to redirect users on mobile to the app store if the app is not already installed?
PS: When I create a "Quick Link" from the branch.io dashboard everything works as correctly. My question is only about the REST API.

cordova-plugin-firebase notifications working on Google Firebase console but not on API

Using the cordova-plugin-firebase plugin, I can only get device notifications via the Google Firebase console, and not through the server http API.
APP: cordova (6.4.0) default app, not changed, with plugin cordova-plugin-firebase (0.1.21) added.
Steps to reproduce
Download APP to device (android phone)
Start APP (seems like this is required to register this app with the phone)
Close APP
Send message from server through FCM http API
{ notification:
{ title: 'Notification Test',
body: 'Notification Test Body Text' },
to: '/topics/all',
priority: 'high' }
Device does not receive/show a notification was received.
Is there a bug in the server script?
No. If I replace cordova-plugin-firebase with cordova-plugin-fcm, then the device (and APP) receive notifications through the API just fine.
Why not just use cordova-plugin-fcm then?
cordova-plugin-fcm is not well maintained, and I would like to use the Analytics in cordova-plugin-firebase

Silent background push on iOS and Android

I am using GCM to deliver notifications to Android and iOS devices.
What I am looking for is to send in the same downstream message a silent push for both platforms.
I have tried with this message
"content_available":true,
"data":
{
//My data here
},
As you can see, no notification key is sended, iOS works fine and we are receiving push in the background but Android shows my app icon at the top bar and it is not calling the GCM receiver.
If I set content_available to false, Android works fine but not in iOS (either background or foreground).
What I supposed to do? Send to my server the OS of each device and send a different message for each system?
I have also tried to set aps dictionary in data payload, but still the same.
Thanks in advance.

Notification Sync from Android Phone

I have a 3rd party app running on my Android phone. This android phone is paired to a google glass thru myGlass app. I receive a push notifications to the 3rd party app running on the phone. But there is no sync of notification to the glass timeline.
How can I sync the notification received for the 3rd party app on Android phone to google glass.
Please advise.
I think the new Notification Sync feature launched by Google may be useful in this case. You set the MyGlass to access your notification and then it will relay your phone notfications to Glass. You can even choose which apps can send notification to Glass. Find More info here