my app currently has a share button which upon click opens a bottom navigation that slides up from the bottom of the android os screen like this by Jim Blackler: Share bottom slide-in menu

my current google sign-in pop window to choose an account: my current google sign-in pop-up window

what I want: just like the share bottom slide-in google sign-in/account chooser

The code I use to do the share, below, I have not successfully changed into a google sign-in prompt to match the share bottom nav slide-in prompt.

this is the Share code I use from this website here answer by Jim Blackler:

final Intent intent = new Intent(Intent.ACTION_SEND);
        intent.setType("text/plain");
        intent.putExtra(Intent.EXTRA_TEXT, pageUrl);

        try {
          startActivity(Intent.createChooser(intent, "Select an action"));
        } catch (android.content.ActivityNotFoundException ex) {
          // (handle error)
        }

my current google sign-in code:

variable:

private GoogleSignInClient client;

in "onCreate()" method:

GoogleSignInOptions options = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestEmail()
                        .build();

        client = GoogleSignIn.getClient(this,options);

in onNavigationItemSelected method:

Intent intent = client.getSignInIntent();
            startActivityForResult(intent,123);

Your help and time will be greatly appreciated.

0

There are 0 best solutions below