trying to send a user-user message. both sides have oneSignal userids.
I print the notification table before sending the post to prove I reached that far. never get the send print. Nor to either the sendSuccess or sendFailed fire. I have the log level set to 5 (debug) and get nothing from it.
function postDeviceNotification(sendToID, message, sData) local function sendSuccess(jData) native.showAlert("Message Notification", "Message Sent: " .. json.encode(jData), { "OK" } ) end local function sendFailed(jData) native.showAlert("Message Notification", "Message Failed: " .. json.encode(jData), { "OK" } ) end local notification = {} notification["include\_player\_ids"] = { sendToID } notification["contents"] = {["en"] = message } notification["priority"] = 10 if (sData) then notification["data"] = { mime.b64(sData) } end print("in postDeviceNotification: notification=") print\_r(notification) OneSignal.PostNofication(notification, sendSuccess, sendFailed) print("post send")
adb logcat shows:
: sData={“phase”:“iAck”,“deviceOneSignalID”:“e17eeebf-3640-460f-81a4-673ea869e99f”,“deviceSN”:“M26-582d196f”}
11-17 08:41:37.805 4483 4499 I Corona : in postDeviceNotification: notification=
11-17 08:41:37.806 4483 4499 I Corona : table: 0xdfb317c0 {
11-17 08:41:37.809 4483 4499 I Corona : [include_player_ids] => table: 0xdfb317c0 {
11-17 08:41:37.812 4483 4499 I Corona : [1] => “a9a53166-7d43-498e-8953-51d4d423086c”
11-17 08:41:37.813 4483 4499 I Corona : }
11-17 08:41:37.814 4483 4499 I Corona : [contents] => table: 0xdfb317c0 {
11-17 08:41:37.814 4483 4499 I Corona : [en] => “iAck”
11-17 08:41:37.815 4483 4499 I Corona : }
11-17 08:41:37.815 4483 4499 I Corona : [data] => table: 0xdfb317c0 {
11-17 08:41:37.816 4483 4499 I Corona : [1] => “eyJwaGFzZSI6ImlBY2siLCJkZXZpY2VPbmVTaWduYWxJRCI6ImUxN2VlZWJmLTM2NDAtNDYwZi04MWE0LTY3M2VhODY5ZTk5ZiIsImRldmljZVNOIjoiTTI2LTU4MmQxOTZmIn0=”
11-17 08:41:37.817 4483 4499 I Corona : }
11-17 08:41:37.817 4483 4499 I Corona : }
hangs here. note: i am encoding sData when placing it into [data]. I’ve left it as sData and encoded it with no difference.
I called IdsAvailableCallback prior to this to get the device’s id and stored it. This is the initial handshaking between two devices. Nothing is received by the sendTo device and no message is showing in the oneSignal dashboard.
any suggestions?
thanks in advance