-3

Hey guys I am new in android development. I got a problem in deleting the specific data from the active android.

edited * from sugar to active android thanks in advance

chase
  • 5
  • 3

1 Answers1

0

I am assuming that you are talking about Active android. If yes then here is the solution for your problem. You can make a class that represent table's data by extending Model.

Lets say you have a Class named as AQIData that extends Model

And lets say you have a attributes named location_params in it which represent column name of the table.You can delete the table data using where clause like below. Just make create a static method named clearData() and let this method ask for argument by which you can delete the specific data matching with the argument.

 public static void clearData(String location_params) {
        new Delete().from(AQIData.class).where("location_params =?", location_params).execute();
    }

hope this will help you.

Ram Mandal
  • 1,899
  • 1
  • 20
  • 35