I tried using JSOUP library to get the application version for the play-store website.
But it's not working as google has updated their website structure recently.
I am working on java platform.
What's the best way to get the version of the application.
if your purpose is to provide update control you can use AppUpdateManager. Thanks to AppUpdateManager, you can check if there is an update, show an automatic message to the user and download the update. At the same time, it offers 2 options called IMMEDIATE and FLEXIBLE. With these options, you have the chance to make the update mandatory or optional.
for more : https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateManager
Related
I want to prevent users to open application when there is emergency updates for the application and make user to update the application to open and run it successfully. The easiest way to solve this problem for me is implementing a simple version check to check the current version and last published version from server. But I think it might be a common requirement between android developers so if you mind to let me know if there are any react-native library in that developed to solve this problem for me.
Your approach is the correct, check serverside if the version is the correct, if not, you can handle different approaches to prevent running.
Take the user to a "update required" page with no exit.
Show an alert with no buttons and cancellable:true [only tested on android]
Disable the apis used making the app unavailable
Etc
what I have:
a mobile app, that checks the current version of an application after each auth and shows a special dialog box with some info - a new version of software is available or you can't use the application before it willn't be updated. But this functional is not available for all users.
a server that handles any request from the mobile app (e.g. serching by criteria) and responses to a client
what I need:
after adding a new functional to the app, it shouldn't be available for old versions (e.g. the current app version is 1.1.1 and new modifications are used only since the app has version 1.1.2). Modifications can be variety.
what I can:
make a force updating all clients that have the old version of the app and coerce all users to update the app after new modifications will have been made by regular updates (e.g. once a month).
create a table Filter, add types of modifications, modifications, and special params and modify functions by the values from the table Filter.
All of these ways seems to me like a dirty hack.
I want to know is there any way to do this better. Has anyone faced with such problems and have a good idea to resolve it better? Thanks.
Normally force to update is not very nice aproach, but if you really need it, you can put User-Agent header in all your requests to server and create a filter there (on the server), which will return specific error to all the requests made with app version less than the version you want. Then in the app you can handle this specific error and show so called screen of death.
Also you can version API. Say you added new fields in the response of /users endpoint. So v1.1.1 can do calls to /v1/users and v1.1.2 can work with /v2/users.
In general idea is that client app is very light and it is up to server to decide what and how to return.
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.
I want to use the following style:
<item name="android:actionBarItemBackground" tools:ignore="NewApi">#drawable/blank</item>
However, to do so, I have to use an API version above my apps minimum. If I do decide to use this style, will API's below the supporting version just ignore this style, or will this cause an application failure?
Your application will show errors when building. I don't think you can deploy an application to an AVD, or test device if it has active errors.
You can create though folders designated for newer-older API levels and try to bypass your issue like this.
Also, check out the official Android Docs. click me!
I need to develop some jira gadget.
The gadget must have a chart and the possibility to insert external data and diplay it in the chart.
I have been trying the tutorial on atlassian documentation but I don't see any instruction on how to insert charts and how to do it, I think are made with JQuery (if it's correct, there are sample to use? I'm not really in to JQuery). Another problem that I found, is that there is no much explenation on how to get data from Jira (directly). I have seen the "jira api" (all the java interfaces) but I couldn't really get them work.
Anybody that know some better tutorial, gadget source example or that can help me on getting started?
Thanks.
I agree, developing JIRA gadgets with charts is harder than it should be. I have spent some time recently creating a plugin for a client that uses the JIRA system gadgets with some changes and it has been too much work. The charts in JIRA gadgets are created using JFreeChart.
If you can use an external visualization library such as Google Visualization then this example may help: https://labs.atlassian.com/wiki/display/JUA/JIRA+User+Activity
Change the pom.xml to refer to JIRA 4.2 at the bottom in two places and it compiles fine using the usual Atlassian PDK.
~Matt