UrbanAirShip component integration with Xamarin.Forms

I am developing mobile apps for Android and iOS app and for development I am using Xamarin.Forms. In my application need to push notification on different mobile handset. I tried two ways to add UrbanAirship with Xamarin.Forms:
1. Add Component
2. Nuget
But unfortunately not able to add dll in my project.
Please provides support how to integrate it with Xamarin.Forms.

Didn't find what you were looking for?

New post

Comments

16 comments

  • Akash,

    Would you be able clarify what error you're running into when trying to add the Urban Airship Component into your app? We'll need all the information you can give in order to be able to help.

    Comment actions Permalink
    0
  • Hi Michael, 

    First thanks for quick reply.

    I have successfully added UrbanAirShip binding with Xamarin.Forms. But problem still there when sending notification. Project doesn't sending notification on handset but phone channel Id is generated every time on new installation.

     

    Thanks,

    Akash Kumar

    Comment actions Permalink
    0
  • Hi Michael, 

    Please find more details on my implementation on Xamarin.Forms and UrbanAirShip binding. 

    I am using sample application which available on Github to send Push Notification through UrbanAirShip service. Github Link  https://github.com/urbanairship/xamarin-component 

    After download of code I changed the configuration key values as per suggestion provided on your tutorial. 

    1. Created Cloud messaging entry on Firebase console(For Mobile App) to get Server Key and Sender ID values.
    2. Created project on UrbanAirShip and set notification service(GCM) for Android under setting tab.
    3. Changed App Key, App secret and GCM sender values of airshipconfig.properties in Xamarin.Andoird project to make connection with UrbanAirShip service. Connection is successfully created because my handset channel ID is coming under Audience tab section.
    4. To send message as Push notification I used UrbanAirShip API. After send message from UrbanAirShip UI nothing happening on my application. I tried to look activity log on UrbanAirShip but no details are coming about any exception.

    I am not able to track actual region but is happening behind the scene. Please provide the way to identify what things I had missed during development. In below screenshot,I shown the activity log window. When you see Notification sends column you will find sometime value is 1 and sometime value is 0. 


    Please do the needful and provide some solution to complete integration with UrbanAirShip. Let me know if you want more details.

     

    Thanks,

    Akash Kumar

    Comment actions Permalink
    0
  • Akash,

    Keep in mind that the generation of a Channel ID does not necessarily mean that you have everything set up correctly.

    The next place I would check is to make sure your GCM/FCM credentials are correct in your app. I'm seeing quite a bit of GCM "Not Registered" errors from your app, which indicates that your credentials may not be correct.

    It may help to create a new Server API Key and ensure your Sender ID is correct in your project before redeploying the app to your device.

    Comment actions Permalink
    0
  • Hi Michael,

    How to you check "GCM "Not Registered" errors from your app"? I have created Cloud Messaging project credetial on https://console.firebase.google.com and from here I picked sender id to set gcmSender key value of airshipconfig.properties file. Also pick Server key field to fill the Google Cloud Messaging service details on UrbanAirship.

    In below image if you see you will find my project is getting GCM registration id. Is it still any issue with GCM/FCM credential?

     

    Can you suggest me what parameter is wrong on UrbanAirship?

    Thanks,

    Akash Kumar

     

    Comment actions Permalink
    0
  • Akash,

    Would you be able to post a screenshot of your API Key in Firebase and your Sender ID as well as what you have filled out in your airshipconfig.properties file?

    Comment actions Permalink
    0
  • Hi Michael,

    As per suggestion please find Firebase API Key and sender ID

    And, contain of airshipconfig.properties file

    Comment actions Permalink
    0
  • Akash,

    I would try creating a new Server API Key in Firebase, if you haven't already, and try giving those credentials a go. It almost looks like Google may have revoked your API Key, and so any devices registering to that API Key are no longer working.

    Comment actions Permalink
    0
  • Michael,

    Is your new server API key in Firebase working with my UrbanAirship project? How to know Google revoked my API key? I am not getting your word and what actual solution I have to do to resolve my issue.

    Thanks,

    Akash Kumar

    Comment actions Permalink
    0
  • Akash,

    Google doesn't usually tell you that your API Key has been revoked. It just kind of happens.

    Based off of the "Not Registered" errors I saw on our end, I suspect that your API Key you have right now is no longer valid.

    Creating a new API Key in Firebase should let us see if this is the case.

    Comment actions Permalink
    0
  • Michael,

    Can it possible to know error on UrbanAirship like you see "Not Registered" issue? Because from onward I will check issue and try to resolve at my end.

    Thanks,

    Akash Kumar

    Comment actions Permalink
    0
  • Akash,

    You will be able to see these types of errors on your end by using adb to log these on your device. adb logcat should allow you to view logs as it relates to GCM registration, so you should see these come across when the app opens, and does other registration events.

    Comment actions Permalink
    0
  • No luck I got still same thing is happening. I don't know why this is happening.

    Comment actions Permalink
    0
  • Akash,

    Are you making sure you are completely uninstalling the app from your device before redeploying it to your device from Xamarin Studio?

    Comment actions Permalink
    0
  • Michael,

    I uninstalled app on handset before to install new version. Can it possible to share dummy project which is working fine with Xamarin.Andoird or Xamarin.Forms?

    Comment actions Permalink
    0
  • Akash,

    Our Xamarin project on Github already contains a working sample for both iOS and Android for Xamarin. I would try integrating the sample on a non-Xamarin.Forms application, and getting that to work before starting on the Xamarin.Forms app.

    Also, make sure your device is up-to-date in terms of the Android OS, and making sure that the time/date is correct on the device. If either of those are incorrect, that could cause some funky issues with GCM.

    Comment actions Permalink
    0

Please sign in to leave a comment.