Base solution for your next web application
Open Closed

Chat APIs #8633


User avatar
0
cictan created

We are trying to build a android native app using zero APIs, we found there are three APIs like: /api/services/app/Chat/GetUserChatMessages

but we couldn't find the send/read API, e.g. SendChatToUser, and we only found a function like this one: public async Task SendMessageToClient(IReadOnlyList<IOnlineClient> clients, ChatMessage message)

Do we have to develop our own APIs for this? Thanks,


2 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @cictan. Since web and mobile uses same references (for example: *.Application.Shared), there are no mobile implementations of some of the interfaces. Chat is one of them. It is implemented in https://github.com/aspnetzero/aspnet-zero-core/blob/master/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Chat/SignalR/SignalRChatCommunicator.cs for web projects. And not implemented for mobile.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @cictan

    Chat messages are send using SignalR in web app. For example, this is the one for ASP.NET Core & JQuery verison, see https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/wwwroot/Common/Scripts/Chat/chat.signalr.js#L182. Angular version has a similar implementation.

    For your Android Native app, you can write an API and use it.