java - Android app with 2 user type login using parse.com -


I'm trying to create an Android app on which there are two user types with parse.com I know that log How can I create a page for a user in the page but I am getting a way to create it for two user types. This is my code which is trying to work it.

  Login.setOnClickListener (New OnClickListener) {Public void onClick (see arg0) {mProgress.show (); // Retrieve text from editing text txtUsername = username.getText (). ToString (); TxtPassword = password.getText (). ToString (); ParseUser.logInInBackground (txtUsername, txtPassword, New LogInCallback () {Public Zero (ParseUser user, ParseException e) {if (user = null & amp;! & User.get) {mProgress.dismiss (); intent = New Intent (LoginActivity., Administrator Page Category); STA rtActivity; Toast.maketext (), "Logged successfully as Administrator", Toast.LnnGHLLG) Show (); End ( );} And (if (user! = Null & user) {mProgress.show (); intent = new intent (login activity). , UserPage.class; startActivity; Toast. GetApplication (), "Successfully logged in", Toast.LnnHH_LOG) Show (); Finish ();} and {mProgress.dismiss (); Toast MakeApplicationContext (), "No such user", Toast.LnnHHLLG) Show (); username.setText (""); password.setText ("");}}}});}}}; After the text "itemprop =" lesson "> 

after that you have a successful login after another for the _User class of the Boolean type

You can add columns to
  if (!; User.getBoolean ("isAdmin") == true) user = null & Amp; Examine> 

Like

  Public Zero (ParseUser user, ParseException e) {if (user = null & amp; user. GetBoolean ("isAdmin") == true))) {MProgress.dismiss (); Intent = Intentional Intent (Login Activity. This, Administrator Page.); StartActivity; Toast. MakeApplicationContext (), "Logged in successfully as administrator", Toast.LnnGH_LANG). Show (); End(); } And (if (user! = Null & user) {mProgress.show (); intent = new intent (login activity, this is UserPage.class); startActivity; toast. GetApplication () , "Successfully logged in", Toast.LnnHH_LOG) Show (); Finish ();} and {mProgress.dismiss (); Toast.makeText (getApplicationContext (), "Any such user", Toast.LENGTH_LONG) show (); Username.setText (""); password.setText ("");}}  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -