Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(BuildHelper): get package name from ApplicationInfo #1575

Merged
merged 1 commit into from Apr 14, 2023

Conversation

yuzhiqiang1993
Copy link
Contributor

@yuzhiqiang1993 yuzhiqiang1993 commented Mar 26, 2023

Platforms affected

Android

Motivation and Context

for example
if the Activity is not at the to level of the package,like this.

image

The package name of my project is com/yzq/cordovademo. But I get the Unable to get the BuildConfig, is this built with ANT? exception when I use the camera plugin.

image

Description

We don't have to worry about the Activity hierarchy by getting the package name like ctx.getApplicationInfo().packageName

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2023

Codecov Report

Merging #1575 (c0da2f6) into master (d4bfd50) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1575   +/-   ##
=======================================
  Coverage   72.13%   72.13%           
=======================================
  Files          21       21           
  Lines        1751     1751           
=======================================
  Hits         1263     1263           
  Misses        488      488           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yuzhiqiang1993 yuzhiqiang1993 changed the title fixed Unable to get the BuildConfig, is this built with ANT? fix Unable to get the BuildConfig, is this built with ANT? Mar 30, 2023
@breautek breautek added this to the 12.0.0 milestone Apr 14, 2023
@breautek breautek requested a review from erisu April 14, 2023 11:48
@erisu erisu changed the title fix Unable to get the BuildConfig, is this built with ANT? fix(BuildHelper): get package name from ApplicationInfo Apr 14, 2023
@breautek breautek merged commit 7efe90f into apache:master Apr 14, 2023
6 checks passed
@breautek
Copy link
Contributor

Thank you @yuzhiqiang1993 for helping us maintain cordova-android. This patch will land in our cordova-android@12 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants