androidxamarin.formsgoogle-play-consolesubmission

Issue publishing Xamarin Forms Android app as bundle to Play Store - docs out of date


I want to publish my Xamarin Forms Android app, as a bundle, to the Play Store for initial testing and I'm following the Xamarin instructions 'Publishing to Google Play' for Visual Studio for Mac.

I create a keystore and the next step is to create a Google API project in my Google Play Console (where I had already created my app), to get an OAUTH client ID and secret for Visual Studio to use. Problem is, the Xamarin documentation dated 8 July 2021 is out of date and, despite massive Googling, I'm lost trying to figure out an equivalent in the new Google Play Console layout.

I reach API Access on the Setup dropdown, and under Linked Google Cloud project I select Create new project. Here the options are to Configure OAUTH consent screen and/or Create new service account.

I try Configure OAUTH consent screen but the prompts do not seem relevant to a publishing scenario and require Google verification, which seems over the top.

Create new service account appears possibly more relevant and I try that, on the Google Cloud Platform. After creating a new service account, I'm prompted to 'Grant this service account access to Google Play Console Developer so that it has permission to complete specific actions on the resources in your project', which sounds promising.

The options here are Select a role and Add condition. This is where I have no idea how to proceed further. Am I on the wrong track, or if on the right track, what should I do next?


Solution

  • Here's what I arrived at (edited).

    1. Log in to Google Play Console and select your developer account.

    2. On the Setup dropdown, choose API access.

    3. Under Linked Google Cloud Project, select Create new project and Link project.

    4. Click Configure OAuth consent screen.

    5. Select User Type External and click Create.

    6. Fill in App information, App domain, Authorised domain, Developer contact information, using details pertaining to your app.

    7. Click Save and Continue.

    8. Click Add or Remove Scopes, select Google Play Android Developer API, click Update.

    9. Click Save and Continue.

    10. Under Test users, click Add Users, add tester email addresses (Google accounts).

    11. Click Save and Continue. Your OAuth consent screen details are displayed, under Google Could Platform > APIs and Services > OAuth consent screen.

    12. Click Back to Dashboard. Return to the Google Play Console browser tab and, on the API access page, click Refresh OAuth consent. The screen updates.

    13. Click Create new OAuth client. You’ll see some instructions. Before clicking Done, return to the Google Cloud Platform tab. Click Credentials and, on the Create Credentials dropdown, select OAuthClientId from the dropdown.

    14. On the Application type dropdown, select Desktop app and give it a name.

    15. Click Create. Your Client ID and Client Secret are displayed. Copy and store them securely, optionally download JSON for good measure, then click OK.

    16. Return to the API access tab and, under Create new OAuth client, click Done. The OAuth Client ID will be displayed.

    17. At any time, visit https://console.cloud.google.com/apis/credentials to see your Client ID.

    As a possibly simpler alternative, not requiring Client Id at all:

    In Visual Studio, use Ad hoc publishing to store the signed .aab file in a folder. Then create a release in Google Play Console, dropping the .aab file when prompted.