Skip to content

Commit

Permalink
feat: Added open-source libraries screen and improved UI
Browse files Browse the repository at this point in the history
Enhanced user experience and transparency:

- Added a dedicated screen to display the used open-source libraries.
- Included the EULA in the app's settings.
- Improved the logic for opening notification settings.
- Made various UI enhancements, including animated snackbars and improvements to the About screen.
- Updated several dependencies to the latest versions.
  • Loading branch information
Mihai-Cristian Condrea committed Nov 21, 2024
1 parent 849ac94 commit b156724
Show file tree
Hide file tree
Showing 16 changed files with 411 additions and 105 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Version 1.1.1

- **New**: Improved cart screen layout to better distinguish between in-cart and pickup items.
- **Minor**: Enhanced snack bar animations for a more engaging user experience.
- **Minor**: Added support for Traditional Chinese.
- **Minor**: Performed quality improvements and updated project dependencies.
- **Minor**: Implemented a new color palette to enhance the visual consistency and aesthetics of
static elements within the user interface.
- **Fix**: Fixed a bug that caused the incorrect cart to be shown when quickly accessing a freshly
created one.

# Version 1.1.0

- **New**: Integrated haptic feedback for swipe gestures, enhancing the tactile response and user
Expand Down
75 changes: 75 additions & 0 deletions EULA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# End-User License Agreement (EULA)

This End-User License Agreement ("EULA") governs your use of any and all software applications
developed and distributed by D4rK. By installing,
copying, using, or redistributing the Software, you acknowledge that you have read, understood, and
agree to be bound by the terms of this EULA.

## License Grant

The Developer grants you a non-exclusive, revocable, worldwide, royalty-free license to use the
Software for personal, non-commercial purposes, subject to the limitations set forth in this EULA.
Unless otherwise expressly stated in writing by the Developer, you may not:

* Sublicense, distribute, or transfer the Software to any third party.
* Modify, adapt, translate, reverse engineer, decompile, or disassemble the Software.
* Remove, alter, or obscure any copyright, trademark, or other proprietary notices contained in the
Software.
* Use the Software in any way that violates any applicable laws or regulations.
* Use the Software to engage in any illegal, harmful, or offensive activity.
* Use the Software to infringe the intellectual property rights of any third party.

## Intellectual Property

The Software and all related intellectual property rights, including but not limited to copyrights,
trademarks, and trade secrets, are owned by the Developer. This EULA does not grant you any
ownership rights in the Software.

## Disclaimer of Warranties

THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE DEVELOPER DOES NOT
WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE, UNINTERRUPTED, OR FREE OF VIRUSES OR OTHER HARMFUL
COMPONENTS.

## Limitation of Liability

IN NO EVENT SHALL THE DEVELOPER BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR
EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO DAMAGES FOR LOSS OF PROFITS, DATA, OR USE, ARISING
OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF THE DEVELOPER HAS BEEN ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.

## Term and Termination

This EULA is effective upon your acceptance and shall continue until terminated. Your rights under
this EULA will terminate automatically without notice from the Developer if you breach any term of
this EULA. Upon termination, you must cease all use of the Software and destroy all copies in your
possession.

## Governing Law

This EULA shall be governed by and construed in accordance with the laws of Romania. Any dispute
arising out of or in connection with this EULA shall be subject to the exclusive jurisdiction of the
competent courts of Bucharest, Romania.

## Contact Information

If you have any questions or concerns regarding this EULA, please contact the Developer
at d4rk7355608@gmail.com.

## Open Source Components

This Software may incorporate or utilize certain open-source components. These components are
governed by their respective licenses, which can be
found 'About' or 'Legal' section of the app. Your use of these components is
subject to the terms of their respective licenses.

## Changes to this EULA

The Developer reserves the right to modify this EULA at any time. Any changes will be effective upon
posting the revised EULA at https://github.com/D4rK7355608/com.d4rk.cartcalculator/EULA.md. Your
continued use of the Software after the effective date of any changes constitutes your acceptance of
the revised EULA.
19 changes: 16 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.googlePlayServices)
alias(libs.plugins.googleOssServices)
alias(libs.plugins.googleFirebase)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.devToolsKsp)
alias(libs.plugins.about.libraries)
}

android {
Expand All @@ -15,7 +15,7 @@ android {
applicationId = "com.d4rk.cartcalculator"
minSdk = 23
targetSdk = 35
versionCode = 66
versionCode = 67
versionName = "1.1.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
resourceConfigurations += listOf(
Expand Down Expand Up @@ -44,11 +44,21 @@ android {
}
}

signingConfigs {
create("release") {
keyAlias = "key0"
keyPassword = "GoogleD4rK10"
storeFile = file("C:/Users/mihai.condrea/StudioProjects/com.d4rk.cartcalculator/app/src/main/play/keys/com.d4rk.cartcalculator.jks")
storePassword = "GoogleD4rK10"
}
}

buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
isDebuggable = false
signingConfig = signingConfigs.getByName("release")
}
debug {
isDebuggable = true
Expand Down Expand Up @@ -104,7 +114,6 @@ dependencies {
implementation(dependencyNotation = libs.play.services.ads)
implementation(dependencyNotation = libs.billing)
implementation(dependencyNotation = libs.material)
implementation(dependencyNotation = libs.play.services.oss.licenses)
implementation(dependencyNotation = libs.review.ktx)
implementation(dependencyNotation = libs.app.update.ktx)
implementation(dependencyNotation = libs.volley)
Expand Down Expand Up @@ -148,6 +157,10 @@ dependencies {
// Image Compression
implementation(dependencyNotation = libs.coil.compose)

// About
implementation(dependencyNotation = libs.aboutlibraries)
implementation(dependencyNotation = libs.core)

// Test
testImplementation(dependencyNotation = libs.junit)
androidTestImplementation(dependencyNotation = libs.androidx.junit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package com.d4rk.cartcalculator.data.core

import android.annotation.SuppressLint
import android.app.Activity
import android.app.Application
import android.os.Bundle
Expand Down Expand Up @@ -34,13 +35,17 @@ class AppCoreManager : MultiDexApplication(), Application.ActivityLifecycleCallb

companion object {
lateinit var database : AppDatabase
@SuppressLint("StaticFieldLeak")
lateinit var instance: AppCoreManager
private set
}

private var currentStage = AppInitializationStage.DATA_STORE
private var isAppLoaded = false

override fun onCreate() {
super.onCreate()
instance = this
registerActivityLifecycleCallbacks(this)
ProcessLifecycleOwner.get().lifecycle.addObserver(observer = this)
database = Room.databaseBuilder(this , AppDatabase::class.java , "Cart Calculator")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.d4rk.cartcalculator.ui.components

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.SnackbarDuration
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

@Composable
fun Snackbar(
message : String , showSnackbar : Boolean , onDismiss : () -> Unit
) {
val snackbarHostState = remember { SnackbarHostState() }

LaunchedEffect(showSnackbar) {
if (showSnackbar) {
snackbarHostState.showSnackbar(message , duration = SnackbarDuration.Short)
onDismiss()
}
}

Box(
modifier = Modifier.fillMaxSize()
) {
SnackbarHost(
hostState = snackbarHostState , modifier = Modifier.align(Alignment.BottomCenter)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import com.d4rk.cartcalculator.R
import com.d4rk.cartcalculator.ui.components.animations.bounceClick
import com.d4rk.cartcalculator.ui.components.dialogs.VersionInfoAlertDialog
import com.d4rk.cartcalculator.utils.IntentUtils
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.d4rk.cartcalculator.utils.rememberHtmlData
import com.google.android.play.core.review.ReviewInfo

@OptIn(ExperimentalMaterial3Api::class)
Expand All @@ -67,6 +67,11 @@ fun HelpScreen(activity : HelpActivity , viewModel : HelpViewModel) {
val view : View = LocalView.current
val showDialog : MutableState<Boolean> = remember { mutableStateOf(value = false) }
val reviewInfo : ReviewInfo? = viewModel.reviewInfo.value

val htmlData = rememberHtmlData()
val changelogHtmlString = htmlData.value.first
val eulaHtmlString = htmlData.value.second

if (reviewInfo != null) {
LaunchedEffect(key1 = reviewInfo) {
viewModel.requestReviewFlow()
Expand Down Expand Up @@ -145,11 +150,13 @@ fun HelpScreen(activity : HelpActivity , viewModel : HelpViewModel) {
)
})
DropdownMenuItem(modifier = Modifier.bounceClick() ,
text = { Text(text = stringResource(com.google.android.gms.oss.licenses.R.string.oss_license_title)) } ,
text = { Text(text = stringResource(R.string.oss_license_title)) } ,
onClick = {
view.playSoundEffect(SoundEffectConstants.CLICK)
IntentUtils.openActivity(
context , OssLicensesMenuActivity::class.java
IntentUtils.openLicensesScreen(
context = context ,
eulaHtmlString = eulaHtmlString ,
changelogHtmlString = changelogHtmlString
)
})
}
Expand All @@ -169,8 +176,7 @@ fun HelpScreen(activity : HelpActivity , viewModel : HelpViewModel) {
view.playSoundEffect(SoundEffectConstants.CLICK)
viewModel.reviewInfo.value?.let { safeReviewInfo ->
viewModel.launchReviewFlow(
activity ,
safeReviewInfo
activity , safeReviewInfo
)
}
} ,
Expand All @@ -180,19 +186,18 @@ fun HelpScreen(activity : HelpActivity , viewModel : HelpViewModel) {
contentDescription = null
)
} ,
modifier = Modifier
.bounceClick())
modifier = Modifier.bounceClick())
} ,
) { paddingValues ->
Box(
modifier = Modifier
.padding(start = 16.dp, end = 16.dp)
.padding(start = 16.dp , end = 16.dp)
.fillMaxSize()
.safeDrawingPadding()
) {
Column(modifier = Modifier.padding(paddingValues)) {
Text(
text = stringResource(id = R.string.faq),
text = stringResource(id = R.string.faq) ,
modifier = Modifier.padding(bottom = 24.dp)
)
Card(modifier = Modifier.fillMaxWidth()) {
Expand Down
Loading

0 comments on commit b156724

Please sign in to comment.