API Log Files

Hello,

I am a total n00b and having some issues with some code I’m working on. I’m trying to save some geolocations via the API and it’s not working. Is it safe to assume that because my log files are blank I’m not even talking to the API?

Hello @Rodney_Chatman,

please provide steps to reproduce the issue, it can be small part of code or curl request

Hopefully this is what you’re asking for…

-----------------------gradle dependencies----------------------------------
dependencies {
implementation fileTree(dir: ‘libs’, include: [’*.jar’])
implementation ‘com.android.support:appcompat-v7:28.0.0-alpha3’
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
implementation group: ‘com.backendless’, name: ‘backendless’, version: '5.3.1’
testImplementation ‘junit:junit:4.12’
androidTestImplementation ‘com.android.support.test:runner:1.0.2’
androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’
}
----------------------setup backendless--------------------------------------------
public class ApplicationClass extends Application
{
public static final String APPLICATION_ID = “scrubbed”;
public static final String API_KEY = “scrubbed”;
public static final String SERVER_URL = “https://api.backendless.com”;

@Override
public void onCreate() {
    super.onCreate();

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

}

}
---------------------------------------------submit data to backendless-------------------------------------------------------

btnSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

            if (etName.getText().toString().isEmpty() ||
                    etMail.getText().toString().isEmpty() ||
                    etTel.getText().toString().isEmpty())
            {
                Toast.makeText(ContactInfo.this, "Please enter all details!",
                        Toast.LENGTH_SHORT).show();
            }
            else
            {
                ApplicationClass.contacts.get(index).setName(etName.getText().toString().trim());
                ApplicationClass.contacts.get(index).setNumber(etTel.getText().toString().trim());
                ApplicationClass.contacts.get(index).setEmail(etMail.getText().toString().trim());

                showProgress(true);
                tvLoad.setText("Updating contact...please wait...");

                Backendless.Persistence.save(ApplicationClass.contacts.get(index), new AsyncCallback<Contact>() {
                    @Override
                    public void handleResponse(Contact response) {

                        tvChar.setText(ApplicationClass.contacts.get(index).getName().toUpperCase().charAt(0)+"");
                        tvName.setText(ApplicationClass.contacts.get(index).getName());
                        Toast.makeText(ContactInfo.this,
                                "Contact successfully updated!", Toast.LENGTH_SHORT).show();
                        showProgress(false);

                    }

                    @Override
                    public void handleFault(BackendlessFault fault) {

                        Toast.makeText(ContactInfo.this, "Error: " + fault.getMessage(),
                                Toast.LENGTH_SHORT).show();
                        showProgress(false);
                    }
                });

            }

        }
    });

I found my issue. It would appear that my emulator didn’t have internet access. The code and everything else was fine. Total n00b error, thank you for your assistance and for a GREAT product.