hey guys am trying to save object into noteRealmClass but am getting an error which says:
Unable to match class for part: 'Lrx/Observable;
my method:
public void SendNote(){
// saving objects
NotesRealmClass contact = new NotesRealmClass();
contact.setTitle(“Test Title”);
// save object synchronously
// Contact savedContact = Backendless.Persistence.save( contact );
// save object asynchronously
Backendless.Persistence.save(contact, new AsyncCallback<NotesRealmClass>() {
public void handleResponse(NotesRealmClass response) {
// new Contact instance has been saved
Toast.makeText(getBaseContext(), “sent”, Toast.LENGTH_SHORT).show();
}
public void handleFault(BackendlessFault fault) {
Toast.makeText(getBaseContext(), "" + fault.getMessage(), Toast.LENGTH_SHORT).show();
// an error has occurred, the error code can be retrieved with fault.getCode()
}
}); }
the above code is working fine for mu other classes but dint working for this class , any idea guys ??whats wrong here ?
What does the “NotesRealmClass” class look like?
by saying look you mean the schema ? if yes then here you go
No, I meant “class” as in a programming language…
oh okay here’s mine class :
public class Note extends RealmObject {
@PrimaryKey
private String objectId;
private String Title;
private String Story;
private String Location;
private String Time;
private String NoteType;
private String Publisher;
private String Recepient;
private String ChannelId;
private Date created;
private boolean IsImageExists,Viewed;
private String FileUrl;
private boolean isDocExists;
private String DocFileUrl;
//Note object id
public String getobjectId() {
return objectId;
}
public void setobjectId( String objectId ) {
this.objectId = objectId;
}
//Note Location
public String getLocation() {
return Location;
}
public void setLocation( String Location ) {
this.Location = Location;
}
//Note Story
public String getStory() {
return Story;
}
public void setStory( String Story ) {
this.Story = Story;
}
//Note Title
public String getTitle() {
return Title;
}
public void setTitle( String Title ) {
this.Title = Title;
}
//Note Date
public String getTime() {
return Time;
}
public void setTime( String Time ) {
this.Time = Time;
}
//Note type
public String getNoteType() {
return NoteType;
}
public void setNoteType( String NoteType ) {
this.NoteType = NoteType;
}
//Note publisher
public String getPublisher() {
return Publisher;
}
public void setPublisher( String Publisher ) {
this.Publisher = Publisher;
}
//Note TimeStamp
public Date getCreated() {
return created;
}
public void setCreated( Date created ) {
this.created = created;
}
//Note imageExists
public boolean getIsImageExists() {
return IsImageExists;
}
public void setIsImageExists( boolean IsImageExists ) {
this.IsImageExists = IsImageExists;
}
//Note imageExists
public String getFileUrl() {
return FileUrl;
}
public void setFileUrl( String FileUrl ) {
this.FileUrl = FileUrl;
}
//Note Viewed
public boolean getViewed() {
return Viewed;
}
public void setViewed( boolean Viewed ) {
this.Viewed = Viewed;
}
//Note recipient
public String getRecepient() {
return Recepient;
}
public void setRecepient( String Recepient ) {
this.Recepient = Recepient;
}
//Note docFileUri
public String getDocFileUrl() {
return DocFileUrl;
}
public void setDocFileUrl( String DocFileUrl ) {
this.DocFileUrl = DocFileUrl;
}
//Note isdocFileUri
public boolean getIsDocExists() {
return isDocExists;
}
public void setIsDocExists( boolean isDocExists ) {
this.isDocExists = isDocExists;
}
//Note channelId
public String getChannelId() {
return ChannelId;
}
public void setChannelId( String ChannelId ) {
this.ChannelId = ChannelId;
}
}
apologies ! my problem was not occurring by backendless it was Realm
well it turns out that its a fault in realm , according to this https://www.bountysource.com/issues/29233605-java-lang-noclassdeffounderror-rx-observable-in-0-87-0 , for fixing it we just have to put compile ‘io.reactivex:rxjava:1.0.16’ in our grade file
well thanks Mark for your efforts i really appreciate this