Skip to content

Commit

Permalink
Merge pull request #93 from mubeen1519/work
Browse files Browse the repository at this point in the history
added version number and name on wear os build and bug fix
  • Loading branch information
CrazyMarvin authored Aug 26, 2024
2 parents 23b6438 + e61976a commit 2690793
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 8 deletions.
Binary file removed android/app/release/app-release.aab
Binary file not shown.
Binary file not shown.
Binary file not shown.
37 changes: 37 additions & 0 deletions android/app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "rocks.poopjournal.fucksgiven",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.0",
"outputFile": "FucksGiven-1.0.0-release.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/FucksGiven-1.0.0-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/FucksGiven-1.0.0-release.dm"
]
}
],
"minSdkVersionForDexing": 26
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DatabaseBackupManager @Inject constructor(
private val context: Context,
private val fuckDatabase: FuckDatabase
) {
fun backupDatabase(): Int {
fun backupDatabase(message : String): Int {
var result = -99
val dbFile = context.getDatabasePath(THEDATABASE_DATABASE_NAME)
val dbWalFile = File(dbFile.path + SQLITE_WALFILE_SUFFIX)
Expand All @@ -34,7 +34,7 @@ class DatabaseBackupManager @Inject constructor(
if (dbWalFile.exists()) dbWalFile.copyTo(bkpWalFile, true)
if (dbShmFile.exists()) dbShmFile.copyTo(bkpShmFile, true)
result = 0
Toast.makeText(context, "Database backed up Successfully", Toast.LENGTH_SHORT).show()
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
} catch (e: IOException) {
e.printStackTrace()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import rocks.poopjournal.fucksgiven.presentation.viewmodel.SettingsViewModel
@Composable
fun SettingScreen(navController: NavHostController, viewModel: SettingsViewModel) {
var showDialog by remember { mutableStateOf(false) }

val toastMessage = stringResource(id = R.string.backup_success)
Scaffold(
topBar = {
TopAppBar(
Expand Down Expand Up @@ -127,7 +127,7 @@ fun SettingScreen(navController: NavHostController, viewModel: SettingsViewModel
.height(50.dp)
.padding(11.dp)
.clickable {
viewModel.backupDatabase()
viewModel.backupDatabase(toastMessage)
},
verticalAlignment = Alignment.CenterVertically
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class SettingsViewModel @Inject constructor(
lateinit var themeSetting: ThemeSetting


fun backupDatabase() {
fun backupDatabase(message : String) {
viewModelScope.launch {
val result = databaseBackupManager.backupDatabase()
val result = databaseBackupManager.backupDatabase(message)
// Handle the result
}
}
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string name="apperance">Erscheinungsbild</string>
<string name="data">Daten</string>
<string name="backup">Sicherung</string>
<string name="backup_success">Datenbanksicherung erfolgreich</string>
<string name="restore">Wiederherstellen</string>
<string name="select_theme">Thema wählen</string>
<string name="stats">Statistiken</string>
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values-eo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string name="apperance">Aspekto</string>
<string name="data">Datumoj</string>
<string name="backup">Rezervo</string>
<string name="backup_success">Sekurkopio de datumbazo sukcese</string>
<string name="restore">Restaŭri</string>
<string name="select_theme">Elektu Temon</string>
<string name="stats">Statoj</string>
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string name="apperance">Apparence</string>
<string name="data">Données</string>
<string name="backup">Sauvegarde</string>
<string name="backup_success">Sauvegarde de la base de données réussie</string>
<string name="restore">Restaurer</string>
<string name="select_theme">Sélectionne un thème</string>
<string name="stats">Statistiques</string>
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values-ur/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string name="apperance">ظہور</string>
<string name="data">ڈیٹا</string>
<string name="backup">بیک اپ</string>
<string name="backup_success">ڈیٹا بیس کا بیک اپ کامیابی کے ساتھ</string>
<string name="restore">بحال کریں۔</string>
<string name="select_theme">تھیم منتخب کریں۔</string>
<string name="stats">اعدادوشمار</string>
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<string name="apperance">Appearance</string>
<string name="data">Data</string>
<string name="backup">Backup</string>
<string name="backup_success">Database backup successfully</string>
<string name="restore">Restore</string>
<string name="select_theme">Select Theme</string>
<string name="stats">Stats</string>
Expand Down Expand Up @@ -90,4 +91,5 @@
<string name="mit_license" translatable="false">MIT License</string>
<string name="android_jetpack" translatable="false">Android Jetpack</string>
<string name="apache_license" translatable="false">Apache License 2.0</string>

</resources>
5 changes: 3 additions & 2 deletions wear/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ android {
minSdk = 30
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionName = "1.0.0"
vectorDrawables {
useSupportLibrary = true
}

setProperty("archivesBaseName", "FucksGivenWear-$versionName")
aaptOptions.cruncherEnabled = false
}

buildTypes {
Expand Down
Binary file added wear/app/release/FucksGivenWear-1.0.0-release.aab
Binary file not shown.
Binary file not shown.
Binary file not shown.
37 changes: 37 additions & 0 deletions wear/app/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "rocks.poopjournal.fucksgivenwatch",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.0",
"outputFile": "FucksGivenWear-1.0.0-release.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/FucksGivenWear-1.0.0-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/FucksGivenWear-1.0.0-release.dm"
]
}
],
"minSdkVersionForDexing": 30
}

0 comments on commit 2690793

Please sign in to comment.