Base solution for your next web application
Open Closed

Chat from App #2697


User avatar
0
felixbeltran created

Hi,

I have an ASP.NET ZERO application and i need to send and receive chat messages to / from a mobile App developed with Xamarin. Is there a way to implement such chat service between the Zero Web application and a mobile App? Can we use the same SignalR services?

Please advice.

Thanks, Felix.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I'm not experienced in Xamarin but you can use Xamarin's Signalr client to connect ChatHub on your web app. This document can help you <a class="postlink" href="https://components.xamarin.com/view/signalr">https://components.xamarin.com/view/signalr</a>.

    Please let us know if you face any problems.

    Thanks.

  • User Avatar
    0
    felixbeltran created

    Hi,

    Thanks for the replay. We are having problems with the authorization, because, since this is an App there is no session on the server. The error message is: "Abp.Authorization.AbpAuthorizationException" What should we do? I'm attaching a file with the error detail.

    Thanks. Felix

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    First you need to get a token from server. This is an example for Angular2 template <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Angular#token-based-authentication">https://aspnetzero.com/Documents/Develo ... entication</a>.

    You can find the correct one for your template here <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide">https://aspnetzero.com/Documents/Development-Guide</a>. After selecting your template type, the following document will have Token Based Authentication section.

    Then when calling chat hub via SignalR from your Xamarin app, you need to include this token. I don't know how to do in in Xamarin but I think it should not be hard.

    Thanks.