I have an Activity Med.java having the following code:
this.deleteDatabase(db.getDatabaseName());
And another activity OrderDetails.java. But in this activity I have to add the class name also:
OrderDetails.this.deleteDatabase(db.getDatabaseName());
And another activity extending Fragment:
getActivity().deleteDatabase(db.getDatabaseName());
The first two are working fine. But i want to know why in the second activity I have to add the class name. And the third fragment code, it is not working at all. Please help