Apologies in advance I am very new to coding and self taught so I am finding myself running in to lots of roadblocks working through things (but also lots that is thankfully very intuitive).
I am working in android studio in Java
I have done all the other Crud Rookie missions but cant update object using API.
My API objects/Java Class have a name and surname only currently
There is an example posted by Mark Piller 1st Sep 2019 that provides the Java code for updating the name for someone in a Person class (has age, name, birth date) but is set up to modify the name, so i imagine my simpler class (which has name) should be fine too.
when i try use the code as below (just copied and pasted from the above Mark Piller page) :
final AsyncCallback<Person> updateResponder = new AsyncCallback<Person>() {
@Override
public void handleResponse(Person updatedPerson) {
Log.i(TAG, "Person's name after update " + updatedPerson.name);
}
@Override
public void handleFault(BackendlessFault fault) {
Log.e(TAG, fault.getMessage());
}
};
Backendless.Data.of(Person.class).findLast(new AsyncCallback<Person>() {
@Override
public void handleResponse(Person person) {
Log.i(TAG, "Loaded object. Name - " + person.name);
person.name = "Frankie";
Backendless.Data.of(Person.class).save(person, updateResponder);
}
@Override
public void handleFault(BackendlessFault fault) {
Log.i(TAG, fault.getMessage());
}
});
I get an issue with the TAG part, I have no idea what a tag is at all and cant find it through searching online.
What should i change the TAG part to, or is it not meant to be changed and the error is more deep than this?
Thanks in advance for your advice