#AdditionalJar: ParseNative
#if JAVA
import com.parse.LogInCallback;
import com.parse.ParseException;
import com.parse.ParseUser;
public void parseLogin (String username,String password) {
ParseUser.logInInBackground(username, password, new LogInCallback() {
public void done(ParseUser user, ParseException e) {
if (user != null) {
ParseUser currentUser = ParseUser.getCurrentUser();
String userID = currentUser.getObjectId().toString();
return currentUser, userID;
// Hooray! The user is logged in. Return the currentUser & objectId back to B4A
} else {
// Signup failed. Return the ParseException to B4A to see what happened.
return e;
}
}
});
}
#End if