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,