I want to show in Signup Part of My app.In signup if user enter duplicate name then "username already exists " error msg should be shown.anyone help me.....??
Asked
Active
Viewed 699 times
-6
-
Help : You should create a web service & write business logic for webservice integration in Android Application. – Arjun Nov 03 '15 at 05:54
-
Tell us what have you tried so far and what error do you get ... – Varun Verma Nov 03 '15 at 05:55
-
I did't try anything – Vidya Nov 03 '15 at 06:00
-
Possible duplicate of [How do I check in SQLite whether a table exists?](http://stackoverflow.com/questions/1601151/how-do-i-check-in-sqlite-whether-a-table-exists) – Iamat8 Nov 03 '15 at 06:01
-
Means you want to set Error Message in editText? – Chirag Savsani Nov 03 '15 at 06:23
2 Answers
0
Try this,
Toast.makeText(MainActivity.this, "Username already exists.", Toast.LENGTH_SHORT).show();

Parth Bhayani
- 1,894
- 3
- 17
- 35
0
//If username Already Exists
if (userName.equals(storedUsername)) {
Toast.makeText(getApplicationContext(),
"Username Already Exists!!!", Toast.LENGTH_LONG)
.show();
return;
}

Vidya
- 3
- 6