Backendless Support
 
Waiting for user's response

Unable to resolve host "somehost.com": No address associated with hostname

Hi there,

I'm getting this exception: "java.lang.RuntimeException: Could not register device on Backendless server: Unable to resolve host "<somehost.com>": No address associated with hostname".

I assume it's because the url I'm using is behind a corporate firewall. Is there any way to provide authentication so that Backendless can access this?

Here's my code:

//Backendless application parameters

Backendless.initApp(this, Defaults.APPLICATION_ID, Defaults.SECRET_KEY, Defaults.VERSION );

Backendless.setUrl(Defaults.HOST);

findViewById( R.id.registerButton ).setOnClickListener( new View.OnClickListener()

{

@Override

public void onClick( View view )

{

//Register device for notifications channel

Backendless.Messaging.registerDevice( Defaults.SENDER_ID, Defaults.CHANNEL_NAME);

Backendless.Messaging.getRegistrations(new AsyncCallback<DeviceRegistration>() {

@Override

public void handleResponse(DeviceRegistration response) {

Toast.makeText(getApplicationContext(), response.getDeviceId() + "Device", Toast.LENGTH_SHORT).show();

}

@Override

public void handleFault(BackendlessFault fault) {

}

});

Intent intent = new Intent( getBaseContext(), PushActivity.class );

startActivity( intent );

}

} );

Leave a Comment

Comments (1)

photo
1

Hi Zach

As I see from the host name you've specified, you are using Backendless Pro? If yes- please let me know the version

Regards Anton