• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When does .db file gets created ?

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we extend the contentprovider and add the provider tag in androidmanifest.When exactly the .db file gets created on mobile.That means whats the exact time when it gets created , who creates that file ?

Thanks in advance.
 
Tim Holloway
Saloon Keeper
Posts: 18362
56
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The database is constructed by a user-written resource provider using database service method call. And it's bad form to think of it as a ".db file". Whether it's in a file or not is a low-level architectural characteristic that has no real bearing on how the database is intended to be used at the application level.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an example of a non-DB provider, the android.database.MatrixCursor class makes it easy to create in-memory providers - useful for Live Folders, for example.
 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:The database is constructed by a user-written resource provider using database service method call. And it's bad form to think of it as a ".db file". Whether it's in a file or not is a low-level architectural characteristic that has no real bearing on how the database is intended to be used at the application level.

Even If you do not call any service call on contentprovider the files gets created automatically , its not all dependent on any call you make.The only thing you have to keep in mind that you need to declare it in the manifest file using provider tag.

My Question is when you debug this kind of program , what is the exact time that this db gets created.And who invokes onCreate method for ContentProvider.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic