microg / microg/GmsCore

Parts of the code using hardcoded `Constants.GMS_PACKAGE_NAME` not build flavour aware?

Open
#3,367 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
14.6k
Forks
3.2k
Avg merge
12d 11h
Merged PRs (30d)
4

Description

In many places of GmsCore, `Constants.GMS_PACKAGE_NAME` is used when the app package name is expected. When building the user flavour, this package name remains hardcoded. This does not look to be intended.

Here is an example:

https://github.com/microg/GmsCore/blob/master/play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/utils/MultiArchLoader.kt#L45

Another:

https://github.com/microg/GmsCore/blob/master/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java#L140

For both, the constant should point to the app's package name, so when the user flavour is used, the user flavour package name is used.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the hardcoded references in play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/utils/MultiArchLoader.kt and play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java, then search GmsCore for other Constants.GMS_PACKAGE_NAME uses. Compare each use with the user flavour package configuration; done means relevant app-package lookups use the flavour-specific package name.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.