Skip to content

Commit

Permalink
Merge branch 'master' into fix-barcode-screen-glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna authored Jan 7, 2025
2 parents d76e12a + 0a85740 commit ceed5f3
Show file tree
Hide file tree
Showing 341 changed files with 5,048 additions and 2,855 deletions.
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
## Product Description
<!-- For non-invisible changes, describe user-facing effects. Would be good to add screenshots/videos for any major user facing changes -->

## Safety Assurance
## PR Checklist

- [ ] If the PR is high risk, "High Risk" label is set
- [ ] If I think the PR is high risk, "High Risk" label is set
- [ ] I have confidence that this PR will not introduce a regression for the reasons below
- [ ] Do we need to enhance manual QA test coverage ? If yes, "QA Note" label is set correctly
- [ ] Does the PR introduce any major changes worth communicating ? If yes, "Release Note" label is set and a "Release Note" is specified in PR description.

### Automated test coverage

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
with:
fetch-depth: 0

- name: Get changed files
id: files
uses: octokit/request-action@v2.4.0
with:
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint Code Base
uses: super-linter/super-linter@v5
env:
Expand All @@ -29,3 +37,5 @@ jobs:
IGNORE_GITIGNORED_FILES: true
VALIDATE_JSCPD: false
JAVA_FILE_NAME: checkstyle.xml
with:
changed_files: ${{ steps.files.outputs.files }}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ CommCare is an easily customizable, open source mobile platform that supports fr

This repository represents the Android version of CommCare. It depends on the [CommCare Core](https://github.com/dimagi/commcare-core) repository, which contains the XForm engine and case/lookup table implementations.

## End-to-End Development

CommCare Android is a mobile CommCare Platform client runtime, and requires a backend environment for full end-to-end usage and to test platform development.

If you don't have an access to another backend, or if you will be doing full platform development, after completing this setup you can follow [the end-to-end development guide](https://github.com/dimagi/commcare-hq/blob/master/local_dev_guide.rst) which explains how to establish a local environment for CommCare's full client/server software.

## Setup

To set up an Android dev environment for commcare-android, do the following:
Expand Down Expand Up @@ -34,7 +40,6 @@ git clone https://github.com/dimagi/commcare-core.git
- Click "OK" to use the Gradle wrapper
- Wait while Android Studio spins its wheels
- Download any build dependencies that the SDK Manager tells you you need.
- Disable _Instant Run_ found in Settings > Build, Execution, Deployment > Instant Run. (It does not play well with multidexing, which we have enabled, or with some of the processes we have set up for Google Services)

## Building

Expand Down
57 changes: 39 additions & 18 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.commcare.dalvik"
xmlns:android="http://schemas.android.com/apk/res/android"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="106"
android:versionName="2.54">
android:versionName="2.56">

<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Expand All @@ -17,18 +16,28 @@
android:name="android.permission.INTERNET"/>
<uses-permission
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- required to ensure app compatibility -->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<uses-permission android:name="android.permission.NEARBY_WIFI_DEVICES"
android:usesPermissionFlags="neverForLocation"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />

<uses-feature
android:name="android.hardware.telephony"
Expand All @@ -48,7 +57,7 @@

<uses-sdk tools:overrideLibrary="com.dimagi.android.zebraprinttool, com.simprints.libsimprints,
ru.noties.markwon.il, ru.noties.markwon.view, ru.noties.markwon.renderer,
com.google.firebase.crashlytics, com.google.firebase.iid"/>
com.google.firebase.crashlytics, com.google.firebase.iid, com.appmattus.certificatetransparency"/>

<permission-group
android:name="commcare.permission-group.DATABASE"
Expand Down Expand Up @@ -94,6 +103,11 @@
<package android:name="org.commcare.dalvik.reminders" />
<package android:name="callout.commcare.org.sendussd" />
<package android:name="org.commcare.dalvik.abha" />
<package android:name="com.dimagi.biometric" />
<package android:name="org.rdtoolkit" />
<package android:name="richard.chard.lu.android.areamapper" />
<package android:name="org.commcare.respiratory" />
<package android:name="com.simprints.id" />
</queries>

<application
Expand All @@ -105,7 +119,8 @@
android:label="@string/application_name"
android:hardwareAccelerated="true"
android:usesCleartextTraffic="true"
android:theme="@style/AppBaseTheme">
android:theme="@style/AppBaseTheme"
android:enableOnBackInvokedCallback="false">

<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
Expand All @@ -121,7 +136,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="${applicationId}.action.CommCareSession"/>
<action android:name="org.commcare.dalvik.action.CommCareSession"/>

<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
Expand Down Expand Up @@ -186,6 +201,10 @@
android:name="org.commcare.activities.SessionAwarePreferenceActivity"
android:theme="@style/PreferenceTheme">
</activity>
<activity
android:name="org.commcare.activities.FullscreenVideoViewActivity"
android:theme="@style/FullscreenTheme">
</activity>
<activity
android:exported="false"
android:name="org.commcare.activities.DotsEntryActivity">
Expand Down Expand Up @@ -285,12 +304,14 @@
android:name="org.commcare.activities.FormRecordListActivity"
android:windowSoftInputMode="adjustResize">
</activity>

<service
android:enabled="true"
android:foregroundServiceType="specialUse"
android:name="org.commcare.services.CommCareSessionService">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Service that maintains an encryption key in memory to securely submit data to the server" />
</service>

<activity
android:launchMode="singleTop"
android:name="org.commcare.activities.FormEntryActivity"
Expand Down Expand Up @@ -320,14 +341,12 @@
<activity android:name="org.commcare.gis.EntityMapActivity">
</activity>

<activity android:name="org.commcare.gis.EntityMapboxActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name="org.commcare.gis.EntityMapboxActivity">
</activity>

<activity
android:name="org.commcare.gis.DrawingBoundaryActivity"
android:exported="false"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
android:exported="false">
<intent-filter>
<action android:name="org.commcare.dalvik.action.DrawBoundary"/>

Expand All @@ -343,8 +362,7 @@
</activity>
<activity android:name="org.commcare.activities.InstallFromListActivity">
</activity>
<activity android:name="org.commcare.gis.MapboxLocationPickerActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<activity android:name="org.commcare.gis.MapboxLocationPickerActivity" />

<uses-library
android:name="com.google.android.maps"
Expand All @@ -353,7 +371,9 @@
<activity android:name="org.commcare.activities.MessageActivity">
</activity>

<receiver android:name="org.commcare.views.notifications.NotificationClearReceiver">
<receiver
android:exported="false"
android:name="org.commcare.views.notifications.NotificationClearReceiver">
</receiver>

<activity
Expand Down Expand Up @@ -541,6 +561,7 @@
Below code removes this receiver's entry from Manifest.
-->
<receiver android:name="io.ona.kujaku.receivers.KujakuNetworkChangeReceiver"
android:exported="false"
tools:node="remove"/>

<!-- The zebra-print-android library is not yet targeting Android 12 and at least one
Expand Down
30 changes: 26 additions & 4 deletions app/assets/locales/android_translatable_strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ option.yes=YES
option.no=NO
option.cancel=CANCEL
dialog.ok=OK
dialog.do.not.show=Don't show again

updates.found=Updates found! Downloading new resource ${0} done of ${1}
updates.success=App is up to date
Expand Down Expand Up @@ -166,7 +167,9 @@ form.entry.incomplete.save.success=Form saved as incomplete
form.entry.save.error=Sorry, form save failed. Please contact CommCare Support to look into the issue.
form.entry.save.invalid.unicode=Could not save '${0}' text in form.
form.entry.finish.button=FINISH
form.entry.exit.button=EXIT
form.entry.restart.after.expiration=You were logged out due to session expiration. The form you were in the middle of has been saved and resumed.
form.entry.restart.after.session.pause=CommCare was closed and the form you were in the middle of has been saved and resumed.

login.attempt.badcred=Username or password are incorrect. Please try again.

Expand Down Expand Up @@ -443,20 +446,24 @@ custom.restore.file.not.set=Custom restore file path is not set in preferences
custom.restore.error=Error loading custom sync

start.recording=Start Recording
start.recording.failed=Unable to start recording while another application is using the microphone!
stop.recording=Stop Recording
recording.header=Record a sound
before.recording=Tap to start recording
before.overwrite.recording=Tap to start a new recording
during.recording=Tap to stop recording
during.recording=Recording is in progress, avoid navigating away from CommCare. Tap to stop recording
after.recording=Recording complete.
delete.recording=Tap to delete recording
pause.recording=Recording paused, tap to continue recording
pause.recording.because.no.sound.captured=Recording paused because another app started recording, tap to continue recording
save=Save
recording.cancel=Cancel
recording.clear=Clear
recording.prompt.with.file.chooser=Record or choose sound below
recording.prompt.without.file.chooser=Record sound below
recording.custom=Recorded Sound
recording.paused.due.another.app.recording.title=CommCare Audio Recording
recording.paused.due.another.app.recording.message=Recording paused as another app started recording. Click here to resume the recording!

callout.failure.dialer=Device is not currently configured to make telephone calls
callout.failure.sms=SMS app not found
Expand Down Expand Up @@ -814,6 +821,9 @@ wifi.direct.status.receive.message=This will allow you to receive forms on this
wifi.direct.status.submit.header=You are in Submit Form Mode
wifi.direct.status.submit.count=Device has ${0} unsubmitted forms.
wifi.direct.status.submit.message=This mode will allow you to submit forms to the CommCare Server if you have an internet connection.
wifi.direct.permission.nearby.wifi.title=Permission to access nearby Wi-Fi Devices
wifi.direct.permission.nearby.wifi.message=In order to exchange data with nearby devices via Wi-Fi, CommCare needs access to Wi-Fi capabilities.
wifi.direct.permission.nearby.wifi.denial=CommCare doesn't have permission to connect with nearby devices via Wi-Fi. Please enable via Android's settings.

form.transfer.no.forms=No forms to send.

Expand All @@ -830,11 +840,13 @@ image.capture.not.saved=The image you have taken was not able to be saved proper
image.selection.not.saved=The image you have chosen was not able to be saved properly. Please select another image.
image.selection.invalid.extension=The image you have chosen doesn't have an extension. Please select another image.

upload.clear.title=Clear

odk_perfect_match_color=\#87D13E
odk_fuzzy_match_color=\#FFE88F

permission.all.title=CommCare Permissions
permission.all.message=CommCare needs permissions to read/write forms to memory, call/message from the case list, and provide location data during form entry.
permission.all.message=CommCare needs permissions to read/write forms to memory, call/message from the case list, provide location data during form entry and notify the user about important events.
permission.all.denial.message=CommCare doesn't have the necessary permissions. Please enable via Android's settings.
permission.case.callout.title=Permissions for calling & messaging
permission.case.callout.message=CommCare needs call & messaging permissions to enable communication with cases.
Expand Down Expand Up @@ -864,6 +876,9 @@ intent.callout.unable.to.process=Unable to process callout result
intent.callout.activity.missing=Couldn't find intent for callout!
intent.callout.not.supported=This intent callout is not supported on this device
fingerprints.scanned=Fingerprints scanned: ${0}
intent.callout.biometrics.capture.result.success=All data stored successfully
intent.callout.biometrics.capture.result.fail=No data was stored
intent.callout.biometrics.capture.result.partialfail=Failed to store some data

settings.developer.options=Developer Options
settings.developer.title=Developer Options
Expand All @@ -883,8 +898,8 @@ repeat.dialog.go.back=Go Back
repeat.dialog.leave=Do Not Add
repeat.dialog.exit=Do Not Add. I'm Finished.
repeat.dialog.add=Add Group
repeat.dialog.add.another=Add another "${0}" group?
repeat.dialog.add.new=Add a new "${0}" group?
repeat.dialog.add.another=Add another ${0}?
repeat.dialog.add.new=Add a new ${0}?
lookup.table.missing.error=Unable to find lookup table "${0}". Make sure it exists and this user has access to it.

ethiopian_months=Mäskäräm,T’ïk’ïmt,Hïdar,Tahsas,T’ïr,Yäkatit,Mägabit,Miyaziya,Gïnbot,Säne,Hämle,Nähäse,P’agume
Expand Down Expand Up @@ -967,6 +982,13 @@ tts.speak.failed=Couldn't speak now. Please try again!
file.oversize.error.title=File Too Large
file.oversize.error.message=Selected file exceeds the file size limit of 15 MB. Please select a file whose size is less than 15 MB.

background.sync.pending.form.entry.title=Pending Sync
background.sync.pending.form.entry.detail=There are new cases available but the Sync can't run while a form is open. A Sync will be triggered upon form submission!
background.sync.logout.attempt.during.sync=Can't log out while a Sync is underway!
background.sync.user.sync.attempt.during.sync=Can't trigger a Sync while another is underway!
background.sync.form.entry.attempt.during.sync=A Form can't be open while a Sync is underway!
background.sync.fail=Background sync failed. Please try to trigger a normal Sync

android.package.name.org.commcare.dalvik.reminders=CommCare Reminders
android.package.name.callout.commcare.org.sendussd=Commcare USSD
android.package.name.org.commcare.dalvik.abha=CommCare ABHA
Loading

0 comments on commit ceed5f3

Please sign in to comment.