I have build an android application where I call the method insertSampleData()
from the onCreate()
method of main activity.
The problem is that onCreate()
method is called every-time the app is launched,
this results in filling my database with a lot of sample data.
I want to provide sample data only once when the application is installed. Can anyone please tell me how to do it ? Thanks a lot !
P.S: The method insertSampleData()
is used to insert sample data into Sq-lite database.