Badges in Nativescript - nativescript

I have a few questions regarding the badges support in Nativescript:
Push Notifications icon badges: I read in the documentation that it is available on iOS. What about Android? What are our options there?
Button badges: I could not find anything on this topic in the documentation. Does anyone has any suggestions on how to implement that.
Also, in iOS, I used the Push Browser to send a test notification and now my icon has a permanent badge number even though I had cleared the actual notification. Is there a way to clear those?
Thank you.

Related

How can actions be implemented in local notifications in Xamarin.Forms

I am developing an Xamarin.Forms app for Android and iOS, that requires me to implement local notifications. I have done this using the Local Notifications Plugin for Xamarin and Windows, https://github.com/edsnider/LocalNotificationsPlugin and it works fine. I get the notifications as I am supposed to, but I was wondering if there is a way to add actions/commands to this, type 'buttons' for accept/decline, like you can do in pop-up and dialogs. I don't know if this can be done using the plugin I am currently using, or if there is another plugin or something else that I can use instead.
Any help or advice would be greatly appreciated.
Thanks
On Android, you can custom the notification's layout to achieve your goal.
I have found some links for you, this is about how to Create Custom Notification Layout, and here is creating custom notification with xamarin.android
.
As you can see, on Android, the notification's layout is RemoteViews, it is not a normal view,you need setCustomContentView method for you notification.

How do I know a xamarin application has push notifications?

I have started to work in a xamarin application. It has not been developed by me. How do I know this application has push notifications?
Thanks, in advance.
On Android check the AndroidManifest to see whether C2DM/GCM/FCM has been set up. Usually this would be several permissions having to be added for this to work.
Similarly on iOS the Info.plist/Entitlements.plist will need to include push notifications capabilities and there will also be implementation of the receiving part in the AppDelegate class.

No sound for web push in MacOS

Is it even possible to play sounds for web push notifications?
For Chrome I was able to handle notificationDisplay event and manually play sound. However this event is not supported in Safari.
Nothing mentioned in official documentation at https://documentation.onesignal.com/docs/customize-notification-sounds
In Apple's documentation some Push Package was mentioned. However it's not clear where to put sounds.
It does not seem like web push notifications support sound at the moment. If any sounds do play, they would be due to the settings you might have on, for example, your Mac computer when you receive a notification, or your Android phone if it's set to buzz when you receive a notification.
Sound for web push notifications is in development though. For more information, you can follow these links:
Chrome Thread: https://bugs.chromium.org/p/chromium/issues/detail?id=442131
Firefox Thread: https://bugzilla.mozilla.org/show_bug.cgi?id=1105222

Is it possible to implement dynamic notifications on Apple Watch without a launchable app?

I've designed a custom notification for an app I'm working on for Apple Watch. The notifications look good but because of the current technical limitations I don't want to build a launchable app or glance until I have mic and speaker access. Is it possible to display dynamic notifications without having an app icon on the home screen of the watch or is the watch app mandatory to have a dynamic notification at all?
No, you will need to add a dynamic Notification scene in your Watch app.
If you want to read more information about this I'd refer you to this page:
https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/CustomzingthePushNotificationInterface.html#//apple_ref/doc/uid/TP40014969-CH6-SW1

windows phone push notification on tiles

i would like the app that i have created on wp7 to display alerts on the live tiles. I was going to use push notifications to do this. So, whenever there is an alert, the app will produce a push notification and then the live tile would display the push notification alert. I have tried to find sample codes on msdn and i have not found much. Does anyone know any code sample for wp7 that would help.thank you!
MSDN has extensive howto articles and sample code; there is even a How to: Send and Receive Tile Notifications for Windows Phone which sounds like it should do what you need.
This may be of help to you: Windows Phone 7 notifications. I went to a Windows Phone camp and came away feeling that there are, in fact, very distinct notifications and you have to make sure you're working with the right type for the right job. That link covers the types and their purposes, but did want to give you a heads up on that.

Resources