30 responses to “Android Login System using SQLite

  1. Vivek Nair

    August 1, 2013 at 2:40 pm

    Please tell me what is the use of these statements
    InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(txtUserName.getWindowToken(), 0);
    imm.hideSoftInputFromWindow(txtPassword.getWindowToken(), 0);

  2. Qutub Khan

    October 2, 2013 at 2:24 pm

    Thank you so so so so so Much dear friends…..

    • Rajitha

      October 2, 2013 at 2:43 pm

      Hi Qutub,
      Thanks for commenting.

  3. Ayas

    November 14, 2013 at 6:28 pm

    Sir, I trying this project but, i get error on.
    the message android.database.sqlite.SQLiteException: near “(“: syntax error: CREATE TABLE
    (_id integer primary key autoincrement,username text not null,password text not null)

    please tell me, where is the part make it error i’m newbe in android project


    • Rajitha

      November 14, 2013 at 8:15 pm

      Can you cpoy & paste the errorneous piece of code here?

      • Ayas

        November 15, 2013 at 8:28 am

        i just download it from the complete source, and then i run it, but error. the message android.database.sqlite.SQLiteException: near “(“: syntax error: CREATE TABLE
        (_id integer primary key autoincrement,username text not null,password text not null)

    • ayoubtmt

      February 7, 2016 at 9:13 pm

      you need the name of the table. Here it’s members

  4. prashant

    November 20, 2013 at 5:20 pm

    am get error on syntax error: CREATE TABLE(……….)

    Help me

    • prashant

      November 20, 2013 at 5:26 pm

      Ayas, try this code sure it will work

      private static final String DATABASE_TABLE = “users”;
      private static final String DATABASE_CREATE = “create table users (_id integer primary key autoincrement, ”
      + “username text not null, ”
      + “password text not null);”;

  5. Neda

    February 18, 2014 at 7:01 am

    Help me!!!
    memberactivity get me error :: The method register(String, String) is undefined for the type DBAdapter!

  6. patel monika

    March 3, 2014 at 1:08 pm

    i trying to create two dbtable in my app but problem is that 2nd table did’t created…
    my logcat error:
    03-03 02:13:51.402: E/SQLiteLog(1473): (1) no such table: TRADE
    plz help me if anybody know this:

    • Rajitha

      March 3, 2014 at 9:57 pm

      Don’t know whether you solved that.
      Please find this function.
      public void onCreate(SQLiteDatabase db) {
      When the function is executed, members table is created according to the example.

      private static final String DATABASE_CREATE = “CREATE TABLE (_id integer primary key autoincrement,username text not null,password text not null);”;

      If your first table is created, then you may need to

        update database version

      Eg. private static final int DATABASE_VERSION = 2;.

      • Suhana

        March 11, 2016 at 4:17 pm

        Hi i tried working this entire project … there is no error but the “application stops unfortunately ”
        Could you please help me out

  7. jose

    March 7, 2014 at 12:31 pm

    Please La Aplication Dowmload.. Help Me!!

  8. rajan sahni

    July 10, 2014 at 12:01 am

    unfortunately stop of application is occuring when i am running the code???

  9. Fernando Carrión

    July 15, 2014 at 8:45 pm

    Thanks for the help, just a couple of questions:

    What’s the use of context? I just want to get that part clear.

    Thanks again for your help

    • Rajitha

      July 15, 2014 at 9:22 pm

      Context is simply the current state of the application/object. You can get the context by invoking getApplicationContext(), getContext(), getBaseContext() or this (when in the activity class).
      Example usage:

      TextView tv = new TextView(getContext());
      ListAdapter adapter = new SimpleCursorAdapter(getApplicationContext(), ...);

      Its an entity that represents various environment data . Context helps the current activity to interact with out side android environment like local files, databases, class loaders associated to the environment, services including system-level services, and more.

  10. Daniel Dut A.

    August 4, 2014 at 12:59 pm

    How do I log out a user using this approach?

  11. Tony Ayebare

    August 4, 2014 at 1:58 pm

    how do i get to a new activity after a successful login

  12. Abhishek

    December 1, 2014 at 5:00 pm

    please use .zip format for source code distribution, as because .zip can be open in windows/mac/ubuntu without installing additional software. while Members.rar format will need to install additional software in all these platforms.

    • Rajitha

      December 1, 2014 at 6:44 pm

      Thanks Abhishek for your point. Yes, this is a mistake. I’ll upload .zip file now.

  13. fabian quiroga

    August 14, 2015 at 3:08 am

    gracias por compartir tu conocimiento en android

  14. Ghemar

    August 29, 2015 at 11:18 pm

    THANK YOU SO MUCH. i do some modification for strings and class name but it not a big deal for my running login system. ❤

  15. Raquel

    October 15, 2015 at 4:32 am

    Hi, I would like to know if this would work in different devices. For example, if I register in a device, could I access with that account to the app from another device without registering again?

  16. venkatesan

    November 21, 2015 at 7:42 am

    it shows unfortunately stopped

  17. Suhana

    March 11, 2016 at 4:19 pm

    It shpws unfortunately stopped … no error in the entire project

  18. Suhana

    March 11, 2016 at 4:20 pm

    It displays unfortunately stopped

  19. oscarr

    December 16, 2016 at 10:38 am

    no layout ?????????????????????????????????????


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: