Skip to content

Commit

Permalink
Add purchase terms in about section
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalNehra committed Jan 1, 2024
1 parent a32d1f2 commit 050d4c0
Show file tree
Hide file tree
Showing 35 changed files with 74 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/amaze/fileutilities/utilis/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class Utils {
var log: Logger = LoggerFactory.getLogger(Utils::class.java)

const val URL_PRIVACY_POLICY = "https://teamamaze.xyz/privacy-policy-utilities"
const val URL_SUBSCRIPTION_TERMS = "https://teamamaze.xyz/subscription-terms-utilities"
const val URL_LICENSE_AGREEMENT =
"https://github.com/TeamAmaze/AmazeFileUtilities/blob/main/LICENSE.txt"
const val URL_GITHUB_ISSUES =
Expand All @@ -147,6 +148,7 @@ class Utils {
fun openURL(url: String?, context: Context) {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(url)
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
try {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
Expand Down Expand Up @@ -740,9 +742,9 @@ class Utils {
dialog.dismiss()
}
.setNegativeButton(
context.resources.getString(R.string.close)
) { dialog, _ ->
dialog.dismiss()
context.resources.getString(R.string.terms_and_conditions)
) { _, _ ->
openURL(URL_SUBSCRIPTION_TERMS, context)
}
return builder
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-af-rZA/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ar-rSA/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ca-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-cs-rCZ/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-da-rDK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-el-rGR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-en-rUS/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-fi-rFI/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-fr-rFR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-hi-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-hu-rHU/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-iw-rIL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ml-rIN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-nl-rNL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-no-rNO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pl-rPL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pt-rPT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ro-rRO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-ru-rRU/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-sr-rSP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-sv-rSE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-tr-rTR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-uk-rUA/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-vi-rVN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rHK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,4 +1033,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1041,4 +1041,6 @@
<string name="group_by">Group By</string>
<!-- list fragments banner options hint -->
<string name="sort_by">Sort By</string>
<!-- subscription terms in purchase dialog -->
<string name="terms_and_conditions">Terms and Conditions</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ class Billing(val context: Context, private var uniqueId: String) :
.setTitle(R.string.subscribe)
.setNegativeButton(R.string.close) { dialog, _ ->
dialog.dismiss()
}.setNeutralButton(context.getString(R.string.terms_and_conditions)) {
_, _ ->
Utils.openURL(Utils.URL_SUBSCRIPTION_TERMS, context)
}
val inflater = activity.layoutInflater
val dialogView: View = inflater
Expand Down

0 comments on commit 050d4c0

Please sign in to comment.