Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Apr 10, 2023
2 parents ec8333e + b409ea5 commit f0ef488
Show file tree
Hide file tree
Showing 50 changed files with 293 additions and 218 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ jobs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo # Needed for reading commit message for Firebase App Distribution
uses: actions/checkout@v3

- name: Download Android Artifacts
uses: actions/download-artifact@v3
with:
Expand Down
52 changes: 28 additions & 24 deletions PrivacyPolicy.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,67 @@
## Privacy Policy

built the Currency Converter Calculator app as a Free app. This SERVICE is provided by at no cost and is intended for use as is.
Oztechan built the Currency Converter&Calculator app as an Ad Supported app. This SERVICE is provided by Oztechan at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Currency Converter Calculator unless otherwise defined in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Currency Converter&Calculator unless otherwise defined in this Privacy Policy.

## Information Collection and Use

For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.
For a better experience, while using our Service, we may require you to provide us with certain personally identifiable information. The information that we request will be retained by us and used as described in this privacy policy.

The app does use third party services that may collect information used to identify you.
The app does use third-party services that may collect information used to identify you.

Link to privacy policy of third party service providers used by the app
Link to the privacy policy of third-party service providers used by the app

* [Google Play Services](https://www.google.com/policies/privacy/)
* [AdMob](https://support.google.com/admob/answer/6128543?hl=en)
* [Google Analytics for Firebase](https://firebase.google.com/policies/analytics)
* [Firebase Crashlytics](https://firebase.google.com/support/privacy/)

* [Google Play Services](https://www.google.com/policies/privacy/)
* [AdMob](https://support.google.com/admob/answer/6128543?hl=en)
* [Firebase Analytics](https://firebase.google.com/policies/analytics)
## Log Data

I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
We want to inform you that whenever you use our Service, in a case of an error in the app we collect data and information (through third-party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing our Service, the time and date of your use of the Service, and other statistics.

## Cookies

Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
This Service does not use these “cookies” explicitly. However, the app may use third-party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.

## Service Providers

I may employ third-party companies and individuals due to the following reasons:
We may employ third-party companies and individuals due to the following reasons:

* To facilitate our Service;
* To provide the Service on our behalf;
* To perform Service-related services; or
* To assist us in analyzing how our Service is used.
* To facilitate our Service;
* To provide the Service on our behalf;
* To perform Service-related services; or
* To assist us in analyzing how our Service is used.

I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.
We want to inform users of this Service that these third parties have access to their Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.

## Security

I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.
We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security.

## Links to Other Sites

This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.
This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.

## Children’s Privacy

These Services do not address anyone under the age of 13\. I do not knowingly collect personally identifiable information from children under 13\. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
These Services do not address anyone under the age of 13. We do not knowingly collect personally identifiable information from children under 13 years of age. In the case we discover that a child under 13 has provided us with personal information, we immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact us so that we will be able to do the necessary actions.

## Changes to This Privacy Policy

I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page.

This policy is effective as of 2023-03-15

## Contact Us

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me.
If you have any questions or suggestions about our Privacy Policy, do not hesitate to contact us at [email protected].

This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/)
This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.nisrulz.com/)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import com.oztechan.ccc.android.app.di.initKoin
import com.oztechan.ccc.android.core.ad.initAds
import com.oztechan.ccc.client.core.analytics.initAnalytics

@Suppress("unused")
class Application : Application() {

override fun onCreate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class CalculatorFragment : BaseVBFragment<FragmentCalculatorBinding>() {
)
}

CalculatorEffect.TooBigNumber -> view?.showSnack(R.string.text_too_big_number)
CalculatorEffect.TooBigInput -> view?.showSnack(R.string.text_too_big_input)
CalculatorEffect.TooBigOutput -> view?.showSnack(R.string.text_too_big_output)
CalculatorEffect.OpenBar -> navigate(
R.id.calculatorFragment,
CalculatorFragmentDirections.actionCalculatorFragmentToSelectCurrencyBottomSheet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import com.github.submob.basemob.adapter.BaseVBRecyclerViewAdapter
import com.oztechan.ccc.android.ui.mobile.databinding.ItemPremiumBinding
import com.oztechan.ccc.client.core.shared.model.PremiumType
import com.oztechan.ccc.client.viewmodel.premium.PremiumEvent
import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType

class PremiumAdapter(
private val premiumEvent: PremiumEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import com.oztechan.ccc.android.ui.mobile.util.toPremiumDataList
import com.oztechan.ccc.android.ui.mobile.util.visibleIf
import com.oztechan.ccc.client.core.analytics.AnalyticsManager
import com.oztechan.ccc.client.core.analytics.model.ScreenName
import com.oztechan.ccc.client.core.shared.model.PremiumType
import com.oztechan.ccc.client.viewmodel.premium.PremiumEffect
import com.oztechan.ccc.client.viewmodel.premium.PremiumViewModel
import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import org.koin.android.ext.android.inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fun NavHostController.WatchersView(
is WatchersEffect.SelectTarget -> navigate("select_currency")
WatchersEffect.InvalidInput -> snackbarHostState.showSnackbar(it.javaClass.simpleName)
WatchersEffect.MaximumNumberOfWatchers -> snackbarHostState.showSnackbar(it.javaClass.simpleName)
WatchersEffect.TooBigNumber -> snackbarHostState.showSnackbar(it.javaClass.simpleName)
WatchersEffect.TooBigInput -> snackbarHostState.showSnackbar(it.javaClass.simpleName)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) 2020 Mustafa Ozhan. All rights reserved.
*/
@file:Suppress("unused")

package com.oztechan.ccc.android.ui.mobile.util

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.oztechan.ccc.android.ui.mobile.util

import com.oztechan.ccc.android.core.billing.model.ProductDetails
import com.oztechan.ccc.android.core.billing.model.PurchaseHistoryRecord
import com.oztechan.ccc.client.core.shared.model.OldPurchase
import com.oztechan.ccc.client.core.shared.model.PremiumData
import com.oztechan.ccc.client.core.shared.model.PremiumType
import com.oztechan.ccc.client.viewmodel.premium.model.OldPurchase
import com.oztechan.ccc.client.viewmodel.premium.model.PremiumData
import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType

internal fun List<ProductDetails>.toPremiumDataList(): List<PremiumData> = map {
PremiumData(it.price, it.description, it.id)
Expand Down
3 changes: 2 additions & 1 deletion android/ui/mobile/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) 2021 Mustafa Ozhan. All rights reserved.
-->
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="BaseAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
Expand Down Expand Up @@ -333,6 +333,7 @@
<item name="queryHint">@string/search</item>
<item name="closeIcon">@drawable/ic_close</item>
<item name="searchHintIcon">@drawable/ic_search_hint</item>
<item name="android:searchHintIcon" tools:targetApi="lollipop_mr1">@drawable/ic_search_hint</item>
<item name="searchIcon">@drawable/ic_search</item>
</style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.oztechan.ccc.android.ui.mobile.util

import com.oztechan.ccc.android.core.billing.model.ProductDetails
import com.oztechan.ccc.android.core.billing.model.PurchaseHistoryRecord
import com.oztechan.ccc.client.core.shared.model.PremiumType
import com.oztechan.ccc.client.viewmodel.premium.model.PremiumType
import kotlin.test.Test
import kotlin.test.assertEquals

Expand Down
5 changes: 4 additions & 1 deletion android/ui/widget/android-ui-widget.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ dependencies {

implementation(project(Modules.Common.Core.model))

implementation(project(Modules.Client.Core.res))
Modules.Client.Core.apply {
implementation(project(res))
implementation(project(analytics))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import androidx.glance.appwidget.GlanceAppWidgetReceiver
import com.oztechan.ccc.android.ui.widget.action.WidgetAction
import com.oztechan.ccc.android.ui.widget.action.WidgetAction.Companion.mapToWidgetAction
import com.oztechan.ccc.android.viewmodel.widget.WidgetViewModel
import com.oztechan.ccc.client.core.analytics.AnalyticsManager
import com.oztechan.ccc.client.core.analytics.model.UserProperty
import kotlinx.coroutines.runBlocking
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
Expand All @@ -17,6 +19,7 @@ class AppWidgetReceiver : GlanceAppWidgetReceiver(), KoinComponent {
override val glanceAppWidget: GlanceAppWidget = AppWidget()

private val viewModel: WidgetViewModel by inject()
private val analyticsManager: AnalyticsManager by inject()

private fun refreshData(
context: Context,
Expand All @@ -41,25 +44,51 @@ class AppWidgetReceiver : GlanceAppWidgetReceiver(), KoinComponent {
override fun onReceive(context: Context, intent: Intent) {
super.onReceive(context, intent)

when (intent.action.mapToWidgetAction()) {
WidgetAction.IDLE -> Unit
WidgetAction.REFRESH -> refreshData(context)
WidgetAction.NEXT_BASE -> refreshData(context, true)
WidgetAction.PREVIOUS_BASE -> refreshData(context, false)
WidgetAction.OPEN_APP ->
context.packageManager
.getLaunchIntentForPackage(context.packageName)
?.apply {
addFlags(
Intent.FLAG_ACTIVITY_CLEAR_TASK or
Intent.FLAG_ACTIVITY_CLEAR_TOP or
Intent.FLAG_ACTIVITY_NEW_TASK
)
}?.let {
context.startActivity(it)
}

else -> error("undefined widget action")
intent.action.let {
it.mapToWidgetAction()?.executeWidgetAction(context)
?: it.executeSystemAction(context)
}
}

private fun WidgetAction.executeWidgetAction(context: Context) = when (this) {
WidgetAction.IDLE -> Unit
WidgetAction.REFRESH -> refreshData(context)
WidgetAction.NEXT_BASE -> refreshData(context, true)
WidgetAction.PREVIOUS_BASE -> refreshData(context, false)
WidgetAction.OPEN_APP ->
context.packageManager
.getLaunchIntentForPackage(context.packageName)
?.apply {
addFlags(
Intent.FLAG_ACTIVITY_CLEAR_TASK or
Intent.FLAG_ACTIVITY_CLEAR_TOP or
Intent.FLAG_ACTIVITY_NEW_TASK
)
}?.let {
context.startActivity(it)
}
}

private fun String?.executeSystemAction(context: Context) = when (this) {
AppWidgetManager.ACTION_APPWIDGET_DELETED -> analyticsManager.setUserProperty(
UserProperty.HasWidget(false.toString())
)

AppWidgetManager.ACTION_APPWIDGET_ENABLED -> analyticsManager.setUserProperty(
UserProperty.HasWidget(true.toString())
)

AppWidgetManager.ACTION_APPWIDGET_UPDATE,
AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> refreshData(context)

// defined but no action needed system events
AppWidgetManager.ACTION_APPWIDGET_DISABLED,
AppWidgetManager.ACTION_APPWIDGET_BIND,
AppWidgetManager.ACTION_APPWIDGET_PICK,
AppWidgetManager.ACTION_APPWIDGET_CONFIGURE,
AppWidgetManager.ACTION_APPWIDGET_RESTORED,
AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED -> Unit

else -> error("undefined widget action")
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.oztechan.ccc.android.ui.widget.action

import android.appwidget.AppWidgetManager
import androidx.glance.action.ActionParameters
import androidx.glance.action.actionParametersOf
import androidx.glance.appwidget.action.actionRunCallback
Expand All @@ -13,24 +12,8 @@ enum class WidgetAction {
IDLE;

companion object {
fun String?.mapToWidgetAction() = when (this) {
// no needed to refresh
AppWidgetManager.ACTION_APPWIDGET_DISABLED,
AppWidgetManager.ACTION_APPWIDGET_DELETED,
AppWidgetManager.ACTION_APPWIDGET_ENABLED -> IDLE

// unknown ones perhaps no need to refresh (yet)
AppWidgetManager.ACTION_APPWIDGET_BIND,
AppWidgetManager.ACTION_APPWIDGET_PICK,
AppWidgetManager.ACTION_APPWIDGET_CONFIGURE,
AppWidgetManager.ACTION_APPWIDGET_RESTORED,
AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED -> IDLE

AppWidgetManager.ACTION_APPWIDGET_UPDATE,
AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED -> REFRESH

else -> WidgetAction.values().firstOrNull { this == it.name }
}
fun String?.mapToWidgetAction() = WidgetAction.values()
.firstOrNull { this == it.name }

fun WidgetAction.toActionCallback() = actionRunCallback<WidgetActionCallback>(
actionParametersOf(
Expand Down
Loading

0 comments on commit f0ef488

Please sign in to comment.