setUrl sentence

Hello,

Under Android environment I can’t execute from the emulator any Backendless statement since apparently Backendless.setUrl (global.SERVER_URL) indicating SERVER_URL = “https://api.backendless.com” does not cause the expected result.

This does NOT happen to me running the app from a physical device as the statements are executed correctly.

The funny thing is that in IOS I have no problem either from the emulator or from the physical device.

Error obtained:

2021-06-22 12:59:23.301 1634-1634/apps.jmm.cat.sharingneeds E/SharingNeeds:: Error al grabar Unable to resolve host “api.backendless.com”: No address associated with hostname

Init sentences + save sentence :

public static final String APPLICATION_ID = “3A59429E-42BC-7539-FF2C-DB06D1A68900”;
public static final String API_KEY = “”;
public static final String SERVER_URL = “https://api.backendless.com”;

Backendless.setUrl( SERVER_URL );
Backendless.initApp( getApplicationContext(), APPLICATION_ID, API_KEY );

HashMap testObject = new HashMap<>();
testObject.put( “foo”, “bar” );
Backendless.Data.of( “DatosSolicitudesEmpleos” ).save(testObject,
new AsyncCallback() {

        @Override
        public void handleResponse(Object response) {
            Log.e( "SharingNeeds: ", "Registro grabado !! " );
        }

        @Override
        public void handleFault(BackendlessFault fault) {
            Log.e( "SharingNeeds: ", "Error al grabar " + fault.getMessage() );
        }
    });

Thanks,

Hello @joan-martinez

The error means that your emulator has misconfigured the network, and it cannot resolve the domain. Try open the browser on the emulator and open some other domain https://backendless.com for example.

@joan-martinez also I have removed api-key from your question and made the topic public. Because direct messages available only for paid PRO and Managed customers

Hi,

I have updated the DNS for IPv4 or IPv6 values ​​in the advanced network configuration of my MAC with the new addresses 8.8.8.8 and 8.8.4.4. Now the Android emulator in Android Studio works properly.

Thanks a lot !!!