Skip to content

Commit

Permalink
add support donation
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfion committed Nov 12, 2023
1 parent 11b31c2 commit 95d750c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 17 deletions.
3 changes: 0 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@

<uses-feature android:name="android.hardware.usb.host" />

<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission
android:name="android.permission.MANAGE_DOCUMENTS"
tools:ignore="ProtectedPermissions" />

<uses-permission android:name="android.permission.INTERNET" />

</manifest>
29 changes: 15 additions & 14 deletions app/src/main/java/xyz/lazysoft/a3amp/AboutActivity.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package xyz.lazysoft.a3amp

import android.annotation.SuppressLint
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.EditText
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity


class AboutActivity : AppCompatActivity() {

private fun getVersion(): String {
Expand All @@ -22,21 +28,16 @@ class AboutActivity : AppCompatActivity() {
val titleAbout = findViewById<TextView>(R.id.title_about)

titleAbout.text = "${getString(R.string.app_name)} ${getVersion()}"
}

companion object {

/**
* Google
*/
const val GOOGLE_PUBKEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxGOZ1xt4RKuFoY2UBFO9JhuSi1Is2/QB91IVxSp+Y5lG0HgLwcjt8hfn1CTPp5yj3RLduufYALtV+xcbjH87ETrWkPez1O3nt7+SF6I/PIXF4dWdbC1QiVSHls4PWFqAghZeDMEhPH4qVayJglz/oBgnRL5X4cDErir6tGtYrDZWZz7AWVxWsfYJDIzlUPklQtEyxpYDlNybCEJzVrOGam/TYTRr3Qs2gjeUi61Uehkh1Yy/wDzvwz7ZCr2zggw2TcqN4WV1Zh6AkzZfjtuHYv9sz4qQWO6hMDiJfxRluHBTw2e1oX9d02t8RCiIRMrrQiYwTYVLzO6EN1JdFUHm9QIDAQAB"
val GOOGLE_CATALOG = arrayOf(
"donation.1",
"donation.2",
"donation.3",
"donation.5",
"donation.8",
"donation.13")
val buyMeCoffee = findViewById<Button>(R.id.button_buy_coffee)

buyMeCoffee.setOnClickListener {
val url = "https://www.buymeacoffee.com/skyfi"
val i = Intent(Intent.ACTION_VIEW)
i.data = Uri.parse(url)
startActivity(i)
}

}


Expand Down
14 changes: 14 additions & 0 deletions app/src/main/res/layout/content_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
android:layout_height="wrap_content"
android:orientation="vertical" />

<TextView
android:id="@+id/text_about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/thank_you_text" />

<Button
android:id="@+id/button_buy_coffee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buy_me_a_coffee" />



</LinearLayout>


Expand Down
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 @@ -177,4 +177,6 @@
<item>13 Euros</item>
</string-array>
<string name="donation_paypal_item">Donation</string>
<string name="buy_me_a_coffee">Buy me a coffee</string>
<string name="thank_you_text">Thank you for using 3amp! Your support helps us continue improving and providing you with the best experience. Consider supporting us to unlock new features and ensure a brighter future for 3amp.</string>
</resources>

0 comments on commit 95d750c

Please sign in to comment.