How to update Android Apps Outside of Google Play

Here’s a DIY on how to programmatically make your Android phone look like an iPhone.

Having an Android device is beneficial as we can install apps as per our need. Many of us might already be familiar with Google play store which is the app store for Android and have been using it for downloading apps. It is Play Store which is responsible for notifying us of any updates to the installed app. These updates might carry bug fixes, enhancements to existing features or may also include addition of new features.

However, it is up to the users to decide whether to permit Play Store to update these installed apps to the latest version or not. Despite all these facts, Google has not restricted users to get apps from outside its play store. And this is where Google separates itself from other mobile platforms.

The main issue with Google play store updates is the fact that the store takes its own time for updates. To explain further, once the latest application has been uploaded to the store, it lines up all the existing users in a queue and then starts pushing the updates to the users, one by one. Thus, if the number of users are more, it takes more time. If at all, the new application has to reach all the users immediately, then we may have to handle the update programmatically by leaving Google Play store’s auto -update functionality.

Apart from Google play store, there are many other app stores where you can upload the application binaries (apk files).  Even in these stores, users can download the app by sharing app link and also provide updates whenever a latest version of app is available on the store. Some app stores provide free publishing as well.

 Given below are a few such app stores for Android:

  1. Amazon App Store
  2. Mobile Market
  3. Opera Mobile Store

However, this is not the only way you can install an app. You can install apps even without publishing it in any of the above mentioned third-party stores.

 How to programmatically install/update apps?

 Given below are instructions to achieve successful installation/updation of a mobile app without using Google Play store or any other store.

  • For devices, if it is the first time that you are installing any app outside Google Play Store, you can go to Settings and select Applications to check the “Unknown Sources”.
  • Build your app always with a valid version code and version name, and always ensure that manifest file of the app is updated to the next incremental number in version code.
  • <manifest xmlns_android="http://schemas.android.com/apk/res/android"
     package="com.example.app"
     android_versionCode="1"
     android_versionName="1.0" >

    Once the build is ready it can then be either placed in phone storage for installing it and upgrading to the latest build directly by using any file manager. Or can be placed in any webserver or a cloud space provider like dropbox and can use that link for downloading and then installing on the device.

  • The best approach to follow will be in instances where the user gets a notification for new updates using custom GCM push notification. The user can then decide on whether he wants to update the app immediately or later. But once clicked on notification, the code can be put to download the file and then go for installation.
  • Following code can be used to install/update the application after successful download of apk:
    Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("file://" + appFilelocation.toString()), "application/vnd.android.package-archive"); startActivity(intent);

    AndroidManifest.xml requires following permission:

  • <uses-permission android_name="android.permission.INTERNET" />
     <uses-permission android_name="android.permission.INSTALL_PACKAGES" />
     <uses-permission android_name="android.permission.WRITE_EXTERNAL_STORAGE" />

    User vs System Mobile Apps

    These apps can be just User Apps or System Apps. User Apps are ordinary apps which do not interact with internally restricted features on the device. System apps can be a combination of user apps along with codes written to interact with system restricted features. If your app is System App, then it can change the entire way of downloading and installing the new updates for the device to a whole new level. Instead of asking user permission for updating, it can be coded to an extent that the power of installing the updates is decided by the app itself and can be automatically updated without the user’s notice!

Enjoy Building!! In case you need expert help, reach out to us. Trigent’s mobility experts have decades of experience working on different platforms, tools, and technologies to guide and support your application development.

Rooting process in Android phones: Do you get more than you lose?

For a normal user, Android looks straightforward and simple. However, most users may not be aware that rooting is a process in Android which allows users to attain privileged control over various Android subsystems.  To simplify, rooting is a prison break in Android which gives the user control over the device. With this control, akin to administrative rights, one can customize an entire Android OS on the device, based on requirements.

Advantages:

  • Rooting can help in achieving great power for speeding up a device and can also boost battery power.  It is definitely advantageous if the right apps are installed, i.e. certain apps that can actually automate hibernation of unused apps which are running in background.
  • It can also be used to block ads.  There are possibilities of apps which display ads and these ads access and drain mobile data without one’s knowledge.
  • If a phone is stuck with outdated OS and manufacturers have no plans to upgrade or they take ages to send update via OTA, my advise is to get it rooted as there are various groups of ROM developers, ready to launch latest updates as fast as possible. These ROMs can  provide from basic  to high-end levels of customization in Android.
  • Rooting can have customized ROM running in devices which can change  the complete look and feel of  the device, enhance user interface and offer better features. This in turn can help to discard existing boring UI and transform it into rich UI.  For instance,  the regular keyboard which you get in a device can be given a theme of your choice, you can boost up the scrolling speed. To summarise, you can do anything and everything imaginable in terms of customizing. One of the most popular ROMs today is called CyanogenModbe, found in OnePlus devices .
  • Most of the phones these days come up with many unwanted and unused apps, which might be using more space and/or are not that great with UI. For those of you who have low memory space on the device,  rooting will be of great help as it can transfer the apps from internal to SD card. However there are some apps that can provide you with the option to move to SD card without getting it rooted.

Disadvantages:

  • If rooted, there is a high risk of missing  over-the-air (OTA) updates for the device. And, in case if you find any notification for OTA update its better to not upgrade as you might lose your power in root access.
  • Rooting your device is perfectly legal, but in most cases it is going to mean that your phone is no longer covered by its warranty. Thus, if you need to get your device serviced, you will need to  un-root your device. However, you would be wise to check on this before embarking on your journey.
  • There is a huge risk in  the device getting bricked, which means the device will have lesser functionalities though this might not harm the device. It is always better to do a soft-brick of device, so that it can be completely recovered in case of any error in rooting. Hard brick is not recoverable.
  • You might run the risk of inviting malware into the device, as acquiring root access can easily breach the security placed by Android OS. If an antivirus is not installed onto the device there are chances of gettingthe root infected with spyware, trojan, worms and viruses. You might thus end up losing your private data, be it your contact list, text messages or email. This can even go  up to the level of losing confidential data such as credit card information, password and username.

Conclusion:

To summarize, you can definitely get more from rooting but it comes with a price. Now that you have an idea on what rooting does to your phone  it is up to you to decide. If you think that rooting the phone to run special applications and custom ROM is worth it, go ahead. If you think it is not worth the hassle, then my advise is, `don’t take the risk!’. At the end of the day, it depends on your usage and what you want from your phone. It is always recommended to proceed with caution.  A backup plan is also advisable, no matter how high your level of expertise!