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)
-
0
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. -
0
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.