Support Topics Documentation Slack YouTube Blog

Stuck at "waiting for user to accept chat request" in generated chat app

I just downloaded an auto-generated sample chat app for android studio from the backendless console. I have followed all the instructions for android setup and I have the app running on 2 different phones. The problem is that when i attempt to start chatting with the other chat user the app get stuck at the progress dialog that says " waiting for “the other chat user” to accept chat request" but none of the devices receives any request. Kindly assist me with this issue. I have attached the auto-generated sample as well

backendless-codegen (11).zip (1.42MB)

I may have found the problem. I realized my devices aren’t getting registered in backendless console despite using the code below

Backendless.Messaging.registerDevice(Defaults.GOOGLE_PROJECT_ID, Defaults.DEFAULT_CHANNEL, new AsyncCallback<Void>() {
public void handleResponse(Void response) {
Toast.makeText(ViewSingleRoninActivity.this, “Registered”, Toast.LENGTH_SHORT).show();
// DeviceRegistration devReg = Backendless.Messaging.getDeviceRegistration();
// Toast.makeText(ViewSingleRoninActivity.this,devReg.getDeviceId(),Toast.LENGTH_SHORT).show();

public void handleFault(BackendlessFault fault) {
    Toast.makeText(ViewSingleRoninActivity.this, fault.getMessage(), Toast.LENGTH_SHORT).show();

I have created and added my api key to the backendless console, added my project number , added all the requirements in my manifest but i still can’t see my devices listed. Kindly assist me with this

Do you receive any error when try to register device?

Hi Kate, Thank you for the response. I was finally able to register my devices. I only got it to work after I started the vpn service on my devices. I currently live in China and google services don’t work unless you have a vpn. I’m guessing I couldn’t get my api services started with my app until I had the vpn on my devices. I also realized that without the vpn my push notifications are sent but not received until my vpn is enabled. Is there possibly a work around for that?

Hi Kwao,

Since Android push notifications use Google APIs, I think there’s no workaround except the one you’re using. Unfortunately, we can’t do anything to your country’s restrictions.