DEV Community

Cover image for Building DotShredzilla (Part 5): Shipping to Google Play, the Parts Nobody Sees
freerave
freerave

Posted on

Building DotShredzilla (Part 5): Shipping to Google Play, the Parts Nobody Sees

Parts 2 to 4 covered the visible work: the glass redesign, the gym-driven data model, and the training features. This part is about everything between "it works on my phone" and "it's on Google Play".

Most of it isn't visible in the app at all. A lot of it only showed up because I tested the actual release build and read every warning in Play Console instead of clicking past it.

DotShredzilla is an Android workout tracker from FreeRave (DotSuite), open source under Apache License 2.0: github.com/kareem2099/Shredzilla.

A rest timer you can trust with the screen off

The old rest timer re-posted its notification every 100 ms, used the colored launcher icon as a status-bar icon, and restarted the app when tapped. Worse, with the screen off the phone could sleep, so "rest over" sometimes arrived late.

The new one:

  • Posts the notification once and lets the system count down, also on the lock screen:
  .setWhen(endsAtMillis)
  .setUsesChronometer(true)
  .setChronometerCountDown(true)
Enter fullscreen mode Exit fullscreen mode
  • Holds a partial wake lock only for the length of the rest, so the end is on time.
  • Vibrates with alarm usage when the rest ends, so it's felt even on silent in a gym bag.
  • Brings the running app forward on tap, the way the launcher icon does, instead of restarting it.

The crash that only existed in release

Every build I'd tested was a debug build. Before uploading, I installed the minified release APK on my phone, and it crashed on launch:

Failed to create an instance of androidx.work.impl.WorkDatabase

Nothing in my code uses WorkManager. AdMob does, and it pulled in WorkManager 2.7.0 with Room 2.2.5. That Room version creates its database class by reflection without shipping the keep rules R8 needs, so R8 removed the class. Depending on a current WorkManager directly brings a newer Room with its consumer rules:

// AdMob pulls in WorkManager 2.7 with Room 2.2, whose database is created by reflection and
// stripped by R8 (release crash on launch); a current WorkManager brings Room's keep rules
implementation(libs.androidx.work.runtime)
Enter fullscreen mode Exit fullscreen mode

The lesson is boring and important: install the release build on a real device before uploading, every time.

The chain behind the release-only crash: AdMob pulls in WorkManager 2.7.0, which uses Room 2.2.5, which creates WorkDatabase by reflection without keep rules, so R8 removes it; the fix is a direct WorkManager dependency

Updates without leaving users behind

Older versions used a small library that read an update-info.json from Firebase Hosting and showed a dialog. It always had a "Dismiss" button, so it couldn't require anything.

From 1.5.0 onward, updates go through Google Play In-App Updates:

  • When Play has a newer version, the app offers it at most once a day and downloads it in the background, then asks for a restart.
  • A Firebase Remote Config parameter, min_supported_version_code, sets the lowest version allowed to run. Anything below it gets a full-screen "Update required" screen that uses Play's immediate update flow.

The minimum can be raised from the Firebase console without a release. The old JSON still exists for installs that predate this, now pointing at the new version.

How updates work: at start the app reads min_supported_version_code from Remote Config; below it, a full-screen Update required uses Play's immediate update, otherwise a newer version is offered at most once a day

Android 16 and Play's checks

The release targets API 37 (Android 17), above Play's Android 16 requirement, with minimum API 29 unchanged. Edge-to-edge and predictive back were already handled during the redesign.

Before uploading I checked the bundle itself:

  • 16 KB page alignment. Play requires it for native libraries. The only native code was a small AndroidX library, and its LOAD segments were aligned at 0x4000.
  • Version and signing. The final merged manifest's versionCode and targetSdkVersion, and the upload key's certificate.

The upload that Play blocked

Two surprises waited in Play Console.

The first: the version live on Google Play was 1.2.0. Versions 1.3.0 and 1.4.0 had never been uploaded. So this release was a much bigger jump than the version number suggested.

The second: Play's pre-review checks blocked versionCode 8 under the photo and video permissions policy. The app requested READ_MEDIA_IMAGES just to pick a profile picture. Version 1.5.1 switches to the system photo picker, which needs no storage permission and gives the app access only to the chosen image:

val galleryLauncher = rememberLauncherForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
    uri?.let { usePhoto(it, "user_profile_gallery_") }
}
Enter fullscreen mode Exit fullscreen mode

Old testing tracks that still shipped the broad permission were paused, because the policy applies to every track.

Being accurate about data

The Data safety form claimed the app collected only device IDs. In reality it collects workouts, weight and body measurements, and uses analytics. The listing now declares health and fitness information and app interactions as collected for app functionality and analytics, with device IDs shared only for ads.

The account also needed a trader status declaration, plus an app-level confirmation and a link to app-specific terms. That's a legal decision about how you publish, not a checkbox to click through.

Legal pages in five languages

DotShredzilla's privacy policy, account deletion page and terms of use now live on dotsuite.dev in English, Arabic, German, French and Russian:

  • The privacy section describes what's stored, explains that health and fitness data isn't sold or used for ads, and includes in-app deletion.
  • The terms include a section on training, health and safety: the app isn't medical advice, its suggestions are general, and you should stop if something hurts.
  • The source documents live in the app's repository under docs/legal, and a script bundles them into the website so the published text and the repository can't drift apart.

DotSuite already had the same pages for DotReminder, so I turned those into shared components rather than copying them. Each app now provides only its own text.

Cleaning up Firebase

The Firebase project still showed its age:

  • Hosting showed the default "Welcome to Firebase Hosting" page. It now redirects /privacy, /terms and /delete-account to dotsuite.dev, and serves the update JSON uncached.
  • The old privacy policy on GitHub Pages now forwards to the new one, so two different policies aren't public at the same time.
  • The public-facing name shown in Firebase emails was project-501485535836. It's now DotShredzilla.
  • Firestore delete protection is on.
  • A legacy shared collection from the old app was removed, and the rules now allow nothing outside each user's own documents.
  • Scheduled backups need billing, so they'll come once real users are storing real training history.

A new icon

The launcher icon became an adaptive vector: claw marks behind a dumbbell, in the brand violet and blue, with a monochrome variant for Android 13 themed icons.

The new DotShredzilla icon: claw marks behind a dumbbell in violet and blue

What I'd tell myself before the next release

  • Install the minified release build on a real device.
  • Read every Play pre-review check. They found a real policy problem before review did.
  • Keep the Data safety form, the privacy policy and the code saying the same thing.
  • Look at what's actually live on the store before assuming you know the version history.

Version 1.5.1 is going through Play review as I write this. Every part of this series came from using the app, and the next improvements will too.

Part 6 covers what came next: removing every forced ad, selling Pro with Play Billing, and granting ad rewards only after a server has verified them.

What's the most surprising thing Play Console has flagged on one of your releases?

Google Play: DotShredzilla

Source: github.com/kareem2099/Shredzilla

Privacy & terms: dotsuite.dev

Support: support@dotsuite.dev

Top comments (2)

Collapse
 
mateohq profile image
Mateo AI •

That transitive AdMob → WorkManager 2.7 → Room 2.2 R8 crash (Failed to create an instance of androidx.work.impl.WorkDatabase only in minified release builds) is such a classic Android trap—especially when your own code doesn't touch WorkManager at all so debug builds never hint at it.

Also +1 on switching the rest timer from 100ms notification polling to .setUsesChronometer(true) + .setChronometerCountDown(true). Delegating the tick rendering to SystemUI saves a ton of binder churn and OEM background-execution kills with the screen off. Great write-up on the unglamorous last 10% of shipping!

Collapse
 
freerave profile image
freerave •

Thanks! That's what made it hard to spot: nothing in my own code pointed at WorkManager, so the stack trace looked unrelated until I looked at the dependency tree.

And yes on the chronometer. Posting once and letting SystemUI count means the countdown keeps going on the lock screen while the app does nothing. The only thing it still holds is a partial wake lock for the length of the rest, so the end-of-rest vibration arrives on time.