Android Question b4j server and "game player actions"

LucaMs

Expert
Licensed User
Longtime User
Which may be the best solution for this example (using a server B4J):

many poker tables "connected" to the server;
a player raises x$;

I guess I have to make a call similar to this from the example "Upload files from your app to your B4J B4A server over the internet":
B4X:
PrivateSub btnSendMessage_Click
Dim j As HttpJob
j.Initialize("msg", Me)
j.PostString(ServerLink & "?type=text", txtMessage.Text)
End Sub

replacing the txtMessage.Text with some text-command,
and then manage everything on server through those "Handler" (classes).


But maybe I should use: Custom WebSocket Based Push Framework
or a different more complete solution (Erel was referring to the creation of an API for the application).


Thanks in advance for your answers
 

LucaMs

Expert
Licensed User
Longtime User
If the players need to be connected to the server and receive notifications then you need to use WebSockets. It is quite simple. Learn this library: http://www.b4x.com/android/forum/threads/websocket-client-library.40221/#content


I'm studying all your "b4j [server]" threads

(a big problem for me is that I do not know Ajax and JQuery that you used in the Login example. It would be nice to be able to use only b4j and probably I will succeed using only Android for GUI).

I have read that there is also a way to use PHP:
Writing PHP applications with Maven and Jetty

but I am sure that you know it for a long time


Many thanks, Erel.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…