diff --git a/API.md b/API.md index 2d7caab7..6c7e6133 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,10 @@ -# API documentation +

+
+ CV Project icon +
+ CV Project: API +
+

API: Application Programming Interface diff --git a/PRIVACY.md b/PRIVACY.md index ffbe959b..f9049040 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,6 +1,12 @@ -# Privacy: CV Android +

+
+ CV Project icon +
+ CV Project: Privacy +
+

The app doesn’t collect your personal data. Anyway, some data are saved on your device (*user_id* of Common Voice, *selected language*, *validations and recordings number*, and others data). You can clear them just *Clear data* of the app (but they are necessary to use Common Voice Android). @@ -71,16 +77,19 @@ The app, from version 2.2, send to my website also the app usage. These informat This is what the app send to my server: -| Key | Value | Explanation | -| ---------- | ------------------------------- | ------------------------------------------------------------ | -| `type` | `0` or `1` or `2` or `3` or `4` | It's an integer value `0 ` or `1` if you validated a clip (the first one "rejected", the latter one "accepted"), `2` if you reported a clip, `3` if you sent a recording and `4` if you reported a sentence.
So, the `0`, `1` and `2` are about "Listen", the `3` and `4` are about "Speak" | -| `language` | *String* | It's the language code you are using the app (`en`, `it`, ...) | -| `version` | *Integer* | It's the version code of the app (`90`, `91`, ...) | -| `source` | `GPS`, `FD-GH` or `HAG` | It indicates the source from you installed the app (`GPS`: Google Play Store, `FD-GH`: F-Droid/GitHub, `HAG`: Huawei AppGallery, `n.d.`: not defined) | -| `logged` | `0` or `1` | It's an integer value `0` if you use the app "anonymously" (without log-in), `1` if you are logged in | -| `offline` | `0` or `1` | It's an integer value `0` if you were using the app online when you contributed to Common Voice with the app, `1` if you were using it offline
It's useful to know if users use the offline mode or not | -| `username` | *String* | It's a unique string generated just the first time you run the app (not every time you run it), and it doesn't contain personal data.
The string is like this: `UserYYYYMMDDHHMMSSMMMM::CVAppSav` | +| Key | Value | Explanation | +| ------------- | ------------------------------- | ------------------------------------------------------------ | +| `type` | `0` or `1` or `2` or `3` or `4` | It's an integer value `0 ` or `1` if you validated a clip (the first one "rejected", the latter one "accepted"), `2` if you reported a clip, `3` if you sent a recording and `4` if you reported a sentence.
So, the `0`, `1` and `2` are about "Listen", the `3` and `4` are about "Speak" | +| `language` | *String* | It's the language code you are using the app (`en`, `it`, ...) | +| `version` | *Integer* | It's the version code of the app (`90`, `91`, ...) | +| `source` | `GPS`, `FD-GH` or `HAG` | It indicates the source from you installed the app (`GPS`: Google Play Store, `FD-GH`: F-Droid/GitHub, `HAG`: Huawei AppGallery, `n.d.`: not defined) | +| `logged` | `0` or `1` | It's an integer value `0` if you use the app "anonymously" (without log-in), `1` if you are logged in | +| `offline` | `0` or `1` | It's an integer value `0` if you were using the app online when you contributed to Common Voice with the app, `1` if you were using it offline
It's useful to know if users use the offline mode or not | +| `username` | *String* | It's a unique string generated just the first time you run the app (not every time you run it), and it doesn't contain personal data.
The string is like this: `UserYYYYMMDDHHMMSSMMMM::CVAppSav` | +| `sentence_id` | *String* | It identifies the *sentence_id* reported, recorded or validated | +| `clip_id` | *String* | It identifies the *clip_id* (`glob`) validated or reported. If you are in the *Speak* section, this parameter is empty | +| `details` | *String* | Here you can find more information. For example, you can find the *sentence_text* or the reasons about the clips/sentences reported | -*Last update: 30th November 2020* \ No newline at end of file +*Last update: 28th May 2021* \ No newline at end of file diff --git a/app/AAS/release/app-AAS-release.apk b/app/AAS/release/app-AAS-release.apk index a3445925..5f8ece84 100644 Binary files a/app/AAS/release/app-AAS-release.apk and b/app/AAS/release/app-AAS-release.apk differ diff --git a/app/AAS/release/output-metadata.json b/app/AAS/release/output-metadata.json index 3f58affe..c9a87099 100644 --- a/app/AAS/release/output-metadata.json +++ b/app/AAS/release/output-metadata.json @@ -10,8 +10,8 @@ { "type": "SINGLE", "filters": [], - "versionCode": 151, - "versionName": "2.3.6.5", + "versionCode": 154, + "versionName": "2.3.7", "outputFile": "app-AAS-release.apk" } ] diff --git a/app/GPS/release/app-GPS-release.aab b/app/GPS/release/app-GPS-release.aab index 663c9e91..0ac22f79 100644 Binary files a/app/GPS/release/app-GPS-release.aab and b/app/GPS/release/app-GPS-release.aab differ diff --git a/app/HAG/release/app-HAG-release.apk b/app/HAG/release/app-HAG-release.apk index f4519d31..4d8d8a46 100644 Binary files a/app/HAG/release/app-HAG-release.apk and b/app/HAG/release/app-HAG-release.apk differ diff --git a/app/HAG/release/output-metadata.json b/app/HAG/release/output-metadata.json index b2846089..bc2e0d1f 100644 --- a/app/HAG/release/output-metadata.json +++ b/app/HAG/release/output-metadata.json @@ -10,8 +10,8 @@ { "type": "SINGLE", "filters": [], - "versionCode": 151, - "versionName": "2.3.6.5", + "versionCode": 154, + "versionName": "2.3.7", "outputFile": "app-HAG-release.apk" } ] diff --git a/app/build.gradle b/app/build.gradle index 7301390a..1a4269fd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId 'org.commonvoice.saverio' minSdkVersion 23 targetSdkVersion 30 - versionCode = 151 - versionName '2.3.6.5' + versionCode = 154 + versionName '2.3.7' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/org/commonvoice/saverio/ui/settings/SettingsFragment.kt b/app/src/main/java/org/commonvoice/saverio/ui/settings/SettingsFragment.kt index c3e5510a..0018a054 100644 --- a/app/src/main/java/org/commonvoice/saverio/ui/settings/SettingsFragment.kt +++ b/app/src/main/java/org/commonvoice/saverio/ui/settings/SettingsFragment.kt @@ -117,10 +117,10 @@ class SettingsFragment : ViewBoundFragment() { //TODO: remove, when implemented In-app purchare: buttonBuyMeACoffee.isGone = true separator28.isGone = true - if (statsPrefManager.buyMeACoffeeCounter >= 20) { + /*if (statsPrefManager.buyMeACoffeeCounter >= 20) { buttonBuyMeACoffee.isGone = false separator28.isGone = false - } + }*/ } //In-App review @@ -159,7 +159,7 @@ class SettingsFragment : ViewBoundFragment() { inAppPurchase() } else {*/ buttonBuyMeACoffee.setOnClickListener { - startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://www.paypal.com/pools/c/8yl6auiU6e"))) + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://www.saveriomorelli.com/commonvoice/donate/"))) } /*}*/ } diff --git a/app/src/main/java/org/commonvoice/saverio/ui/settings/nestedSettings/OfflineModeSettingsFragment.kt b/app/src/main/java/org/commonvoice/saverio/ui/settings/nestedSettings/OfflineModeSettingsFragment.kt index 5176fc1d..9124cdef 100644 --- a/app/src/main/java/org/commonvoice/saverio/ui/settings/nestedSettings/OfflineModeSettingsFragment.kt +++ b/app/src/main/java/org/commonvoice/saverio/ui/settings/nestedSettings/OfflineModeSettingsFragment.kt @@ -4,8 +4,11 @@ import android.content.Intent import android.net.Uri import android.view.LayoutInflater import android.view.ViewGroup +import android.widget.SeekBar +import androidx.core.view.isGone import androidx.work.ExistingWorkPolicy import androidx.work.WorkManager +import org.commonvoice.saverio.R import org.commonvoice.saverio.databinding.FragmentOfflineSettingsBinding import org.commonvoice.saverio.ui.viewBinding.ViewBoundFragment import org.commonvoice.saverio.utils.setupOnSwipeRight @@ -35,6 +38,11 @@ class OfflineModeSettingsFragment : ViewBoundFragment() private val workManager by inject() + private var changedNumber = false + + private val minimumOfflineModeNumber = 10 + private val stepsOfflineMode = 10 + override fun onStart() { super.onStart() @@ -46,25 +54,32 @@ class OfflineModeSettingsFragment : ViewBoundFragment settingsPrefManager.isOfflineMode = isChecked + settingsSectionCustomiseOfflineMode.isGone = !isChecked if (oldStatus != isChecked) { var count = 50 if (!settingsPrefManager.isOfflineMode) count = 3 listenPrefManager.requiredClipsCount = count speakPrefManager.requiredSentencesCount = count - mainViewModel.clearDB().invokeOnCompletion { - SentencesDownloadWorker.attachOneTimeJobToWorkManager( - workManager, - ExistingWorkPolicy.REPLACE - ) - ClipsDownloadWorker.attachOneTimeJobToWorkManager( - workManager, - ExistingWorkPolicy.REPLACE - ) - } + } + var count = if (listenPrefManager.requiredClipsCount >= minimumOfflineModeNumber) { + listenPrefManager.requiredClipsCount + } else { + 50 + } + + if (isChecked) { + listenPrefManager.requiredClipsCount = count + speakPrefManager.requiredSentencesCount = count + showCustomisationSection() + } else { + count = 3 + listenPrefManager.requiredClipsCount = count + speakPrefManager.requiredSentencesCount = count } } switchSettingsSubSectionOfflineMode.isChecked = settingsPrefManager.isOfflineMode @@ -77,15 +92,91 @@ class OfflineModeSettingsFragment : ViewBoundFragment - - + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@id/progressBarListenSpeak" /> @@ -81,12 +73,12 @@ android:id="@+id/imageOfflineModeListen" android:layout_width="50dp" android:layout_height="50dp" - android:layout_marginStart="20dp" - android:layout_marginTop="30dp" + android:layout_marginStart="10dp" + android:layout_marginTop="10dp" android:padding="5dp" android:visibility="gone" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/adContainer" + app:layout_constraintStart_toStartOf="@+id/textSentenceListen" + app:layout_constraintTop_toTopOf="@+id/textSentenceListen" app:srcCompat="@drawable/ic_offline_mode" tools:visibility="visible" /> @@ -94,12 +86,12 @@ android:id="@+id/imageReportIconListen" android:layout_width="50dp" android:layout_height="50dp" - android:layout_marginTop="30dp" - android:layout_marginEnd="20dp" + android:layout_marginTop="10dp" + android:layout_marginEnd="10dp" android:padding="5dp" android:visibility="gone" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toBottomOf="@+id/adContainer" + app:layout_constraintEnd_toEndOf="@+id/textSentenceListen" + app:layout_constraintTop_toTopOf="@+id/textSentenceListen" app:srcCompat="@drawable/ic_report" tools:visibility="visible" /> @@ -173,7 +165,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="8dp" - android:layout_marginTop="8dp" + android:layout_marginTop="10dp" android:layout_marginEnd="8dp" android:gravity="center|top|center_vertical" android:textColor="@color/colorAlertMessage" @@ -203,11 +195,8 @@ @@ -220,10 +209,10 @@ android:layout_marginEnd="10dp" android:background="@color/colorTransparent" android:padding="0dp" - app:layout_constraintBottom_toTopOf="@+id/listenSectionBottom" + app:layout_constraintBottom_toTopOf="@+id/viewSpacingListen2" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/textSentenceListen"> + app:layout_constraintTop_toBottomOf="@+id/viewSpacingListen"> + app:layout_constraintTop_toBottomOf="@+id/viewSpacingListen">