Silent autoupdate running Android application - android

From what I read on SO, it seems that I want the impossible (?)
I have a kiosk-like app that is supposed to run 24/24, 7/7, 365/365. This makes it hard/impossible to update the app. As far as I know, Google Play will not start the update (even if Autoupdate is set for my app) while my app is running.
I read across SO and several forums an found a lot of NO's and CON's. My current answer is that is not possible without rooting the device or without some system certificates and so on.
But still, I have the following scenario:
I created a google account myGoogleAccount#gmail.com
On my device I add this account and install my application from Google Play store.
On my desktop machine I log into GPlay with the same account and I go to my application and I see that my app is Installed. If I click on the Installed button I can see my device.
I publish a new version of the app, when the app becomes available, from my application's page open on desktop I can send a command to update the app.
I get the prompt to accept the terms bla-bla, and once I accept it, the app is automatically updated even if it is currently running.
Basically this is the behavior I am interested in. My question is: can I run this scenario from my device [invoking some GPlay api's] given the fact that I can provide the google account credentials to the app, so that no user intervention is required to update the app and to accept whatever unchanged permissions?

Related

Android Device Admin app enabled by default

I have a question about admin apps on Android that I can't find the answer to. I followed the guide on creating an admin app from here:
https://developer.android.com/guide/topics/admin/device-admin#java
I successfully created an admin app but there's something that's confusing me. I have a fresh device (Moto G6) and when I go into Settings->Security&Location->DeviceAdminApps I see a list of admin apps on the device. Right now it lists my app and a Google Play Services app titled "Find My Device". The only difference, though, is that the google app was on by default. Normally, and including in my app, when I try to use an admin feature (through DevicePolicyManager), an android page pops up asking me to enable it as an admin app. Since the Google app is already enabled, that pop up doesn't need to appear.
So, my question is how do I make an app an admin app by default (without needing the pop up page)? I assume something needs to be done on boot up but I have no idea what that Google app does. Does anyone out there have any idea?
So, my question is how do I make an app an admin app by default (without needing the pop up page)?
Build your own firmware with your own custom build of Android, where you pre-install your device admin app and set things up for it to be pre-enabled.
Alternatively, I think if you create a device owner app, it will be enabled upon installation, but that installation happens when the device is being first set up.
Ordinary device admin apps require users to agree to enable them, for blindingly obvious security reasons.

Detecting if an app was preinstalled on a device

My application is going to be preinstalled on a vendor device (eg. Vodafone/T-Mobile/ATT is going to sell phones with my app preinstalled). This preinstalled app is very lightweight - only landing page with Update button, which redirects to the Google Play.
I'd like to track how many users coming from this preinstalled app (how many of them sign up, bought subscription, etc.).
Scenario 1:
User starts a phone for a first time
User opens preinstalled app
I can save in shared preferences that user opened app and read it in real updated version
Scenario 2:
User starts a phone for a first time
Preinstalled app is being updated in background through Play Store
I do not recieve any broadcasts (eg. BOOT_COMPLETED) because app was never opened
User opens updated version -> I do not know if he's coming from preinstalled app or not
My question is how to solve scenario 2?
I had that problem too, but didn't find a solution that fit my needs (other than don't update the store version for a few months after releasing the OEM version). You can't save anything if the app wasn't opened, but maybe you can try to read the install date:
long installed = context
.getPackageManager()
.getPackageInfo(context.getPackag‌​eName(), 0)
.firstInstallTime;
(copy&paste from https://stackoverflow.com/a/5311917/2694254, there are also other solutions to get the install date on that site)
You would still have to make some assumptions, like "if app was installed but not opened on the same day" if your App is already publicly released before the OEM App is installed.

Dynamically changes in android installed app those changes reach to live users installed app

I actually want's to reach app changes in to user installed app.How this can possible.
1- My app is live on play store.
2- There are 30,000 of live users.
There is a bug in app and i resolved that bug now i don't want to upload new version of app on play store there is only small change so i don not update that version to play store now i don't want all users will update for small change updated build.
What i need to do for this if there is any tool to user device installed app that bug fixed which is i resolved.
I am not using Web-services for that change so data is not depend on web server.
Is there any tool or any other way to reach users installed device that change for that all these changes reflect to user installed app??.
without any user authentication by playstore.
or is there any way to reach these changes to user device.
No, like it or not, but there's no mechanism you can use to replace installed app or hot swap it portions on user's device other than reinstall.
In future release you could add ie push messages telling user to download the update from your server (but that would require enabled sideloading to have it installed).
There is only single answer all over the stack or E- bloggers as well google Developers answers.
We can upload our build at Google play store at Strict mode , Strict mode make without user authentication or permissions update build and that build reach to user installed device .
In case of (User must have Internet connection or when user get connected by internet or WiFi same time app automatically update without any User Intersection or this process user can not view that particular app is updated or not) if user know this particular app previous version like "1.1" and now "1.2" then only user can understand app is updated in my device without user permission.
Google added this in Play store publisher account this feature for Developers some of the developers know very well but some not.
All changes Reach to user installed app in this case user not required to make app update from Play Store.

How to update Android app automatically, without "yes/no" prompts?

I have a problem with updating an Android app. My requirements to the application are:
It must work constantly (24/7);
Updating should also be automatic, with no user input.
I uploaded the application to the developer console to conduct beta-testing. Then, I installed it on the tablet (I used URL).
Then, I uploaded the update, but the application does not start the updating process automatically.
There are no added additional permissions. The "automatic updates" are turned on in Play Market settings.
4 days have passed. If I go to the app's page in the market, I see that an update is available, but it does not start the download process.
The question is: what may be the problem? Why does the app not update?
Is it possible that the app gets reinstalled instead of an update (thus requiring some user input to proceed)?
Thank you in advance!
in Google play store app, open side menu, go to settings, enable auto update apps. It should do the trick
The Google Play auto update solution does not seem to work, when the app is always running. The way to achieve it through enterprise management tools.

Remote update app across multiple devices

I am currently investigating ways of remotely updating an Android app installed on a number of devices. The app in question is to be used on phones which we will provide to a number of demonstrators as part of product presentations. For this reason we don't want to publish the app on Google Play to be available for the public at large.
I've read that you can restrict access to the device on Google Play, but only according to criteria such as location, device type, android version, etc. Another way is to set up a version for beta testing, for which you can select testers, however this is only available to those who are part of a Google group or a Google+ community (according to here).
I've come across another post which details how to install an apk programmatically, however it appears to install the apk automatically, ie it doesn't appear to check whether or not the update is actually a new version.
One idea I have in mind is to upload new version on a repository and broadcast to devices which have the app installed, of which we have stored device ids. Is this possible?
What we do is sync periodically to a remote server during data entry on the app. During this sync, we check to see whether the device has the latest version of the software. If it doesn't, the new apk is downloaded and the user is prompted to install the software.
This is accomplished using a separate installer app we created. We have a service that keeps the app alive in the background, so it looks like the user never actually leaves the app during the install.
Would be happy to post code on the installer.
You can see the self installer here: https://github.com/techartist/SelfInstall-Jelly-Bean/
You should try Beta by Crashlytics, it's email-based.
You should try beta or alfa testing in gplay.
Also you can hardcode the date of ending and not to open application after this date.

Categories

Resources