I am working on an Android app, purpose of app is to publish Ads by taking some ads info like Ad Title, Ad Description and Ad Image Path (Image Path can be many).
I am using realm database for this operation. I am getting difficulty when saving these information into database. I want to know, how can I save multiple image path with one ad entry?
My Fields are:
Ad Title
Ad Description
Ad Image Path (Multi)
This is my RealmObject Class
public class FacebookAds extends RealmObject {
@PrimaryKey
@Index
private int id;
private String title;
private String tags;
private String description;
private String imageName; // How to use this for multiple image Path
public FacebookAds() {
}
public String getImageName() {
return imageName;
}
public void setImageName(String imageName) {
this.imageName = imageName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}