Comments (8)
Nobody needs SMS right now, in part because of the draconian restrictions of the Play store, so I wonder if we remove the permission from the app for 3.5.0 and include in the flavour when it's needed.
from cht-android.
To test medic/cht-core#4812 we need a way to enable the permission and request access. This could be done locally instead of built and sent to the app store.
from cht-android.
I was able to build a version locally that asked for permissions using the code already there. I don't think this needs to be in 3.5.0.
from cht-android.
I agree. Moving to 3.7.0
from cht-android.
The SMS permission android.permission.SEND_SMS
is not currently in our master branch so does not need to be removed. We do however need a strategy for including the permission when needed. A suitable approach could be to include permissions on a per flavor basis, as described in this tutorial: How to Implement ProductFlavor-Dependent Permissions with Gradle.
An option to consider when the app does not have the permissions to send SMS directly would be to fall back to using the Android intents method, which would present the message to be sent in the default messaging app. There are several drawbacks to this, listed here with possible solutions:
- Requires user to submit the message: We could make the sending of the SMS more explicit in the app UI, so that the user is choosing to send the SMS, in which case they are likely to go through with the sending via the messaging app.
- Exposes the content to be viewed: This could be avoided by encoding the message so that it is not human readable, and decoding when the server receives the message.
- Message content could be edited: We could have a checksum or hash to detect tampering of the content.
Although the intent method is less streamlined than with the SMS permission, this may be a suitable alternative as a fallback when data connectivity is unavailable.
from cht-android.
Just noting that the fall back to using intents should probably be split off into a separate issue, which could be scheduled separately.
cc @MaxDiz
from cht-android.
Deprioritising this while we work out how to do SMS.
from cht-android.
After discussion with @garethbowen and @yanokwa it seems as though the best plan is to create a side loaded app that handles sending SMS via an Intent. Instead of relying directly on the default messaging app, we'd explicitly call a (side-loaded) app whose sole purpose is to relay the SMS. We could optionally fall back to sending via the default messaging app if the relaying app is not present. In this case the message content would need to be converted so that is it not human-readable and contains a checksum to know if it was altered.
Some considerations:
- The app should require very infrequent updates once installed since it will not necessarily be managed by an app store. As a result it should be as small and simple as possible to reduce complexity and defects.
- The app will need to reliably send SMS, despite Android restricting activity of background apps and services to increase battery life.
- It is preferable to not have a UI since UX should be handled by the calling app, and UI elements may require translations (and updates!). That said, a UI element like a notification would be acceptable if required to have the app/service run by Android.
from cht-android.
Related Issues (20)
- Deep links broken by default on Android 12+ HOT 20
- Improve ability to have large list of instances to choose from HOT 1
- Add ability for branded APKs to deep link/register intents to wildcard domains HOT 3
- Improve server selection usability when choosing an instance from the Settings Dialog HOT 1
- Re-add tests for loading the last URL visited by the app HOT 1
- Kenya eCHIS domain change for 33 of 47 counties
- Server list entries do not launch proper entry after filtering with search box
- Unresolvable SMS permission prompt when submitting reports for CHT < 3.9 HOT 6
- Update target API to latest HOT 5
- Upgrade dependencies
- Support Android 14 HOT 5
- Login Test Broken
- Play Store reporting Medic app crashes HOT 3
- Unable to publish cht-android APKs - crash when installing fastlane HOT 1
- Cannot add Togo flavour - "Failed to add secret, you've reached the 100 secret limit" HOT 4
- CHT Android repository needs to find way around 100 secret/repo limitation HOT 15
- Appium vs Espresso HOT 4
- Blank white screen fails to load for domains where SSL certificate chain is invalid (CertPathValidatorException) HOT 8
- Deprecated Android APIs
- Support Android 15 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cht-android.