AppUpdateManager | In-app update
kandi X-RAY | AppUpdateManager Summary
kandi X-RAY | AppUpdateManager Summary
In-app update. Based on DownloadManager.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Displays progress dialog
- Show the install dialog
- Adds a dialog to the dialog list
- Invoked when download is completed
- Shows the progress dialog
- Show the disabled dialog
- Show a dialog to show the retry dialog
- Returns the checksum of a file
- Shows the confirmation dialog
- Start the download process
- Converts bytes to hex
- Updates the app update manager
- Checks if the download manager service is available
- Shuts down the progress dialog
- Destroy the application
- Clear the thread pool
- Clear the dialog list
- Update the content view
- Get an instance of the InstanceManager
- Queries download progress
AppUpdateManager Key Features
AppUpdateManager Examples and Code Snippets
Community Discussions
Trending Discussions on AppUpdateManager
QUESTION
I have below code which I have implemented the InAPPUpdate code successfully, Which is working fine as per the below screenshot. However, in this implementation User can still cancel the InAppUpdate using the (X) close button and also while downloading the app update user can still cancel the update.
My Question is there a way we can ABSOLUTELY force the end-user to update the app? Unless they update I need to stop them from using the app.
N.B: (Please don't ask why we need to force it's not the question for the discussion)
...ANSWER
Answered 2022-Jan-27 at 11:31You need to override onActivityResult() in your class which extends Activity like this:
QUESTION
I am trying to implement in app updates in my app, but there is a disconnect between the documentation/tutorials that I have looked at and the actual final implementation.
I followed various code tutorials from:
https://developer.android.com/guide/playcore/in-app-updates/kotlin-java#start-update https://www.section.io/engineering-education/android-application-in-app-update-using-android-studio/ https://medium.com/android-news/implement-in-app-update-in-android-68892bd11e35 https://www.raywenderlich.com/8034025-in-app-updates-getting-started
The code itself is fairly straightforward.
But what I found missing from all of these tutorials was how to actually call the in-app updates. These tutorials all seem to make a dedicated in-app update activity. How do I launch this in-app update activity from my main activity? Or alternatively, how do I incorporate the in app update code into my already existing main activity?
I assume I want some sort of async launch of an in app update listener or something along those lines, but I can't seem to wrap my head around the last step of integrating all the in-app update code/in-app update activity into my app.
Edit: here's a sample of what I've tried
...ANSWER
Answered 2021-Aug-30 at 17:25are you looking for this:
call to prompt for FlexibleUpdate, this will pop up the google prompt and the user can tap "Install" from there. It seems to handle the download/install all in one and i dont have to do the "reload" snackbar step the docs were talking about.
QUESTION
Following is the code inside my SplashActivity.kt
. Whenever there is an update available, mostly it doesn't show at all, but I think that is not because of any mistake in my code but as I learned it takes some time to show the user about the new update. My concern now is that when it shows the in-app update screen, it goes off and the app continues to the next screen and it doesn't ask the user to update the app to continue using the app. Have I made a mistake?
ANSWER
Answered 2021-Oct-12 at 12:02You have navigation logic inside postDelayed
. You are explicitly navigating to new activity after 2500 ms. So the code is doing exactly what you wrote.
If you want to navigate after checking for the update then you probably should move navigation logic to addOnSuccessListener
although it does seems like a hack too. Either way i wouldn't do this check in the splash screen but in some more "static" screen that does not have navigation on timer set
QUESTION
I have a problem with inapp update. A new version window appears, when you press the "Update now" button, unfortunately nothing happens, the application downloads in the background, but nothing happens app is not updated. I would like to add that I am testing it on the "Open Test" in play store path.
...ANSWER
Answered 2021-Oct-12 at 15:12You are using the FLEXIBLE
method for updating the App, which will download the app but will not auto-update it.
You have to monitor the flexible update progress and once the update is downloaded, you have to install it manually.
QUESTION
I tried below code from this url but the update popup never opens. I did internal testing app. I get toast message only till Toast(On CheckUpdate method,...)
.
I am basically trying to show in-app updates(Immediate) popup for users to allow update to the app but popup never shows up. Did i am writing incorrectly or i am missing something! Your help will be highly appreciated.
Whats wrong in below code?
...ANSWER
Answered 2021-Jun-12 at 11:07In-app updates works only if the current installed app version is lesser than the one in the Playstore. Until then you will not see any popup.
If you want to check whether your code is properly working or not you can use the option called Internal app sharing from developer console.
To use internal app sharing you need to build to apps one with the higher version and a normal version. For instance, if you current version code is 5 then build an app with version code 6 and upload this into Internal app sharing enable the account you want to check and you'll get the pop-up as you're looking for.
These are some answers and documentation you can folow.
For any other help please comment.
Update: This is the working code I'm using in my app for triggering updates.
QUESTION
I'm trying to implement the in-app updates on a new App I just created on Android Studio for testing. The app is just a "hello world" but I implemented the in-app updates checker as it says in these two pages:
https://developer.android.com/guide/playcore/in-app-updates#kotlin
https://johncodeos.com/how-to-implement-in-app-updates-in-android-using-kotlin/
We're using Google play for work (or the actual name for a "private acces" play store) where we upload our business App's, and these Apps are only for employees to use in stores. But even so, this Apps have a link, same as normal ones (https://play.google.com/store/apps/details?id=country.company.appname.something)
I think I understand how it works (more or less) but before uploading the app I want to check directly with another app link if it works.
My question is if I can use one of this links of one of our Apps (on a phone with acces and already configured, of course) to check if the update availability checker works or if I can only use it on the new App I'm doing and hence I need to upload it and do all the process with this "test" App
I put here the code so you can see it. Some snackbars are just for tracing the flow of the code.
UpdateInApp.kt class:
...ANSWER
Answered 2021-Apr-14 at 10:20I think it's not possible, since what I'm trying to do could only be done changing the Bundle ID, and that would cause some compatibility issues based on more than just one app sharing the same one.
For the record, when I refer to the Bundle ID I mean applicationId
on the build.gradle file.
QUESTION
I'm trying to use the in-app update (https://developer.android.com/guide/playcore/in-app-updates) to detect and install updates for my application which was published as a private app (from an EMM console).
Even if the app is visible in the Play Store the in-app update mechanism doesn't detect it immediately, but after a few hours. Is this the expected behavior?
May it be related to the fact the app is a private app?
Here's my code to check & perform the update
...ANSWER
Answered 2021-Jan-08 at 09:59well, I do observe delay with between different users when updating any app - some of them will get an update in a hour, some will get stuck with old version (no update in Play Store) for hours, even more than a day. few years ago it was even few days, also on start of pandemia... so I guess this is how it just works, such big system (distributing lot of apps worldwide) need some time to process and propagate
PS. never used this app update mechanism, just described common way
QUESTION
I tried to resolve this error but I wasn't successful with it. When is open the application the app crashes and stops instantly. Is there something am not doing right?
...ANSWER
Answered 2020-Nov-24 at 14:13if you want to fetch the rootview for your activity then you should use :- findViewById(android.R.id.content).getRootView()
. (You are missing getRootView()
here).
Or else you can also use requireView().rootView
and it will return you root view of your fragment and have a look at this answer as well to get rootview from your activity.
QUESTION
I want to update my app immediately every time I publish an update. I followed the instructions from the official android documentation on how to test the auto update feature , but nothing happens. I placed some logs in order to check whether these functions initialize, but the logcat shows nothing either. Is this a problem in my syntax, or should I place these functions somewhere else? Currently, all my update code is written inside the main, starting class of the app.
On create method of the class
...ANSWER
Answered 2020-Aug-24 at 11:30I suggest you to move all your AppUpdateInfo
retrieving to onResume()
since it is more reliable entry point of an activity (for example, if Activity has came to background and then was opened again by user). OnCreate method will be called only if activity was destroyed, since that, you may not see update dialog after reopening application if it was minimized.
QUESTION
I am showing rating popup on a different interval in my App and after the upgrade, I want to show rating popup from starting interval. For that, I have to reset its config on upgrade.
I have implemented In-App Upgrade in my App but for some reason that I don't know why it's not working can someone help me with this? It's not going to onSuccess method. I checked the developer doc, but still wondering how its checking update available or not??
...Checked-in Debug & Jenkins generated apk. Is there anything that I need to look out for?
ANSWER
Answered 2020-Jun-04 at 07:09Before working on In-App update there are few points you have to keep in mind:
You will get the event only when for your applications is live which means a lower version of your app should be there in Playstore.
If net was not there in the phone and new apk was uploaded then also your phone will not get the update.
for above point you have to make sure that your phone's playstore is synced with server when internet is working fine.
You may need to clear cache and data of the Google Play Store app on your device. Go to: Settings → Applications → Application manager (or find the Google Play Store in the list) → Google Play Store app → Clear Cache, Clear Data.
for more information please check the link in official site of google developer.
Hope it helps.
Thank you!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AppUpdateManager
You can use AppUpdateManager like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the AppUpdateManager component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page