Support for Google Firebase

2»

Posts

  • SupreetTare.9314SupreetTare.9314 GBUniversity ✭✭

    @MarkCerezo did you get a chance to upload your code on GitHub. I am starting with this & some sample to refer will be great, specially until Xamarin decides to update their docs for this.

    Thanks
    Looking forward to hear from you.

  • SupreetTare.9314SupreetTare.9314 GBUniversity ✭✭

    trying to follow the samples from above, facing this issue

    Could someone please help?

    Thanks
    ST

  • UmutBebekUmutBebek TRMember ✭✭

    Please look to my example on (works both on foreground and background notifications)
    https://forums.xamarin.com/discussion/70248/firebase-configuration
    just search my name :)

  • HabibAli.7513HabibAli.7513 USMember
    edited December 2016

    I need help for firebase cloud messaging integration with Xamarin. As you know Xamarin.Firebase.Messaging nugget is dependent on Xamarin.GooglePlayServices.Basement (= 32.961.0) which itself is dependent on Xamarin.Android.Support.v4 (>= 24.2.1) (https://www.nuget.org/packages/Xamarin.Firebase.Messaging/ ) and it cannot be installed with Xamarin.Forms as it is dependent on Xamarin.Android.Support.v4 (= 23.3.0) (https://www.nuget.org/packages/Xamarin.Forms/)

    Can any one please help how I can integrate firebase messaging with Xamarin.Forms

    Regards

    Habib Ali

  • ShahriatHossainShahriatHossain USMember ✭✭

    Hi @MikePeters

    I am using this method on my Main method:

    private static void ApnsMethod()
    {
    var jGcmData = new JObject();
    var jData = new JObject();

            jData.Add("message", MESSAGE);
            jGcmData.Add("to", "/topics/31");
            jGcmData.Add("priority", "high");
            jGcmData.Add("data", jData);
    
            var url = new Uri("https://fcm.googleapis.com/fcm/send");
            try
            {
                using (var client = new HttpClient())
                {
                    client.DefaultRequestHeaders.Accept.Add(
                        new MediaTypeWithQualityHeaderValue("application/json"));
    
                    client.DefaultRequestHeaders.TryAddWithoutValidation(
                        "Authorization", "key=" + FCM_API_KEY);
                    client.DefaultRequestHeaders.TryAddWithoutValidation(
                        "Sender", "id=" + FCM_SENDER_ID);
    
                    Task.WaitAll(client.PostAsync(url,
                        new StringContent(jGcmData.ToString(), Encoding.Default, "application/json"))
                            .ContinueWith(response =>
                            {
                                Console.WriteLine(response);
                                Console.WriteLine("Message sent: check the client device notification tray.");
                            }));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Unable to send GCM message:");
                Console.Error.WriteLine(e.StackTrace);
            }
        }
    

    and trying to send message on topic but I can't get notification , what I did wrong here, can you say?

  • SureshValle480SureshValle480 USMember ✭✭
    edited January 2017

    @JamesMontemagno
    I am trying to integrating xamarin firebase crash reports in iOS, but I didn't find any xamarin packages/bindings for native firebase crash report dll from here http://firebase.google.com/docs/ios/setup.
    I already integrated in android now looking for ios.

    Please help me.

  • MaximeEMaximeE Member
    edited June 28

    Hi all, any news for using GeoFire in a Xamarin.Forms project ?

    I tried with the nuget package FireSharp, but this is really not optimized : stackoverflow.com/q/51078938/4965913

    Any idea please ?

2»
Sign In or Register to comment.