Home > Mobile >  Android sqlite database connection
Android sqlite database connection

Time:11-21

Datebasehelper inside onCreate method can create a database for the first time to use, so I create the database directly to verify the login is not feasible? Then I use visualization tools to create added some information in the database, to log in again, the oncreate method do not be called again, log in nature is not called, what the hell?

CodePudding user response:

In general database and app is necessary existence, not to say that you open the app to establish a database and then do a table, you should be doing an exercise in the local database, now you can do it in the application database initialization, and then in the login authentication on the database as the query operations

CodePudding user response:

That is a special application to do the database initialization, and then it is ok to login and registration, so that the login page what all need not write the onCreate method?

CodePudding user response:

Are you in learning Android? I suggest you take a look at the Android systemic books, you thought have a problem now, mobile terminal is not necessary to connect to the database, the background connections, mobile client request interface, if you need the sqlite local storage data, encapsulation processing class, where the need to add and delete rows, you said the login registration must be completed to connect to the database in the background, the mobile end only need a callback interface, you look at the request of the network and third-party interface API, and then practice

CodePudding user response:

Just started to learn, to work on a project with my classmates, I don't really understand the Android connect to the database in the background, only read the book "the first line of code", but not completely finished, I systematically understand once again, thank you

CodePudding user response:

Each project is more than one application subclass, application subclass rewrite inside onCreate method, this method is to apply a startup will call for the database initialization, the login page onCreate do view inside binding, otherwise how to obtain the EditText in value
  • Related