Commit Graph

3 Commits

Author SHA1 Message Date
Nik Clayton 4fc52f9bc2
feat: Warn the user if the posting language might be incorrect (#792)
The user has to specify the language they're posting in, and sometimes
they might get it wrong (e.g., replying to a post that also had the
language set incorrectly, forgetfulness, etc).

This has accessiblity issues (only following statuses in a given
language fails, translation can fail, etc).

Prevent this by trying to detect the language the status is written in
when the user tries to post it. If the detected language and the set
language do not match, and the detection is 60+% confident, warn the
user the status language might be incorrect, and offer to correct it
before posting.

How this works differs by device and API level.

- API 23 - 28, fdroid and github build flavours
   - Not supported. A no-op language detector is used.
- API 29 and above, fdroid and github build flavours
   - Uses Android TextClassifier to detect the likely language
- AP 23 and above, google build flavour
   - Uses ML Kit language identification

To do this:

- Add `LanguageIdentifier`, with methods to do the identification, and
`LanguageIdentifier.Factory` to create the identifiers.
- Inject the factory in `ComposeActivity`
- Detect the language when the user posts, showing a dialog if there's a
sufficiently large discrepancy.

The ML Kit dependencies (language models) will be installed by the Play
libraries, so there's some machinery to check that they're installed,
and kick off the installation if not. If they can't be installed then
the language check is bypassed.

Update the privacy policy, as the ML Kit libraries may send some data to
Google.
2024-07-02 20:22:17 +02:00
Nik Clayton cd1d8294ca
docs: Be more specific about data in the privacy policy (#136)
Google wants a more specific privacy policy, per
https://support.google.com/googleplay/android-developer/answer/10144311.

Expand the policy to be clear about:

- How data is handled at rest and over the network
- How data is shared
- The types of data handled
2023-09-30 12:56:48 +02:00
Nik Clayton 4879f0449f
docs: Add a privacy policy (#2)
While drafting the policy I noticed that the `READ_MEDIA_*` permissions
could be added (for newer devices), the `ACCESS_NETWORK_STATE`
permission was missing, and `VIBRATE` was unnecessary.
2023-09-05 15:35:06 +02:00