From c45a52d7a8ef3bf196f92ddfa6713c77360a87b0 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 00:07:02 +0530 Subject: [PATCH 01/14] Update build.gradle --- app-upgrade-android-sdk/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app-upgrade-android-sdk/build.gradle b/app-upgrade-android-sdk/build.gradle index 70ae501..837a287 100644 --- a/app-upgrade-android-sdk/build.gradle +++ b/app-upgrade-android-sdk/build.gradle @@ -48,7 +48,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' + implementation 'com.google.android.material:material:1.6.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.4' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' @@ -66,4 +66,4 @@ afterEvaluate { } } } -} \ No newline at end of file +} From ac93634e6d0b6b28a6091f54d0802297af5723cf Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 00:07:34 +0530 Subject: [PATCH 02/14] Update build.gradle --- app/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 370552e..64b11e5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,11 +35,10 @@ dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' + implementation 'com.google.android.material:material:1.6.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation project(path: ':app-upgrade-android-sdk') - implementation project(path: ':app-upgrade-android-sdk') testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file +} From 0fe9dd2bbcaf2601edb9ff209eb5b7398b184fb9 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 00:40:22 +0530 Subject: [PATCH 03/14] Update README.md --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 19cad92..fa37a51 100644 --- a/README.md +++ b/README.md @@ -65,35 +65,35 @@ val appInfo = AppInfo( //Optional val alertDialogConfig = AlertDialogConfig( - title: "Update Required", //Default: Please Update - updateButtonTitle: "Update Now", //Default: Update Now - laterButtonTitle: "Not Now" //Default: Later + title = "Update Required", //Default: Please Update + updateButtonTitle = "Update Now", //Default: Update Now + laterButtonTitle = "Not Now" //Default: Later ) -appUpgrade = AppUpgrade() +val appUpgrade = AppUpgrade() appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig) ``` #### Java ```java - String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; +String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; - String appId = "com.android.com"; - String appName = "Wallpaper app"; - String appVersion = "1.0.0"; - String platform = "android"; - String environment = "production"; +String appId = "com.android.com"; +String appName = "Wallpaper app"; +String appVersion = "1.0.0"; +String platform = "android"; +String environment = "production"; - AppInfo appInfo = new AppInfo(appId, appName, appVersion, platform, environment); +AppInfo appInfo = new AppInfo(appId, appName, appVersion, platform, environment); - String title = "Update Required"; - String updateButtonTitle = "UPDATE"; - String laterButtonTitle = "Not Now"; +String title = "Update Required"; +String updateButtonTitle = "UPDATE"; +String laterButtonTitle = "Not Now"; - AlertDialogConfig alertDialogConfig = new AlertDialogConfig(title, updateButtonTitle, laterButtonTitle); - - AppUpgrade appUpgrade = new AppUpgrade(); - appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig); +AlertDialogConfig alertDialogConfig = new AlertDialogConfig(title, updateButtonTitle, laterButtonTitle); + +AppUpgrade appUpgrade = new AppUpgrade(); +appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig); ``` ### Note: From b2865e12d2e67dc32431a0b5c725b882dedd821e Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:00:57 +0530 Subject: [PATCH 04/14] Update CHANGELOG.md --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fce4273..f57d63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes will be documented in this file. +## [1.0.1] - 2023-01-12 + +* Fix material dependency. + ## [1.0.0] - 2023-01-10 -* Hello World!. \ No newline at end of file +* Hello World!. From bb983e2259ef98e1de384b29ecc77f2e3e854b64 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:01:18 +0530 Subject: [PATCH 05/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fa37a51..71f632e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ allprojects { 2. Add the dependency to your project ```groovy dependencies { - implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.0' + implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.1' } ``` From 2b1fd2a44b6353169abdecbefb8c1eae34a67f17 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:11:25 +0530 Subject: [PATCH 06/14] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 71f632e..9dc1ed7 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,11 @@ dependencies { } ``` +3. Internet Permission required. Add the following in AndroidManifest.xml file. +``` + +``` + ## How to use it. 1. Register on App Upgrade and follow the instructions to create project and get the x-api-key. 2. Use the SDK. From 039c75a62decf25209dd73bb89d36684bf545064 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:40:43 +0530 Subject: [PATCH 07/14] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9dc1ed7..d025934 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ dependencies { 2. Use the SDK. #### Kotlin +Add the following code in your MainActivity.kt ```kotlin val xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5" @@ -80,6 +81,7 @@ appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig) ``` #### Java +Add the following code in your MainActivity.java ```java String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; From ae12b3b903311c048d596247ea8a757f9e316b25 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:49:09 +0530 Subject: [PATCH 08/14] Update README.md --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d025934..9727be3 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ dependencyResolutionManagement { } } ``` -If you are using gradel version prior to 7.x.x add the following in your build.gradle at the end of repositories: +If you are using gradle version prior to 7.x.x add the following in your build.gradle at the end of repositories: ``` allprojects { repositories { @@ -39,6 +39,16 @@ allprojects { } ``` +For build.gradle.kts +``` +allprojects { + repositories { + ... + maven ("https://jitpack.io") + } +} +``` + 2. Add the dependency to your project ```groovy dependencies { @@ -56,7 +66,7 @@ dependencies { 2. Use the SDK. #### Kotlin -Add the following code in your MainActivity.kt +Add the following code in your MainActivity.kt -> onCreate method. ```kotlin val xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5" @@ -81,7 +91,7 @@ appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig) ``` #### Java -Add the following code in your MainActivity.java +Add the following code in your MainActivity.java -> onCreate method. ```java String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; From 17bfae99f369e6f309128b5f843eb72499092cc1 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:50:37 +0530 Subject: [PATCH 09/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9727be3..44b73fe 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ dependencies { } ``` -3. Internet Permission required. Add the following in AndroidManifest.xml file. +3. Internet Permission required. Add the following in AndroidManifest.xml file if not already present. ``` ``` From f215b7afa9f731ac3d2d72f87cd3706af347cca8 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 01:51:25 +0530 Subject: [PATCH 10/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44b73fe..07de480 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,8 @@ appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig); ``` ### Note: -2. For opening the app store or play store the app should be live. -3. It might not be able to open the app store or play store in simulator. You can try it in physical device. +1. For opening the app store or play store the app should be live. +2. It might not be able to open the app store or play store in simulator. You can try it in physical device. ## Screenshot From 2b3914da06ccfa9044e13295fddeaffba7e9311b Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 02:00:52 +0530 Subject: [PATCH 11/14] Update README.md --- README.md | 96 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 07de480..6e9506c 100644 --- a/README.md +++ b/README.md @@ -69,48 +69,70 @@ dependencies { Add the following code in your MainActivity.kt -> onCreate method. ```kotlin -val xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5" - -val appInfo = AppInfo( - appId = "com.android.com", - appName = "Wallpaper app", - appVersion = "1.0.0", - platform = "android", - environment = "production" -) - -//Optional -val alertDialogConfig = AlertDialogConfig( - title = "Update Required", //Default: Please Update - updateButtonTitle = "Update Now", //Default: Update Now - laterButtonTitle = "Not Now" //Default: Later -) - -val appUpgrade = AppUpgrade() -appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig) +class MainActivity : AppCompatActivity() { + + private lateinit var appUpgrade: AppUpgrade + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + val xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5" + + val appInfo = AppInfo( + appId = "com.android.com", + appName = "Wallpaper app", + appVersion = "1.0.0", + platform = "android", + environment = "production" + ) + + //Optional + val alertDialogConfig = AlertDialogConfig( + title = "Update Required", //Default: Please Update + updateButtonTitle = "Update Now", //Default: Update Now + laterButtonTitle = "Not Now" //Default: Later + ) + + appUpgrade = AppUpgrade() + appUpgrade.checkForUpdates(this, xApiKey, appInfom alertDialogConfig) + + // appUpgrade.checkForUpdates(this, xApiKey, appInfom) + } +} ``` #### Java Add the following code in your MainActivity.java -> onCreate method. ```java -String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; - -String appId = "com.android.com"; -String appName = "Wallpaper app"; -String appVersion = "1.0.0"; -String platform = "android"; -String environment = "production"; - -AppInfo appInfo = new AppInfo(appId, appName, appVersion, platform, environment); - -String title = "Update Required"; -String updateButtonTitle = "UPDATE"; -String laterButtonTitle = "Not Now"; - -AlertDialogConfig alertDialogConfig = new AlertDialogConfig(title, updateButtonTitle, laterButtonTitle); - -AppUpgrade appUpgrade = new AppUpgrade(); -appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig); +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; + + String appId = "com.android.com"; + String appName = "Wallpaper app"; + String appVersion = "1.0.0"; + String platform = "android"; + String environment = "production"; + AppInfo appInfo = new AppInfo(appId, appName, appVersion, platform, environment); + + // Optional + String title = "Update Required."; + String updateButtonTitle = "UPDATE"; + String laterButtonTitle = "Not Now"; + AlertDialogConfig alertDialogConfig = new AlertDialogConfig(title, updateButtonTitle, laterButtonTitle); + + AppUpgrade appUpgrade = new AppUpgrade(); + appUpgrade.checkForUpdates(this, xApiKey, appInfo, alertDialogConfig); + + // appUpgrade.checkForUpdates(this, xApiKey, appInfo); + } +} ``` ### Note: From 470bac3625b05f4daeefa919b888438274c1c289 Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Thu, 12 Jan 2023 02:03:35 +0530 Subject: [PATCH 12/14] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e9506c..0233f7b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ dependencyResolutionManagement { } } ``` -If you are using gradle version prior to 7.x.x add the following in your build.gradle at the end of repositories: +If you are using gradle version prior to 7.x.x add the following in your root build.gradle at the end of repositories: ``` allprojects { repositories { @@ -39,7 +39,7 @@ allprojects { } ``` -For build.gradle.kts +For Kotlin build.gradle.kts syntax is: ``` allprojects { repositories { @@ -52,7 +52,7 @@ allprojects { 2. Add the dependency to your project ```groovy dependencies { - implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.1' + implementation 'com.github.appupgrade-dev:app-upgrade-android-sdk:1.0.1' //replace with latest version } ``` @@ -77,6 +77,7 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) + // App Upgrade val xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5" val appInfo = AppInfo( @@ -94,7 +95,7 @@ class MainActivity : AppCompatActivity() { laterButtonTitle = "Not Now" //Default: Later ) - appUpgrade = AppUpgrade() + val appUpgrade = AppUpgrade() appUpgrade.checkForUpdates(this, xApiKey, appInfom alertDialogConfig) // appUpgrade.checkForUpdates(this, xApiKey, appInfom) @@ -112,6 +113,7 @@ public class MainActivity extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + // App Upgrade String xApiKey = "ZWY0ZDhjYjgtYThmMC00NTg5LWI0NmUtMjM5OWZkNjkzMzQ5"; String appId = "com.android.com"; From 987810a633806d737c91e98c9dd9e7d73398070f Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Fri, 13 Jan 2023 05:05:27 +0530 Subject: [PATCH 13/14] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0233f7b..850ad7d 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,8 @@ public class MainActivity extends AppCompatActivity { ### Note: 1. For opening the app store or play store the app should be live. 2. It might not be able to open the app store or play store in simulator. You can try it in physical device. +3. You can find a sample Kotlin app from here [app-upgrade-android-kotlin-demo-app](https://github.com/appupgrade-dev/app_upgrade_android_kotlin_demo_app) and a sample Java app from here [app-upgrade-android-java-demo-app](https://github.com/appupgrade-dev/app_upgrade_android_java_demo_app) +4. Read detailed blog on how to integrate Kotlin app from here [How to upgrade/force upgrade Android Kotlin app](https://appupgrade.dev/blog/how-to-force-upgrade-android-kotlin-app) and Java app from here [How to upgrade/force upgrade Android Java app](https://appupgrade.dev/blog/how-to-force-upgrade-android-java-app) ## Screenshot From baacbb42756c211c3d3e448a1582674d37ef981c Mon Sep 17 00:00:00 2001 From: App Upgrade Date: Sat, 14 Jan 2023 00:50:35 +0530 Subject: [PATCH 14/14] Add jitpack badge --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 850ad7d..8b639e8 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ Android SDK for [App Upgrade](https://appupgrade.dev) App Upgrade is a service let your users know when to upgrade your apps or force them to upgrade the app. -[![Twitter](https://img.shields.io/twitter/follow/app_upgrade?style=social)](https://twitter.com/app_upgrade) -[![YouTube](https://img.shields.io/youtube/channel/subscribers/UC0ZVJPYHFVuMwEsro4VZKXw?style=social)](https://www.youtube.com/channel/UC0ZVJPYHFVuMwEsro4VZKXw) +[![](https://jitpack.io/v/appupgrade-dev/app-upgrade-android-sdk.svg)](https://jitpack.io/#appupgrade-dev/app-upgrade-android-sdk) Many times we need to force upgrade mobile apps on users' mobile. Having faced this issue multiple times decided to find a better way to tackle this problem. After doing some research on how people are doing this there are so many custom solutions or checking with the play store or AppStore API if there is a new version available. Although this works if we just want to nudge users that there is a new version available. It doesn't solve the problem where we want to make a decision.. whether it's a soft graceful update or we want to force update. So here is this product that will make developers' life easy. We can set custom messages.. see the versions in beautify dashboard, and many exciting features in the roadmap ahead.