Yuvaraj Vodiboina
Open source
(OS)Case studyOpen source

Wikimedia Commons

Android app

Ten fixes of mine, merged into the Android app people use to upload photos to Wikimedia Commons, with new tests behind each one.

Platform
Open source
When
2026
Role
Contributor
Merged
10 pull requests
Latest
15 Nov 2026
Status
Ten pull requests merged
UploadNotificationChannels.kt
internal fun NotificationCompat.Builder.useUploadProgressChannel(): NotificationCompat.Builder =
    setChannelId(CommonsApplication.NOTIFICATION_CHANNEL_ID_UPLOADS)
        .setOnlyAlertOnce(true)

internal fun NotificationCompat.Builder.useUploadResultChannel(): NotificationCompat.Builder =
    setChannelId(CommonsApplication.NOTIFICATION_CHANNEL_ID_ALL)
        .setOnlyAlertOnce(false)
(01)

The problem

Someone else’s project has its own rules and maintainers, and years of history. Each of these started from an open issue, and had to fit the code as it is, pass the project’s checks and be easy to review.

(02)

What I built

Each change is one pull request for one issue, with the project’s ktlint and Detekt checks passing, new unit tests, and what I tested written out for the maintainers. A maintainer merged every one.

Hard partFinding where a 2019 bug lives now, in code that had been replaced since the first fix.

(03)

What it does

  1. 01

    Motion photos, photo only (#7337)

    Photos from a Galaxy S9 carry a short video in an older format the app didn’t recognise, so the video went up to Commons with the photo. It’s now cut off, with Samsung’s header before it: one sample went from 9.2 MB to 4.5 MB, the photo itself untouched. Fixes #7335.

  2. 02

    Photo dates in 0 to 9 (#7325)

    On a phone set to Bengali, Persian or Arabic, the date taken from a photo was written in that language’s digits, which the Commons template can’t read. It’s now always 0 to 9, with a test that reads the date back from a real JPEG. Fixes #7320.

  3. 03

    Detekt exceptions explained (#7318)

    Three types the project’s Detekt check listed as having too many functions now say in the code why their functions belong together, so the check’s baseline no longer needs entries for them. Fixes #7115.

  4. 04

    A dead check gone (#7312)

    A distance check on the Nearby map, left with a FIXME, worked out a value nothing read, since a later change had moved the real check elsewhere. It’s gone, with the field and constant only it used. Fixes #7164.

  5. 05

    1000+, not 1000 (#7296)

    While the usual upload count was down, the app counted uploads itself but stopped at 1,000, so anyone with more saw exactly 1000. It now shows 1000+, read from the answer it already had, so it costs no extra request. Fixes #7291.

  6. 06

    Wiki dates in 0 to 9 (#7284)

    A bug reported in 2023: on a phone set to a language with its own digits, nominating a file for deletion created log pages dated in those digits, and some uploads were dated the same way. Both now use 0 to 9. Fixes #5266.

  7. 07

    Edits kept (#7252)

    If the upload screen was recreated while the photo editor was open, as on a switch to dark mode, the edit was lost and the original uploaded, and the location picker crashed. The screen now looks its upload up by position each time. Fixes #6971.

  8. 08

    Quieter uploads (#7071)

    A bug first reported in 2019: the app made a sound for every file while uploading. Progress now has its own silent channel, and only the result alerts you. Fixes #2528.

  9. 09

    A smaller achievements screen (#7184)

    One class with 27 functions, over the project’s limit, is now the screen and two tested helpers, and it works as it did. Fixes #7156.

  10. 10

    No wasted copies (#7069)

    Share a RAW file next to its JPEG and the RAW was copied, then thrown away: 12.6 MB per photo in my test. Unsupported files are now skipped before copying, and the warning still shows. Fixes #6908.

(04)

Under the hood

  1. 01An open issueWhat’s wrong, reported by others
  2. 02Reproduce itOn current main, in an emulator or a test
  3. 03A small changeWith unit tests and the project’s checks
  4. 04Review and mergeBy the app’s maintainer
(05)

Decisions

  1. 01

    A new silent channel, not a quieter default

    The earlier fixes only silenced updates to a notification still showing, but each file posts a new one. A channel of low importance can’t make a sound at all.

    Trade-offFinished uploads still alert once. I noted in the pull request that making them silent too is one line.

  2. 02

    Check the file type before copying it

    The existing filter ran after the copy. Running the same check on each shared file first means an unsupported one is never copied.

    Trade-offThe shared-file path now has its own step, so the old filter stays for files picked inside the app.

(06)

Timeline

  1. #7069 merged

    Skip unsupported shared files before copying them.

  2. #7184 merged

    Split the achievements screen into smaller, tested pieces.

  3. #7071 merged

    Post upload progress notifications silently.

  4. #7252 merged

    Keep image edits and locations when the upload screen is recreated.

  5. #7284 merged

    Write wikitext dates with Western digits.

  6. #7296 merged

    Show 1000+ when the upload count stops at the cap.

  7. #7312 merged

    Remove the unused distance check in recenterMap.

  8. #7318 merged

    Suppress Detekt TooManyFunctions, with the reason, in three types.

  9. #7325 merged

    Write the EXIF date with Western digits.

  10. #7337 merged

    Remove MicroVideo motion photo videos and the Samsung header.

(07)

Built with

KotlinAndroidRobolectricJUnitktlintDetekt

These are merged into the project’s main code, and reach the store with the app’s own releases.

Next01 of 19Chrome extension + website ShopGrade
An audit for any Shopify storefront. It turns what it finds on a public store into a prioritized list of fixes, with no admin access needed.Read the case study