'How to publish to google play from visual studio
I have a cross platform Xamarin app that I have already delivered to App Store Connect for internal testing and it works great. It was not an easy process but now that it is setup properly my testers get an email every time I upload a new version for them to test.
I expected a similarly arduous task to get the Android version up on to Google Play for testing and I was not wrong. There is a lot of documentation (for instance https://docs.microsoft.com/en-us/xamarin/android/deploy-test/publishing/publishing-to-google-play/?tabs=windows) but much seems out-of-date and I kept getting stuck and frustrated that this has to be so complicated. However, I finally have achieved some success and I wanted to share my procedure and I have a question at the end.
- In VS change from debug to release
- Right click on Droid project and select properties - under Android options/Android package format select bundle
- Right click on Droid project and select archive - this will initially build a bundle that is not signed so it can’t be uploaded to Google Play but we will use it to create a Signing Identity.
- Once the archive is done the Archive Manager will open. Select it and tap the Distribute button. Select the Google Play channel.
- On the Signing Identity page use the + to create a new Android Keystore. This will not be applied to the current bundle so we must do the archive again to get it signed.
- Back in the Droid project properties select Android Package Signing, check the checkbox to sign the .APK, although we are actually creating a bundle and not the .APK. Navigate to the Keystore and provide the password that you just created. Also, fill in the Alias using the name of the keystore and provide the password again. I am not sure why this necessary. Now we can create another archive as before but it will be signed!
- Theoretically one could then use the Distribute button of the Archive Manager to upload the bundle to Google Play, but that requires you to have an OAuth client on Google Play. I could not figure this out (it requires an SHA-1 certificate fingerprint that I could not find) and fortunately there is another way.
- After logging in to Google Play use the All apps / Create App button to create the app project that will be used for testing and release. There are a lot of hoops to jump through but they do a pretty good job of walking you through the whole process. You won’t be able to initiate testing until all the requirements are fulfilled.
There are two notable steps:
For certain permissions you will need a privacy policy online. I used this site to create mine: https://pages.flycricket.io/gammadog/privacy.html
For certain permissions you will need a YouTube video explaining how your app uses these features. Here is mine: https://youtu.be/GVbKg1OS7Lk
After setting up your Google Play app project (whew!) you can now select it under All apps. On the left side there is a Testing section. Select Internal testing and then Tap the Create new release button.
Back in your VS Archive Manager tap the Open Folder button to reveal your archive (.aab). You can now drag this to the App bundles upload rectangle on the Google Play app project/Internal Testing/Releases tab. It will upload the bundle and check its requirements. If you are like me you will have to go and fix things in your Google Play project (jump through a few more hoops) before it will upload without error.
Still in your Google Play app project/Internal Testing select the Testers tab. Here is where you set up your testers. Presumably there is a way to send a bulk email to all testers at once but I don't see how to do that.
However, there is a "Copy link" under "How testers join your test". The confusing thing is that initially the "Copy link" is not active and there is no indication as to why. After some time it finally becomes active and you can send this in an email to your testers.
So here is my question:
I have been using an Android tablet for testing this app and it works perfectly when loaded from VS. However, when I click on the link from my email that takes me to Google Play to install it the install never completes and it just sits there spinning forever. Has anyone else run into this and come up with a solution?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
