Is there any way to update the Android OS through an App(Using Android API or any other API/) after checking if a newer Android version is available in the market/Playstore
The Use Case required to be supported here is as follows:
The App starts and checks the version of the installed Android OS
It then finds the version of available Android OS in the
Playstore/other repository for that device
Then it compares the two version and if the available version is
newer, then it installs the new Android version on the device
How can it be implemented , especially the third point ? I do not want to root the device for that, so if there is any way to achieve this, please help ....
There is no API. If your device has an update feature built in (most do), you can decompile the update service and see how it works. If your device does not have an update feature, then you can look at custom ROMs for your device. Once you get ahold of a ROM or an update.zip you want to use, the process cannot be done automatically. The updating takes place in the system recovery mode where the user will have to select the .zip to update. However, if you can decompile and figure out how your manufacturer's update service works, maybe you can pull off an automated process.
There aren't any tutorials or documentation for this, as it is 100% dependent on phone model/OS. You can probably find a flashable ROM for your device, however, but the process is rarely automated. Actually, take a look at ROM Manager in this case, it is a somewhat automated upgrade app. I tried it before and it bricked my phone. Good luck
You would need to know where to ask if there is a newer version. And then is there an upgrade available for that particular device. At that point you could broadcast a request to update. Does not the device know when an update is available?
For updating your android version you would need
Custom Android on you device.(Some more info)
Rooted device.why need rooting?
Now for installing we would need to flash ROM.You would also need to have check for version of the OS available, which depend upon your logic .Generally Samsung ,Sony they use custom android and the updates are pushed over app center( or something like that,not much knowledge) in your case it may be any cloud service or server to check version for your custom android.
When we have a new version, after user accepts to upgrade, a new img file would be downloaded to your device which would be used to upgrade the OS.Please note you would also need a recovery backup method too.There are some Commands that can be used to extract and download the OS through your code.
I haven't implemented it yet but this is the procedure i could find.
I hope this would help others.
UPDATE
I have got some new information about how can we initiate the update through code. the Link and there's this another link that can be great help.
In both the examples they are using SystemRcovery class with intallerPackage API.
Related
I am soon ready to release my app on the play store but I would like to know how can I edit/add features/update my app without affecting my users. For example if I decided to add or remove something from the server I don't want the whole app to crash on the users. Basically running a clone where I can try out anything I want and it stays separate from the original app. How do I do that?
I am really sorry if I confused you all and my English is not the best.
For that you would run a development server and have multiple builds of your app.
You can use google play to distribute that app to your test users, described here or you can manually install the app on test devices. Manually installing is faster(if you have a few test users) than waiting for google play to push an update.
As for how to set it up, that would depend on what you are doing and with what tools. Usually you would set up multiple builds in android with BuildConfig.java variables. There you can either check the build type and use a specific API key/Server URL or you can pass a different value depending on the build. More info here.
Basically in your build.gradle you would have:
android {
...
buildTypes {
release {
buildConfigField("String", "SERVER_URL", "https://api.example.com/")
}
debug {
buildConfigField("String", "SERVER_URL", "https://api.dev.example.com")
}
}
}
You can switch which variant you are building from Build > Select Build Variant... or from the sidebar in Android Studio
Now you can access these from your code as:
BuildConfig.SERVER_URL
Next you would distribute that app to your test users.
As for the server side it depends on how you have it set up now and how you want to set it up.
Google Play’s Core library (on 1.5.0 or higher) has a feature for apps running on devices using Android 5.0 (API level 21) or higher and Chrome OS devices, called In-app updates. If you want users to try a new app feature or apply updates to improve performance or fix bugs, the Play Core library offers two methods. You can notify users about an available update using the Flexible or Immediate approach.
The In-app updates has a new request flow for you to prompt active users to update the app. Using the Flexible approach, the update is downloaded and installed in the background while the app is still in use. With the Immediate option, the user has to accept the update request after which Google Play manages the installation and restart the app.
Set a priority for each update in the Google Play Developer API, which determines how your app recommends an update, using an integer value between 0 and 5, with the default being 0 and 5 being the highest priority.
I'm having to create a new app for our installers and they currently have an app that they use on Android 5.1. It doesn't use either features mentioned in the title but I'm looking to implement that in the new app. I'm just curious what version do the new phones need at minimum to support an app that allows for both of those to be supported.
SNMP is going to be used to make calls to subscriber modules. Itll have to be able to use both Version 1 and Version 2. It'll be completely equipment based.
The PPTP connection will be only for the app itself. I don't want it to default all traffic the phone is using to that connection. Merely only what calls the app makes to the network. Is this even possible?
PPTP
I'd have to assume there are libraries out there for version of Android that didn't include it natively, it looks like v4.0 is the earliest Android version to include PPTP.
"Android includes a built-in (PPTP and L2TP/IPSec) VPN client, which is sometimes called legacy VPN. Android 4.0 (API Level 14)"
https://developer.android.com/guide/topics/connectivity/vpn
SNMP
The best thing I can find for SNMP is an app that uses SNMP on Android 2.3.3. Who knows what library or home-rolled code they used to do it, but it looks like you have some "wiggle room" if you're just needing it for Android v5.x.
https://snmp-agent-4a.en.aptoide.com/
Another link that shows the age of SNMP on Android doesn't say what OS version it's talking about, but we can see the images are of fairly ancient phones. It's circumstantial at best, but it looks promising for your project.
https://www.dpstele.com/snmp/monitoring-smartphone-best-practices.php
I have an application which is deployed to some pretty remote, data connection starved regions of the world, specifically to health workers.
These people have minimal data connections and the app requires regular updates to provide increased functionality and critical bugfixes.
The problem we have is that the APK for the app is 5.7mb and only going to get larger. Which means that every time the users need to update the app, they have to download the 5.7 meg apk to update. If we roll out more than one release in a week, it can eat through a significant portion of their data plan as well as time as they have to sit and wait for it to download and install.
Is there a better way to do this? Some way to patch the versus completely replacing the application on the host device so that we deploy smaller patches?
I've tried looking for examples of "host" applications, where the actual application is just a shell for a downloadable set of libraries, sort of like a plugin system, but couldn't find any examples.
Are there any resources or a standardised way to accomplish this?
Also worth noting this is a react-native app and we're already running proguard and splitting apks based on architecture to reduce the apk size.
Did you have chance to examine CodePush? It basically allows you to push updates only for javascript part (the bundle) of your app, on-the-fly, without making your users download a new version of the apk.
If you add new native code to your project, you will still need to build and release a new apk though.
How it works is that, when you update the javascript code in your app, you push a new release. When users run the application, CodePush checks if there is a new version available and if there is, update it immediately and restart the app if you mark the mentioned release as mandatory or use the newly downloaded bundle version on next run.
Edit: react-native library of CodePush is here on github.
Does anyone know if PushLink can do silent updates? That is, download the app and install it without any interaction from the user?
The PushLink website is quite sparse on documentation regarding features available so I can't be sure.
Or does anyone know if it's possible to have a silent installer for android? I basically have android devices that will not do any user interaction and I need to be able to update my apps running on them.
Yes, it is possible since version 3.1.0 released at 2012.04.23.
Take a look at NINJA strategy
NINJA (Only for rooted devices) The application is just re-launched in
a new version. There isn't notification. BETA!
There's no official way to install anything on Android device without user interaction. Which is a good thing, because it prevents a lot of possible malware and exploits from working.
What alteration should be made in a Java Application to be able to install it on Java Enabled Smartphone?
I tried using a random app of mine to see what happens, when I open it on the cell, it says Install? I say yes, and it says invalid file.
Now I was wondering what alteration should be made?
My smartphone (Samsung S8500) runs on bada which is more or less the same as Android, but alterations in the General.
You need different SDK for smartphones. Like for Android, you need Android SDK 1.5 or any other version. You just cannot install the same application. You need to develop using the resources provided by the SDK.
If your application is Java based mobile application then you can use some tools to convert it for Android. Doesn't work every time but worth a try.
In your case, Bada OS is not like Android what i learn from here. So, you need to develop the application using J2ME .