Skip to content

Commit

Permalink
#1274 feat: show a button to contact the developer if they have purch…
Browse files Browse the repository at this point in the history
…ased the assistant trigger
  • Loading branch information
sds100 committed Nov 8, 2024
1 parent 2db6560 commit cdc1a31
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/src/main/java/io/github/sds100/keymapper/util/ShareUtils.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.github.sds100.keymapper.util

import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent

object ShareUtils {
fun sendMail(ctx: Context, email: String, subject: String, body: String) {
try {
val intent = Intent(Intent.ACTION_SEND)
intent.type = "vnd.android.cursor.item/email"
intent.putExtra(Intent.EXTRA_EMAIL, arrayOf(email))
intent.putExtra(Intent.EXTRA_SUBJECT, subject)
intent.putExtra(Intent.EXTRA_TEXT, body)
ctx.startActivity(intent)
} catch (_: ActivityNotFoundException) {
}
}
}
7 changes: 7 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@
<string name="about_team_bydario_name" translatable="false">Darío B. C. (bydariogamer)</string>
<string name="about_team_bydario_url" translatable="false">https://github.com/bydariogamer</string>
<string name="about_team_bydario_role">Translator (Spanish)</string>

<!-- About -->

<!-- Advanced triggers -->
Expand All @@ -1382,6 +1383,8 @@
<string name="advanced_triggers_sheet_text">The developer doesn\'t believe ads are a sustainable or user-friendly form of monetization so these paid triggers help support development ❤️. You will be given priority support as well.</string>
<string name="assistant_trigger_product_title">Assistant trigger</string>
<string name="assistant_trigger_product_description">Did you know you can remap your device assistant? Instead of launching Google Assistant or Bixby, your device can perform an action of your choice. It works even when the screen is off!</string>
<string name="assistant_trigger_purchase_thank_you_title">Thank you for supporting the app ❤️!</string>
<string name="assistant_trigger_purchase_thank_you_message">Your purchase was successful and you can now use the assistant triggers. As a paying user of Key Mapper you will receive priority support to help you to use the app. There is now a button on this page to contact the developer.</string>

<!-- Purchasing -->
<string name="unlock_product_button">Unlock (%s)</string>
Expand All @@ -1394,4 +1397,8 @@
<string name="purchasing_error_store_problem">Google Play encountered an error.</string>
<string name="purchasing_error_dialog_title">Something went wrong 😕</string>
<string name="purchasing_error_dialog_button_retry">Retry</string>
<string name="purchasing_contact_developer_button">Contact developer</string>
<string name="purchasing_contact_email" translatable="false">[email protected]</string>
<string name="customer_email_subject" translatable="false">Key Mapper Pro query</string>
<string name="customer_email_body" translatable="false">Please describe the problem you are having here.</string>
</resources>

0 comments on commit cdc1a31

Please sign in to comment.