Skip to content

Commit ac7cc3b

Browse files
Broke up publishing into smaller parts - publishing, ios, android, checklist and conclusion. (#18)
1 parent cfab710 commit ac7cc3b

28 files changed

+522
-419
lines changed

articles/tutorials/advanced/MobileDeployment/04_publishing/index.md

Lines changed: 3 additions & 419 deletions
Large diffs are not rendered by default.
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: "05: Publishing to Google Play Store"
3+
description: "Learn how to publish your MonoGame mobile application to the Google Play Store with step-by-step guidance."
4+
---
5+
6+
# Publishing Overview
7+
8+
This chapter covers the complete publishing process for both major mobile app stores. You will learn the requirements and workflows for getting your MonoGame app successfully published on Android platforms.
9+
10+
## Prerequisites
11+
12+
Before publishing, ensure you have:
13+
- Completed development and testing of your cross-platform MonoGame app
14+
- Google Play Developer account (a one-time fee)
15+
- App icons, screenshots, and store assets prepared
16+
- Final build configurations tested on physical devices
17+
18+
---
19+
20+
# Google Play Store Publishing
21+
22+
## Pre-Publishing Preparation
23+
24+
### Final Android Build Configuration
25+
26+
Ensure your Android project is properly configured for Google Play submission:
27+
28+
#### Project Properties
29+
30+
```xml
31+
<SupportedOSPlatformVersion>23</SupportedOSPlatformVersion>
32+
<ApplicationId>com.companyname.DungeonSlime.Android</ApplicationId>
33+
<ApplicationVersion>1</ApplicationVersion>
34+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
35+
```
36+
37+
#### Activity Configuration
38+
39+
Verify your main activity is properly configured:
40+
41+
```csharp
42+
[Activity(
43+
Label = "@string/app_name",
44+
MainLauncher = true,
45+
Icon = "@drawable/icon",
46+
AlwaysRetainTaskState = true,
47+
LaunchMode = LaunchMode.SingleInstance,
48+
ScreenOrientation = ScreenOrientation.SensorLandscape,
49+
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.Keyboard |
50+
ConfigChanges.KeyboardHidden | ConfigChanges.ScreenSize
51+
)]
52+
```
53+
54+
### Required Assets
55+
56+
#### App Icons
57+
58+
Ensure you have app icons for all density buckets:
59+
60+
- **mdpi:** 48x48 px
61+
- **hdpi:** 72x72 px
62+
- **xhdpi:** 96x96 px
63+
- **xxhdpi:** 144x144 px
64+
- **xxxhdpi:** 192x192 px
65+
66+
#### Feature Graphic
67+
68+
- **Size:** 1024 x 500 px
69+
- **Format:** PNG or JPEG
70+
- **Purpose:** Featured in Google Play Store
71+
72+
#### Screenshots
73+
74+
Required for each supported device type:
75+
76+
- **Phone:** Minimum 320px, maximum 3840px
77+
- **7-inch Tablet:** Same requirements
78+
- **10-inch Tablet:** Same requirements
79+
- **Android TV:** 1920 x 1080 px
80+
- **Wear OS:** 384 x 384 px
81+
82+
### Release Build Configuration
83+
84+
#### Signing Configuration
85+
86+
#### Creating a Keystore
87+
```bash
88+
# Generate new keystore (first time only)
89+
keytool -genkey -v -keystore your-app.keystore -alias your-key-alias -keyalg RSA -keysize 2048 -validity 10000
90+
91+
# Verify keystore
92+
keytool -list -v -keystore your-app.keystore
93+
```
94+
95+
**Important:** Keep your keystore file secure and backed up. Lost keystores cannot be recovered and prevent app updates.
96+
97+
## Google Play Console Setup
98+
99+
### Creating Your Developer Account
100+
101+
**Register at** [play.google.com/console](https://play.google.com/console)
102+
103+
### Creating Your App
104+
105+
1. **Create App** in Google Play Console
106+
107+
2. **App Details:**
108+
- App Name: Your app's display name
109+
- Default Language: Primary market language
110+
- App or Game: Select "Game" for MonoGame apps
111+
- Free or Paid: Choose pricing model
112+
113+
3. **Declarations:**
114+
- App Content: Age rating and content
115+
- Target Audience: Age groups
116+
- News App: Usually "No" for games
117+
118+
## Building Release APK/AAB
119+
120+
### Android App Bundle (Recommended)
121+
122+
Google Play prefers AAB format for optimized delivery:
123+
124+
```bash
125+
# Build AAB using .NET CLI
126+
dotnet publish -f net8.0-android -c Release
127+
128+
# Or using MSBuild
129+
msbuild YourApp.Android.csproj /p:Configuration=Release /p:AndroidPackageFormat=aab
130+
```
131+
132+
### APK Build (Alternative)
133+
134+
```bash
135+
# Build APK
136+
dotnet publish -f net8.0-android -c Release /p:AndroidPackageFormat=apk
137+
```
138+
139+
| ![Figure 4-7: Visual Studio Archive](images/android/android_release.png) |
140+
| :----------------------------------------------------------------------------------------------------------------------------------------: |
141+
| **Figure 4-7: Visual Studio Archive** |
142+
143+
### Verification Steps
144+
145+
Before upload, verify your build:
146+
147+
```bash
148+
# Check APK contents
149+
aapt dump badging your-app.apk
150+
151+
# Verify signing
152+
jarsigner -verify -verbose -certs your-app.apk
153+
154+
# Test installation
155+
adb install your-app.apk
156+
```

0 commit comments

Comments
 (0)