66
77[ ![ Android Arsenal] ( https://img.shields.io/badge/Android%20Arsenal-Easy%20App%20Updater-brightgreen.svg?style=flat )] ( https://android-arsenal.com/details/1/7388 ) [ ![ Codacy Badge] ( https://app.codacy.com/project/badge/Grade/7e8f094fd77044b5b26bc6c157bfbbc3 )] ( https://app.codacy.com/gh/SirLordPouya/AndroidAppUpdater/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade ) [ ![ ] ( https://jitpack.io/v/SirLordPouya/AndroidAppUpdater.svg )] ( https://jitpack.io/#SirLordPouya/AndroidAppUpdater ) [ ![ API] ( https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat )] ( https://android-arsenal.com/api?level=16 ) [ ![ ktlint] ( https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg )] ( https://ktlint.github.io/ )
88
9- Android App Updater is a simple yet powerful library for displaying an update dialog in your app. It supports multiple app stores and direct download links. You can use it as a ** DialogFragment** or a ** Composable ** component .
9+ ** Android App Updater** is a powerful and flexible library to display an update dialog in your Android app. It supports multiple app stores and direct APK download links. Use it easily with ** DialogFragment** or ** Jetpack Compose ** .
1010
1111<p align =" center " >
1212 <img src =" https://raw.githubusercontent.com/SirLordPouya/AndroidAppUpdater/master/pics/header.png " width =" 800 " >
@@ -16,7 +16,7 @@ Android App Updater is a simple yet powerful library for displaying an update di
1616
1717### Step 1: Add JitPack Repository
1818
19- Add the following to your project' s ** build.gradle.kts** :
19+ Add the following to your project’ s ** build.gradle.kts** :
2020
2121``` kotlin
2222allprojects {
@@ -26,10 +26,19 @@ allprojects {
2626}
2727```
2828
29+ Or to your project’s ** settings.gradle.kts** :
30+ ``` kotlin
31+ dependencyResolutionManagement {
32+ repositories {
33+ maven ( url = " https://jitpack.io" )
34+ }
35+ }
36+ ```
37+
2938### Step 2: Add Dependencies
3039
3140``` kotlin
32- // For standard Android projects
41+ // For DialogFragment integration
3342implementation(" com.github.SirLordPouya.AndroidAppUpdater:main:latest_version" )
3443
3544// For Jetpack Compose integration
@@ -38,8 +47,6 @@ implementation("com.github.SirLordPouya.AndroidAppUpdater:compose:latest_version
3847
3948## 🎯 Supported App Stores
4049
41- The library supports the following app stores:
42-
4350| Store | Enum |
4451| ----------------------| -----------------------------------|
4552| Google Play | AppStoreType.GOOGLE_PLAY |
@@ -61,9 +68,7 @@ The library supports the following app stores:
6168
6269## 📌 Usage
6370
64- ### Defining App Stores
65-
66- To add stores where users can update the app:
71+ ### Define App Stores
6772
6873``` kotlin
6974val storesList = listOf (
@@ -75,18 +80,45 @@ val storesList = listOf(
7580)
7681```
7782
78- ### Adding a Direct Download Link
83+ ### Default Store Icons
84+
85+ All supported store icons are available in the library. You can use them directly:
86+
87+ | Market Name | Icon Resource |
88+ | ----------------------| --------------------------------------------|
89+ | Google Play | R.drawable.appupdater_ic_google_play |
90+ | Huawei App Gallery | R.drawable.appupdater_ic_app_gallery |
91+ | Samsung Galaxy Store | R.drawable.appupdater_ic_galaxy_store |
92+ | Amazon App Store | R.drawable.appupdater_ic_amazon_app_store |
93+ | Xiaomi GetApp Store | R.drawable.appupdater_ic_get_app_store |
94+ | Oppo App Market | R.drawable.appupdater_ic_oppo_app_market |
95+ | F-Droid App Store | R.drawable.appupdater_ic_fdroid |
96+ | Aptoide App Store | R.drawable.appupdater_ic_aptoide |
97+ | OneStore App Market | R.drawable.appupdater_ic_one_store |
98+ | Vivo V-AppStore | R.drawable.appupdater_ic_v_app_store |
99+ | 9-Apps Market | R.drawable.appupdater_ic_nine_apps |
100+ | ZTE App Center | R.drawable.appupdater_ic_zte_app_center |
101+ | Lenovo App Center | R.drawable.appupdater_ic_lenovo_app_center |
102+ | Tencent App Store | R.drawable.appupdater_ic_tencent_app_store |
103+ | Cafe Bazaar Store | R.drawable.appupdater_ic_bazar |
104+ | Myket App Store | R.drawable.appupdater_ic_myket |
105+
106+ 👉 ** Note** : Make sure to import:
107+ ``` kotlin
108+ import com.pouyaheydari.appupdater.R.*
109+ ```
79110
80- Add these permissions to your ` AndroidManifest.xml ` :
111+ ### Add a Direct Download Link
81112
82- ``` xml
113+ Add the required permissions to your ` AndroidManifest. xml` :
83114
115+ ``` xml
84116<uses-permission android : name =" android.permission.INTERNET" />
85117<uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
86118<uses-permission android : name =" android.permission.REQUEST_INSTALL_PACKAGES" />
87119```
88120
89- Then, add a direct download link:
121+ Then create the download link:
90122
91123``` kotlin
92124val directDownloadLinksList = listOf (
@@ -97,9 +129,9 @@ val directDownloadLinksList = listOf(
97129)
98130```
99131
100- ### Showing the Update Dialog
132+ ### Show the Update Dialog
101133
102- #### ✅ Using Jetpack Compose
134+ #### ✅ With Jetpack Compose
103135
104136``` kotlin
105137var shouldShowDialog by remember { mutableStateOf(true ) }
@@ -120,7 +152,7 @@ if (shouldShowDialog) {
120152}
121153```
122154
123- #### ✅ Using Fragments
155+ #### ✅ With Fragments
124156
125157``` kotlin
126158val data = UpdaterDialogData (
@@ -138,12 +170,9 @@ AppUpdaterDialog.getInstance(data).show(supportFragmentManager, "UPDATE_DIALOG")
138170
139171## 🎨 Customization
140172
141- ### Overriding Default Texts
142-
143- Modify ` strings.xml ` to customize text:
173+ You can override default texts in ` strings.xml ` :
144174
145175``` xml
146-
147176<resources >
148177 <string name =" appupdater_please_wait" >Please wait</string >
149178 <string name =" appupdater_downloading_new_version" >Downloading new version...</string >
0 commit comments