![]() ![]()
Lets break it down in smaller bits Generating QR Codes #Whatsapp web scan qr code codeIn both, when a message is received, the interface is updated to show that message and who wrote it.įor the Web/Server implementation we use Play Framework 2.5.6 "Steamy", you can get it at the official Play Framework site, or just get the complete source code of the WhatsApp Clone Play Project Here. #Whatsapp web scan qr code androidThe server receives the message, checks the list of QR Code UUIDs that it has, and then uses the WebSocket associated with it to notify the browser of the username it should use, and refresh the interface with the chat windoe and hide the QR Code bit.Īt this point both the Android and Web App use GET requests to send messages to the server, and receive new messages either through the WebSocket (in the case of the Web Client) or through Firebase Cloud Messaging (in case of the Android Client). Doing the QR Code scanning, the Android App gets the UUID that is embedded on the QR Code and sends a message to the server saying : OK, this UUID that I just scanned, belongs to this Username. Once the User selected a Username on the Android App, the can start chatting away, or can at any moment do the QR Code scanning. This is not at all secure, because it would be easy to impersonate another person, but then again, this is just a Proof of Concept. This just stores the Username on the App so that everytime we send a message using the App, it sends the username of the person who wrote that message. #Whatsapp web scan qr code freefeel free to implement this if you like) and sign in. So, unlike the WhatsApp Android App, we require the user to set his username ( we make no checks to see if one already exist, or anything like that. To receive messages, we will be using Firebase Cloud Messaging, because it saves us time in implementation, because we won't need to keep sockets and whatnot open with the server, and monitor them for disconnects and other problems, and because it is just the best way for this Proof of Concept. which is basically lacking, for simplicity sake, and sending messages to the server) using normal GET requests to the Play2 Application. On the Android side of things, the Android App will do most of the communications ( like authentication.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |