Android overlay window notification in xamarin form - xamarin

how to implement the android overlay window notification with some actions button to close the overlay window in xamarin android.
Push notifications will come from FCM but instead of showing android regular notifications I wanted to show the overlay notification message with my custom view.

Firebase Cloud Messaging service for push notifications doesn’t provide an option to add action buttons to the notification layouts. So in order to add the action button to notifications, the only way we have now is to create the notification in native and integrate it with Flutter.
For more, you can check:
https://medium.com/#info_67212/firebase-push-notification-with-action-button-in-flutter-a841da348097
https://stackoverflow.com/a/57917344/10308336

Related

Xamarin Forms - Syncfusion SF Schedule swipe Error - iOS only

I have a Syncfusion schedule used in month view, but once I swipe to go to the next month the app crashes and shows me this error:
"Event registration is overwriting existing delegate. Either just use events or your own delegate: Foundation.NSObject UIKit.UIGestureRecognizer+UIGestureRecognizerDelegate"
This only happens on my iOS project and is fine on Android.
I have no custom renderers associated with the feature.
Would anyone know what is causing this?
iOS controls have some gesture events and if you use those gesture events you can't add gesture recognizes or the app will crash. So it is likely that SF control is using those events.

Hide the soft keyboard in Facebook Messenger Bot

Hi I'm writing a Facebook Messenger bot that has a few nice looking card actions - that end up taking up a large portion of the chat window. The problem is that the soft keyboard on phones such as iPhone and Android still displays, constraining the visible area of the chat to an even smaller window, obscuring the card.
Is there a way I can send some sort of specific JSON down in my bot messages to indicate to FB Messenger that the keyboard should be hidden until the user clicks back into the message entry area?
Thanks.
One option could be is using the Persist Menu feature and set the composer_input_disabled property to true.
From the docs:
Disables the Messenger composer field if set to true. This means your
bot can only be interacted with via the persistent menu, postbacks,
buttons, and webviews.
Some useful links:
Microsoft Bot Framework .NET - Add a persistent menu to your Facebook Messenger chatbot
Adding Menu and Buttons to your messenger bot
Add Persistent Menu and Buttons to your messenger bot
As Ezequiel pointed out. You can use the persistent menu feature for Facebook Messenger. If you are using the .NET SDK check out the sample I created:
https://github.com/FranciscoPonceGomez/Persistent-Menu-Facebook

After assigning GetViewForAnnotation, Xamarin.Forms class doesn't receive Click event

I have a Xamarin.Forms page with a map containing numerous pins. I've built a custom iOS renderer to change the image of the displayed pin.
Once I assign the GetViewForAnnotation delegate, my Xamarin.Forms class no longer receives the "Clicked" event. I can access it through the custom renderer, I do believe, but what I want to do when the user taps the title of the pin is push another Xamarin.Forms page to the navigation stack, and I don't know how to give control back to my Xamarin.Forms app from within my Xamarin.iOS app.
I have a feeling I'll need this type of logic in a few other places... where I need to handle a CustomRenderer event but then pass control back to the Xamarin.Forms app for navigation or other purposes.
So I have a couple directions I'd like to go:
1 - More straightforward - get my "Clicked" event to fire in the Xamarin.Forms app when the map's pin is clicked, even though the iOS app is handling the creation of the pin via a CustomRenderer
2 - More advanced and customizable - pass control back to my Xamarin.Forms app (maybe raise an event related to the Renderer level?)
I'd prefer at this time to just get my Clicked event back, but I'm guessing that may not work once I assign the GetViewForAnnotation event in the CustomRenderer.
From what I read, you can detect the annotation click within your renderer.
Within your renderer in the OnElementChanged you can get access to the View in the Xamarin.Forms PCL it relates to.
A few possibilities to consider going forward:-
a) Use MessagingCenter to convey messaging between interests (see
here).
b) Use the standard event raising, i.e. public event
EventHandler<someEventArgs> OnSomeEvent through your View in your
PCL.
c) Use an ICommand approach on your View in your PCL if your
more MVVM orientated, and invoke this way instead.
Once you have your notification back through your View / Page, depending on where your doing things, you can then do a normal navigation based on the information you have been given from your platform-specific renderer in the PCL.

Pebble Custom Phone Call Notification

Is it possible to override the default incoming call screen with a custom screen on the pebble watch?
Im guessing I could capture the interruption as described here - http://developer.getpebble.com/guides/pebble-apps/app-events/app-interruptions
Is this sort of customisation possible?
The screen that shows an incoming call is a modal window shown by the system and cannot be overridden from a Pebble app running on Pebble.
There are however two things you can do on the phone:
From a mobile app on the phone, you can push a notification that will appear on top of the "phone" system UI.
(Android only) You can suggest to the user that (s)he disables the "Call Notification" in the Pebble app and then you will have control of the screen during calls (as suggested by #Chris in the comments. thanks)

Jumping to a view in storyboard with push notification

I have a project which dont have a navigation control but has a storyboard. I can receive the Push Notification to my app. After the user click the Notification message and lunch the apps, I want it to jump to one of the views in the storyboard to display the details of the messaged fetched from the internet.
Any idea how to do that??
I have red a lot here about the same problem - like Push view from push notification - but all of them either works without Storyboard, or with storyboard with navigation.
Thank you in advance.

Resources