Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v8

- name: Send to Sonarcloud
run: bundle exec fastlane sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#- name: Send to Sonarcloud
Comment thread
OS-ruimoreiramendes marked this conversation as resolved.
# run: bundle exec fastlane sonarqube
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

# [2.0.2]

### 2026-06-25

- Prevent Expanded Dark Theme inversion on scanner activity (https://outsystemsrd.atlassian.net/browse/RMET-5280)

# [2.0.1]

### 2025-10-02
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In your app-level gradle file, import the OSBarcodeLib library like so:

```gradle
dependencies {
implementation("com.github.outsystems:osbarcode-android:2.0.1@aar")
implementation("com.github.outsystems:osbarcode-android:2.0.2@aar")
}
```

Expand Down
5 changes: 0 additions & 5 deletions docs/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
- [ ] Refactor (cosmetic changes)
- [ ] Breaking change (change that would cause existing functionality to not work as expected)

## Platforms affected
- [ ] Android
- [ ] iOS
- [ ] JavaScript

## Tests
<!--- Describe how you tested your changes in detail -->
<!--- Include details of your test environment if relevant -->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.ionic.libs</groupId>
<artifactId>ionbarcode-android</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</project>
3 changes: 2 additions & 1 deletion src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<application>
<activity
android:name=".view.OSBARCScannerActivity"
android:exported="false" />
android:exported="false"
android:theme="@style/Theme.BarcodeScannerActivity" />
</application>
</manifest>
5 changes: 5 additions & 0 deletions src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.BarcodeScannerActivity"
parent="Theme.AppCompat.DayNight.NoActionBar" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random question, does it matter that this theme is Theme.AppCompat.* but the activity is a ComponentActivity (not AppCompatActivity)? Not sure if it's an issue or just a nit, but I think there's also a Theme.Material3.DayNight.NoActionBar that might be a better fit for a Compose activity, right? Worth checking?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For your first question, doesn't matter that much no, what would happen is that theme brings up additional properties that won't end up being used by this activity because it's not using AppCompat components

For your second question, I didn't use Theme.Material3.DayNight.NoActionBar because it was failing builds for OutSystems, but now that I see it, it's because https://github.com/OutSystems/cordova-outsystems-barcode/blob/main/src/android/com/outsystems/plugins/barcode/build.gradle#L27 has the @aar which means no transitive dependencies come, and so the build failed because it was missing a material library dependency. After adding that, it works fine.

However, when I create an empty compose app, it actually comes with android:Theme.Material.Light.NoActionBar. I thought that would work, but apparently not, still getting color inversion with that theme - This might be due to the native theme configurations of an OutSystems application vs that empty Compose one, didn't exactly figure it out.

But anywho, I'm going with that Theme.Material3.DayNight.NoActionBar that seems to work. Thanks for bringing it up!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: Will need to do similar change for capacitor plugin, but it's fine

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks for the clarification 👍

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually @OS-ruimoreiramendes I changed my mind 😆 after building an app with and without the google material dependency, it increases the full apk size (debug) by 15 MB and the download size (debug) 1.5 MB. While maybe release builds with R8 would shrink that difference, I don't think it's worth the added size for what is in truth, more of a cosmetic change - So I'm changing back to AppCompat 😅

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough 😅 15 MB is way too much for a cosmetic win.

</resources>
Loading