Google account sign in with Account picker
Hello everyone today in this topic I'll show to you about Google account Sign In with account picker in Sketchware. This is not actually google sign in method. If you need this, follow this steps:
1. Create a new project and enable Firebase and setup it. Add a linear vertical and add a button inside this & set gravity to center.
2. Go to on button click event and use this code with asd block for picking google account from your phone.
Code:Intent intent = com.google.android.gms.common.AccountPicker.newChooseAccountIntent(null, null, new String[]{"com.google"}, false, null, null, null, null);
startActivityForResult(intent, 94);
3. Go to component area and add a file picker component for set after picking account. and firebase auth for creating account.
4. Add on file picked component and add this code with asd block for transferring data into a moreblock named onAccountPicked.
};
break;
Code:};
break;
case 94:
try {
_onAccountPicked(_data.getStringExtra(android.accounts.AccountManager.KEY_ACCOUNT_NAME).toString(), _data.getStringExtra(android.accounts.AccountManager.KEY_ACCOUNT_TYPE).toString());
} catch (Exception e) {
};
if (false) {
5. Create on account with to string email & password and create 2 string for saving email & password. and set login with email & Password block for try to login
It says an internal error hast occurred [CONFIGURATION_NOT_FOUND]
ReplyDelete