Dear friends,
Somebody knows tutorials and examples about implementing a Chat with Corona Cloud ?
Thank you!
Dear friends,
Somebody knows tutorials and examples about implementing a Chat with Corona Cloud ?
Thank you!
I am working on it but not yet completed.
I added show(“chat”) to gameNetwork_corona_prototype.lua and it worked well to make a chatroom and post/get a message but it failed to getUsers with “We’re sorry, but something went wrong (500)”. Has anyone encountered the same problem?
I also failed for userB to find the chatroom created by userA. Is it an expected behavior?
local json = require ( “json” )
local CC_Access_Key = Your_Access_Key
local CC_Secret_Key = Your_Secret_Key
local gameNetwork = require( “gameNetwork_corona_prototype” )
local params = { accessKey = CC_Access_Key, secretKey = CC_Secret_Key, }
local chatRoom = gameNetwork.cc.chatRoom
local userID = PasteIDForTest
local chatroomID = PasteIDForTest
gameNetwork.init( “corona”, params )
local function showChat()
– the chat room listener
local chatRoomListener = function( event )
local chatRoom = json.decode( event.response )
print( "Chatrooms: ", event.response )
end
chatRoom.setListener( chatRoomListener )
chatRoom.getAll()
--chatRoom.new(“chatroomA”)
--chatRoom.delete( chatroomID )
--chatRoom.addUser( userID, chatroomID )
--chatRoom.sendMessage( chatroomID, “Hello Hello” )
--chatRoom.removeUser( userID, chatroomID )
--chatRoom.getHistory( chatroomID )
--chatRoom.getUsers( chatroomID )
end
gameNetwork.showChat = showChat
gameNetwork.show(“chat”)
I am working on it but not yet completed.
I added show(“chat”) to gameNetwork_corona_prototype.lua and it worked well to make a chatroom and post/get a message but it failed to getUsers with “We’re sorry, but something went wrong (500)”. Has anyone encountered the same problem?
I also failed for userB to find the chatroom created by userA. Is it an expected behavior?
local json = require ( “json” )
local CC_Access_Key = Your_Access_Key
local CC_Secret_Key = Your_Secret_Key
local gameNetwork = require( “gameNetwork_corona_prototype” )
local params = { accessKey = CC_Access_Key, secretKey = CC_Secret_Key, }
local chatRoom = gameNetwork.cc.chatRoom
local userID = PasteIDForTest
local chatroomID = PasteIDForTest
gameNetwork.init( “corona”, params )
local function showChat()
– the chat room listener
local chatRoomListener = function( event )
local chatRoom = json.decode( event.response )
print( "Chatrooms: ", event.response )
end
chatRoom.setListener( chatRoomListener )
chatRoom.getAll()
--chatRoom.new(“chatroomA”)
--chatRoom.delete( chatroomID )
--chatRoom.addUser( userID, chatroomID )
--chatRoom.sendMessage( chatroomID, “Hello Hello” )
--chatRoom.removeUser( userID, chatroomID )
--chatRoom.getHistory( chatroomID )
--chatRoom.getUsers( chatroomID )
end
gameNetwork.showChat = showChat
gameNetwork.show(“chat”)
Hi all, I’ve been fighting for two weeks with the chat, I was able to create a new chat but can not understand how to send and receive new messages, this service may not work yet? Someone did it? It does not work “chatRoom.sendMessage( chatroomID, “Hello Hello” )”
Hi all, I’ve been fighting for two weeks with the chat, I was able to create a new chat but can not understand how to send and receive new messages, this service may not work yet? Someone did it? It does not work “chatRoom.sendMessage( chatroomID, “Hello Hello” )”