Hi.
I am using code generation and get stuck at “waiting to <my friend name> to accept invitation”
I had set up google api key on backend console and set value for project number in Defaults.java. Then, I run the app on 2 emulator (I am using genymotion). I set “ronaldo” name at first emulator and messi at second emulator.
At that time, there are 2 users (ronaldo, messi) on table ChatUser, but the value of deviceId column is “unknown” string for both 2 chat user.
In Backendless console, it shows 1390 api call on 20-Apr
Please help me.
Hi toan,
Please, first verify this case on real device and try to send notification from console.
Regards,
Denys
It is very difficult.
This is what I did.
- I run the app (generation chat code) on real device (Android 5.0)
- I set a name (lucky). I check ChatUser table and there is “lucky” user on it, and value of deviceId is a number (for example: 1234456789) -> the app can get device id on real device, but cannot get deviceid id on emulator.
3.I search google and go to https://backendless.com/feature-66-send-pubsub-messages-from-backendless-console/ - I follow the article ad get stuck at step 2. I input some text on Message text area (For example: Welcome to my app) and press Publish button.
- It notifies Message scheduled, but I don’t see anything in the message table.
Please help me.
PubSub are not pushes, in spite of the fact of using common method “publish()” for sending them. These features use different mechanisms for messaging.Here is a link to webinar about push notifications for android: https://backendless.com/push-notification-webinar-recording-is-available/
Also here you have some docs describing registration process and sending push:
https://backendless.com/documentation/messaging/android/messaging_push_notification_setup_androi.htm - push notifications setup
https://backendless.com/documentation/messaging/android/messaging_publish_push_notifications.htm - push notifications publishing ( please make sure to send all 3 necessary headers when publishing, you can find these headers in table “Push notifications headers” )
Hope it helps,
Alex
Hi all.
Only one more question.
I test this app on 2 real device, there are 2 user on ChatUser table with different device id.
On Samsung device, I set name MrSamSung. On Asus device, I set name MrAsus.
On Samsung device. I select MrAsus to chat. However, It always show waiting to <my friend name> to accept invitation
I am using generation I also read http://support.backendless.com/t/how-to-build-an-android-chat-application
I just want to know how Mark Piller can run the app.
At the step “waiting for user to accept invitation” first device sends push notification to the second and waits until second device receives it and confirms chat. As I understand, you’re not able to receive push on the second device. So I assume that probably you have problems with application configuration. Verify that your google app is properly configured, messaging service is enabled and you use correct keys. Also check that your backendless app is configured with google app key and android app has correct gcm_sender_id in Defaults class.