After successfully JSON parser stored into SQLite for offline storage after that retrieve the data from SQL lite when the internet is not available in android. Anyone tells me what is the process to do store JSON data into SQLite.
I am using Expandable listview for two model one is header and child model. how to create sqlite by using this Model.
Header Model:
import java.util.ArrayList;
public class Item {
private String mainProductName;
private String productImage;
private ArrayList<SubItem> subItems;
private String productid;
public ArrayList<SubItem> getSubItems() {
return subItems;
}
public void setSubItems(ArrayList<SubItem> subItems) {
this.subItems = subItems;
}
public String getMainProductName() {
return mainProductName;
}
public void setMainProductName(String mainProductName) {
this.mainProductName = mainProductName;
}
public String getProductImage() {
return productImage;
}
public void setProductImage(String productImage) {
this.productImage = productImage;
}
public String getProductid() {
return productid;
}
public void setProductid(String productid) {
this.productid = productid;
}
}
Child Model:
public class SubItem {
private String inProductId;
private String vcProductName;
public String getInProductId() {
return inProductId;
}
public void setInProductId(String inProductId) {
this.inProductId = inProductId;
}
public String getVcProductName() {
return vcProductName;
}
public void setVcProductName(String vcProductName) {
this.vcProductName = vcProductName;
}
}
Glad to appreciate Thanks