linkedin February 2019 - pCloudy

How to Analyze Data to Predict Your Optimum Device & Test Coverage?

Avinash
By Avinash
February 26, 2019
10 min Read
Share This Article
How to Analyze Data to Predict Your Optimum Device & Test Coverage?

It’s time to predict

Imagine that you developed a mobile app but it does not work properly on some devices as the device fragmentation is getting more complex with time. This will be a tester's nightmare as the users will drop the ratings of the app which will lead to a decrease in the downloads.

Teams need to consider the device usage patterns across geographies to test their apps. This will lead to smooth app functionality across all digital channels. This is the need of the hour.

We can optimize the device and test coverage by using data analytics in app testing instead of relying on guesswork. You can also watch the webinar video where we have covered this topic extensively.


Before we move on, let’s understand some of the terms that will be used in this article.

Terminology

Term Description
Stock Android A basic and unmodified version of OS developed by Google.
Android Custom ROM Read Only Memory modified to provide better functionality than that in Stock Android.
Manifest file The manifest file describes essentialinformation about your app to the Android
build tools, the Android operating system, and Google Play.
Compile SDK version The version of Android that the build tools uses to compile and build the application in
order to release, run, or debug
Minimum SDK version The oldest version that you want your app to support.
Target SDK version The version of Android that your app was created to run on.

The growing complexities of Device Fragmentation

While 70% of the Apple devices are running on the latest iOS 12, only 0.1% of the Android devices run on the latest Android 9.0. According to statista.com, Android 7.0 is still being used by 19% of the Android users, followed by Android 6.0 with 21.6% Android user share. Around 7.8% of the Android users are still using Android 4.4 which was released in 2013. In 2018, 88% of the mobile devices were running on Android operating system compared to 12% iOS devices.

It is not feasible to run a test on all the devices as the permutations will be huge. There are 16 device display categories, 20 different resolutions, 15 android versions, 400 android device manufacturers and multiple cellular networks. I am sure you will be able to relate to it. So, there are two traditional ways to create an optimum device matrix. First is based on market penetration and the second is based on device diversity. Here is a brief overview of both the ways we have been using on our convenience.

To get a better understanding of the device fragmentation based on operating system, we need to understand the basics of Android architecture. So let's get on with it.

Android Architecture

Android is an open source operating system based on the Linux kernel created for an array of devices. Android has a five-layer architecture as mentioned below:

  • Linux Kernel: It is the base of the Android operating system. It gets the
    work done from the hardware for e.g. camera, display, Wi-Fi etc.
  • Hardware Abstraction Layer: It provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware components, such as the camera or Bluetooth module.
  • Native C/C++ libraries: It consists of some logical instructions that are sent to the kernel to perform an action.
  • Android Runtime: It compiles the applications from java code to byte code which Linux can understand.
  • JAVA API Framework: The entire feature-set of the Android OS is available to you through APIs are written in the Java language. These APIs form the building blocks you need to create Android apps.
  • System Apps: These are apps built in the device like calculator, clock, calendar etc.


android-stack_2x

Source: https://developer.android.com/guide/platform/

In some cases, mobile device manufacturers make customizations in the Android architecture to enhance the user experience. That is done by using custom ROM.

Why bugs occur

One of the major reasons for bugs is the fast evolving Android platform. If you have built an application then you need to ensure that the app works on various API levels that are still used widely. Every new API level launch comes with changes in the guidelines and this raises the chances of app failure. Many brands like Xiaomi, One Plus, Huawei etc, keep releasing new phones and as an update, they customize the ROM. All their devices have diverse specifications like screen size, RAM, processor, camera etc. In the table below you will see the layers of android app stack and how they are divided into two sections the higher level and the lower level.

Why bugs occur?

The OEMs make changes in the lower level system to add a device specific functionality by creating a supporting driver at the hardware abstraction layer. So if the driver has a bug than the higher level system will have a bug too as the APIs communicating with those drivers will also have the bugs. The OEMs also change the higher level system to enhance their UI and these changes also create compatibility issues.

OEMs customizations and its impact

According to Statcounter, this year's data shows that Samsung and Apple have almost 32% and 23% of the market share in mobile sales worldwide. Chinese companies like Xiaomi, Huawei, and Oppo has around 20% market share combined. There are several local OEM's in many countries adding to the diversity in mobile devices. Many OEM uses custom ROMs to provide added features but custom ROMs comes with some duplicate apps.

Most of the custom ROMs like MIUI and Oxygen OS has its own calendar app, music app, and their own browser. UI skins are a significant source of fragmentation in OEMs. This means that we need to consider custom ROMs while creating a strategy for device coverage.


Device Fragmentation

How Android evolved and its impact

Android has released many versions and API levels since its inception. API level is a unique identification code which is given to every framework API revision offered by a version of Android. For e.g., Android 8.0 is API level 26, Android 8.1 is API level 27 and the next version Android 9.0 is API level 28. Developers can specify the compile SDK version, target SDK version and a minimum SDK version in the manifest file of an app as it tells you which app is supported by a particular device.


API level

What we have seen so far

We have observed a trend in the occurrence of compatibility issues and their root causes. We can divide the compatibility issues into two groups, device specific and non-device specific. In device specific issues the first and the most common root cause is problematic driver implementation. For e.g., there was an issue in some devices related to the proximity sensor. If you bring the device near your year the touch screen should get disabled but that didn't happen in those devices. The second root cause is OS customization. Some devices brought the multi-window support feature where you can open multiple application in a single screen. That
feature created a lot of bugs in most of the applications. The third issue is peculiar hardware composition.

Type Root Cause Percentage of Issues Issue Examples
Device-Specific Problematic Driver Implementation 23% Proximity Sensor issue in Samsung devices
OS Customization 10% Multi window support
Peculiar hardware composition 7% Amazon Fire: OMX Codec issue
Non-device Specific Android Platform API evolution 47% API level 26: 8.0: Internationalization
Original Android System bugs 13% Android 8.1 Bluetooth issue

The majority of compatibility issues falls under non-device specific issues. Most common of these are due to changes in the Android platform APIs. In Android 8.0 API level 26, there was an internationalization failure. That means if your app is built to work with different languages than it will show a bug. The second root cause in non-device specific issues is the original Android system bug. These issues are resolved quickly as soon as these bugs are reported to Google it releases a patch to fix it.

How to predict

Android regularly publishes release notes on its forums which talks about the behavior changes for all apps. These changes include power management, security behavior changes, Android test changes etc. They also inform about the behavior changes for new apps targeting the particular API level. This information will help you to predict and plan your test cases. You can select the devices for which you need to plan your testing and the functionalities that you need to focus on where there are maximum chances of failure.

For example, if your app uses the current location of the user, then Android 8.0 will have an impact because android has restricted the number of location update when the app uses the background service. You must have observed a lag in the map location in all the delivery service apps like Ola, Swiggy, Uber eats, etc. Another example can be the background execution limit. Apps running in the background consumes device resources and result in unpleasant user experience. That's why Android 8.0 has limited the background execution limit.

We have created a cheat code by analyzing the data that you can refer to perform testing on Android 8.0 and Android 9.0.
Click on this link to download the cheatcode

Conclusion

It's high time that we say testing is just not enough. It's time to predict. Data has a lot to say. You can utilize it to help you in various ways. When predicted accurately, it can take your testing to another level.


Related Articles:

  • Why Choose Automation for Cross Browser Testing
  • A Brief Overview Of Regression Testing
  • How to Measure the Success of End to End Testing
  • Mobile Responsive Testing and Debugging on Real Devices
  • Mobile Devops+Agile – Challenges and Keys to Success
  • Avinash
    Avinash

    Avinash Tiwari is a thought leader, a recognized keynote speaker, and the co-founder of pCloudy.com. He has 15+ experience in Product development and Testing. He brings with him a passion for emerging technology and quick adoption, both of which have solidified his reputation as a leader in the mobile app testing field.

    Related Articles

    October 19, 2020
    Hustler's Mantra: Adopt an experimental Mindset

    "The very basis of creative work is irreverence. The very basis of creative work is bold experimentation. There has never been a creator of lasting importance who has not also been an innovator"– Eric Temple Bell Most of us are…

    Learn More Arrow

    October 19, 2020
    iPhone 12 Launch, Features and Updates

    The number of active users from last year released by apple showed that there are close to 1.4 billion people in the world that use an iPhone. The number is only growing and adding more revenue to innovate and come…

    Learn More Arrow

    October 16, 2020
    Summary of pCloudy’s New Pricing Plan

    This summary should help you understand the key upgrades we have made in terms of the Pricing and Benefits. We hope this page is helpful and urge you to read it in full to take advantage of the new pricing…

    Learn More Arrow

    Executing ADB Shell Commands

    Anshuman Chatterjee
    By Anshuman Chatterjee
    February 25, 2019
    4 min Read
    Share This Article
    Executing ADB Shell Commands

    You can fix the issues in your Android phone by connecting it with your computer and writing some easy commands. For this, you will need some command line tools which you can download from the Android developer’s site. If you are using Windows then you will need to visit the manufacturer’s page for your device and download the ADB and fastboot drivers for Windows. But first, let’s understand what are Android shell commands.

    Android Shell Commands

    ADB is Android Debug Bridge which is a command line utility included with Google’s Android SDK. It provides a terminal interface to control your Android device connected to a computer using a USB. ADB can be used to run shell commands, transfer files, install/uninstall apps, reboot and more. You can also backup and restore your android devices using these commands.

    Want to test your Mobile App?

    Join pCloudy Platform!

    pCloudy also allows you to execute ADB Shell Commands on the connected device to perform mobile testing.

    Select your desired device from the list and connect.

    Click on “Execute ADB” icon.

    While trying to execute ADB Shell command, you just need to follow few simple steps as given below:

    1. Select a device from the displayed list

    click-on-connect-to-access-the-device

    2. Confirm connection of your selected device

    pcloudy-select-device

    3. The connected device is ready testing

    adb shell commands

    4. Enter ADB shell command to the given text box

    enter-adb-shell-command-to-the-given-text-box

    5. Execute given ADB shell command

    execute-given-adb-shell-command

    6. Android ADB shell command execution result

    adb-shell-command-execution-result

    adb-shell-command-execution-result

    Useful Android terminal commands:

    1. ADB reboot-bootloader and reboot recovery commands:

    This command will let you can reboot your device in the bootloader. If due to some malware your device is stuck or if your device is not rebooting then you can connect your device to the computer and run this command to reboot. To run the command just type adb reboot-bootloader in the command line and to boot the device in recovery just type adb reboot recovery.

    2. Fastboot device command:

    Fastboot is a diagnostic and engineering protocol that you can boot your Android device into. ADB does not work in the bootloader. If you have to boot into Android and the debugging tools are not active to communicate then you can use the fastboot command. Type fastboot devices in the prompt and you get the serial number.

    3. Fastboot unlock command

    Fastboot flashing unlock command unlocks your bootloader. This command is not supported in many phones that support fastboot but you can check if your phone supports it. Just type fastboot flashing unlock in the command prompt and hit enter.

    4. ADB sideload command:

    You can download the update zip file in your phone instead of waiting for the update to be pushed into the phone. To do that just download the update to your computer and connect your device to the computer. Now reboot into recovery on your phone and using the volume buttons choose to apply update from ADB. then open command line and type ADB sideload Full-Path-to-the-file.zip and hit enter.

    A lot of users create android shell commands root in a device in spite of security. The adb reboot-bootloader command allows you to boot directly to your phone’s bootloader. Once you’re in the bootloader, ADB shell commands won’t work anymore. That’s where Android ADB fastboot command comes into the picture. Fastboot allows you to send commands to your phone while in the boot loader.

    ADB Shell Commands for Reference

    Adb Shell commands

    Action performed by command

  • adb shell dumpsys batterystats
  • collects battery data from your device

    adb shell ls

    list directory contents

    adb shell ls -a

    do not hide entries starting with

    adb shell ls -i

    print index number of each file

    adb shell ls -s

    print size of each file, in blocks

    adb shell ls -n

    list numeric UIDs and GIDs

    adb shell ls -R

    list subdirectories recursively

    adb shell netstat

    list tcp connectivity

    adb shell pwd

    print current working directory location

    adb shell dumpstate

    dumps state

    adb shell ps

    print process status

    adb shell am start -a
    android.intent.action.VIEW -d

    opens browser

    adb shell am start -t image/* -a android.intent.action.VIEW

    opened gallery

    Want to test your Mobile App?

    Join pCloudy Platform!


    Related Articles:

  • 7 Types Of Mobile App Testing
  • pCloudy Mobile App Testing Platform – On Boarding Guide
  • App Testing during your Dev Cycle – Developer Tool to Access Real Devices on Cloud
  • Basics of Appium Mobile Testing
  • Selenium Testing For Effective Test Automation
  • Anshuman Chatterjee
    Anshuman Chatterjee

    Anshuman Chatterjee is a technical consultant at pCloudy who enjoys traveling and singing. When he is not working, you would find him reading Sidney Sheldon and Agatha Christie.

    Related Articles

    April 19, 2020
    What’s New In pCloudy 5.6?

    pCloudy is committed to delivering the best solutions in mobile app testing and therefore we come up with product updates at regular intervals. This time we are thrilled to announce the release of pCloudy 5.6 with exciting new features to…

    Learn More Arrow

    April 9, 2019
    7 Types Of Mobile App Testing

    [xyz-ihs snippet="quickLinks-mobile-app-testing"] Types of Testing Since there are many players in the mobile app market, the competition is endless. To beat the heat and to keep providing an enhanced mobile app experience to the users, the app needs to be…

    Learn More Arrow

    April 5, 2019
    Run Espresso in pCloudy Using Gradle

    Do you know why Google has selected Gradle as the build system for Android Studio? Many Android developers work in a heterogeneous environment with different technology stacks. Gradle solves some of the hardest problems faced by the developers like how…

    Learn More Arrow

    Start to End Guide for Mobile App Testing

    Suyash Dubey
    By Suyash Dubey
    February 21, 2019
    8 min Read
    Share This Article
    Start to End Guide for Mobile App Testing

    Guide for Mobile App Testing


    This blog and a few upcoming ones in this series will talk about specific aspects of mobile app testing.

    Quick Links:


    Mobile app testing involves many intricacies and in this series of blogs, we will explore this area starting from the basics. The topics that are covered in this blog will be elaborated in the forthcoming blogs. I will be updating this page with links for those topics as we publish them in the near future. Keep watching this space for more information related to mobile app testing. Now let’s get started with the basics.

    What is mobile app testing and why is it needed?

    These days mobile phones are not used just for making or receiving calls, but they are essential multipurpose gadgets. The mobile technology is evolving rapidly and the mobile app developers need to deliver the best performing app in quick time. To get the best app delivered in the given time frame, the automation team needs to be on their toes. The testers play a critical role in the quality and delivery of apps. Moreover, the market is very fragmented and this makes testing more complicated. The mobile app must be tested on different combinations of platforms, networks, operating systems.

    Types of mobile applications:

    There are three types of mobile applications:
    Native apps: These apps are developed for a single mobile operating system so it is native for a particular platform or device. For example, Android apps will not work on iOS apps.

    Web apps: These are mobile web applications to render/deliver pages on mobile web browsers. These apps work on different operating systems as they launch on web browsers.

    Hybrid apps:These apps have cross-platform compatibility but can still access phone hardware.

    Challenges in mobile app testing

    All the operating systems like Android, iOS, Windows have different UI and functioning. The usage and layout of elements are verified when publishing the app in the market. Noncompliance with the guidelines can delay the publishing process which in turn increases the cost of development. Lack of access to devices is also a big issue. It is possible that two or more testers need the same device at the same time. Wherein one tester is left out waiting for the other to the tester to complete their work. Procuring multiple devices adds up to the cost and takes time. It is a major issue if the testers are placed across different countries.

    Challenges in mobile app testing

    Types of mobile app testing

    To develop a highly efficient mobile app, you need to ensure that the quality, usability, and security of the app is up to the mark. You can improve your app ratings and customer satisfaction with rigorous testing, which will lead to more downloads.

    The mobile app testing methodologies are mentioned below:
    1. Compatibility testing
    2. Installation testing
    3. Interruption testing

    4. Localization testing
    5. Performance testing
    6. Usability testing
    7. Conformance testing

    Mobile app testing strategies

    mobile app testing strategy that will ensure that your quality assurance activities align with customer expectations, business goals, and industries best practices. Testing teams must consider the following procedures while designing a comprehensive mobile application testing strategy:

    UI Testing:  A UI friendly application sells more when compared to an app which is best developed but with a nasty UI. If an application has a perfect and a splendid UI on one device but on the other device it is completely twisted just because it has a different size or a different OS, then it will leave a very bad impression. The commercial success of the application will be badly affected.

    Security Testing: There’s always a big concern about data safety and security. There is a possibility of the personal data being available to hackers, be it your social sites credentials or your bank account credentials. Hence, the security of these apps becomes very vital for the business of any company. This, in turn, generates the need for security testing of all mobile applications and hence is considered as important testing that is carried out by testers foran app.

    Security Testing

    Manual vs Automated testing: The speed and reliability of automated testing are helpful for regression testing and executing time-consuming test cases. Most automated tests are reusable, but in an agile environment, automated test scripts have to be reworked. As a mobile app evolves, the product flow changes, as well as the user interface requirements and specific features. As a result, every change calls for an update in the automated test script. Maintaining automated test scripts often causes projects to fall behind in sprint cycles unless you keep a tight hold on the reigns. It is scalable and more cost efficient for larger mobile apps. We can run multiple tests simultaneously. But it is not suitable to test user experience factors. Manual testing Replicates real user experiences and it is faster and more cost- effective for small projects. It is easier to identify and deal with app crashes with manual testing. Manual testing Handles more complicated use-case scenarios.

    Device Selection: New versions of mobile devices emerge every day as mobile technology is evolving rapidly. Each model comes with its distinct features in terms of OS, screen size and other aspects. You have to factor in not only the OS of the device but also the OS version. It is critical that you choose the right number and type of device to test your mobile app. It is important to identify the devices that are popular with your target demographics. You need to identify the combination of devices that can get you the broadest coverage in terms of OS, model, and brand. While selecting a device for testing you need to take into account, its screen size, resolution, PPI & other hardware features that can impact your app’s performance. You also need to consider the effect of network and varying conditions posed by location.

    Performance Testing:
    Test your app under load conditions to ensure high performance while being used by thousands of users. Build real-user flows and test them on real mobile devices. Correlate between different application performance vitals. Simulate the on-the-move scenarios and rapid environmental changes that are unique to mobile users.

    Cloud vs In-house:
    Cloud solutions provide an instant way to build mobile development and testing labs. The greatest benefit of these solutions is that you don’t have to set up any server hardware or connect any physical mobile device in order to use them seamlessly as a part of your development process. The majority of the costs related to cloud-service are included in the license fee (price) of the service. You very rarely even need any other software to be purchased to use these services.
    An in-house solution is something more traditional compared to today’s cloud- based software solutions. It is typical that at the beginning when an in-house solution is acquired in use it involves more expenses as you need to buy a license and get the hardware infrastructure (e.g. servers, devices) in place. The operative expense will be there as well and you need to take care of maintenance of the system, software (and sometimes even hardware) updates, fixing and resolving problems with the system and probably many other smaller tasks that eventually makes financial burden to accumulate.

    Network Connectivity:
    The unpredictability of wireless networks has a huge impact on the functionality, performance, and user experience of an app. This is why we often see certain functional defects, performance defects and sometimes crashes only when the app is running on a certain network or in some specific locations. Besides, mobile apps are expected to function on everything from an excellent Wi-Fi connection to a 3G/4G connection.

    The apps can be installed on real devices and can be tested on various networks like VoLTE, GPRS, UMTS, LTE, CDMA, etc. But the procedure of using real networks for app testing is slow, cumbersome and mostly provides inaccurate results. Using a simulated lab network, testers can easily test their mobile apps by simply selecting and applying the type of network profile to be used. They can also create and customize different network profiles by simply changing parameters like Uplink Bandwidth, Downlink Bandwidth, Latency, Loss Percentage, Packets Corruption, etc.

    Conclusion

    In the world of mobile apps, testing challenges emerge with evolving mobile technology. The upsurge of new technologies like 5G and foldable screens will push the developers and testers to find new ways to test their apps. In continuous testing and development, the focus should be on optimizing the app performance
    In the next blog, we will talk in detail about Android and iOS.

    Click on this link to read the next blog.

    Suyash Dubey
    Suyash Dubey

    Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

    Related Articles

    October 19, 2020
    Hustler's Mantra: Adopt an experimental Mindset

    "The very basis of creative work is irreverence. The very basis of creative work is bold experimentation. There has never been a creator of lasting importance who has not also been an innovator"– Eric Temple Bell Most of us are…

    Learn More Arrow

    October 19, 2020
    iPhone 12 Launch, Features and Updates

    The number of active users from last year released by apple showed that there are close to 1.4 billion people in the world that use an iPhone. The number is only growing and adding more revenue to innovate and come…

    Learn More Arrow

    October 16, 2020
    Summary of pCloudy’s New Pricing Plan

    This summary should help you understand the key upgrades we have made in terms of the Pricing and Benefits. We hope this page is helpful and urge you to read it in full to take advantage of the new pricing…

    Learn More Arrow

    Android and iOS: Basics and Comparison

    Suyash Dubey
    By Suyash Dubey
    February 21, 2019
    11 min Read
    Share This Article
    Android and iOS: Basics and Comparison

    Quick Links:

    The second blog in the series “Start to end guide for mobile app testing”

    Basics and Comparison

    In the previous blog in this series, we talked about the evolution of mobile technology. In this blog, you will know more about the two most popular mobile operating systems, Android and iOS. Here you can also learn about the Android architecture, concepts of Android SDK, emulators and iOS architecture and mobile cloud. Let’s start by getting familiar with Android versions.

    What is Android?

    Android is a software bunch comprising not just the operating system but also middleware and key applications. It is developed by Google and later by the Open Handset Alliance but it is not limited to only mobiles. In other words, it is a complete set of software required for the development of smart devices such as smartphones, tablets, notebooks, set-top boxes, TVs, smart watches, etc. Android is a Linux based open source software platform. The application development in Android is done in the Java language.

    Versions of Android

    The first version of Android was launched on the HTC Dream mobile in the year 2008. Since then Android has been evolving constantly and now it has the largest user base of around 88% global market share. Android OS versions are released with a name following the alphabetical order, such as Android 1.1, 1.5-Cupcake, 1.6-Donut, 2.0/2.1-Eclair,2.2-Froyo,2.3-Gingerbread,3.X-Honeycomb,4.0-Ice Cream Sandwich, 4.1/4.2/4.3-Jelly Bean, 4.4-KitKat, 5.0-Lollipop, 6.0-Marshmallow, 7.0-Nougat, 8.0-Oreo and 9.0- Pie being the latest of all the versions.

    Versions of Android

    Why so buzz about Android?

    Whenever we hear the word Android, we usually think about the ‘smart phones’. This is how Android is placed in our minds. It is one of the most successful mobile operating systems in the market today. Android apps are the most downloaded apps in the app stores. It runs on millions of mobile devices in more than 190 countries in the world. Around 1.5 billion apps and games are downloaded from Google play store in a month. It does not fail to impress its users by consistently introducing new features. It is open source, so any android variant can be developed using the source code. It supports wireless communication including 3G, 4G, WiFi, and Bluetooth. Android keeps introducing its new and upgraded versions, often. Due to its popularity, around 1million new Android devices are activated worldwide in a day. Google play is an open marketplace for developers to sell and distribute their mobile apps. It has already entered the field of Artificial Intelligence enabling the apps to be more intuitive and user-friendly.

    Android Architecture

    Android is architected in the form of a software stack comprising applications, an operating system, run-time environment, middleware, services, and libraries. The following figure is the visual outline of the elements integrated layer by layer. These all elements are the prerequisites of the mobile app development and to make the app environment ready. Android Architecture is categorized as Linux kernel, native libraries(middleware), Android runtime, Application framework, and applications.

    • Linux Kernel- It exists at the root of the Android architecture. It contains all drivers for hardware components, battery and memory management, resource access and device management. Android only uses the Linux Kernel.
    • Libraries – It is the layer above the Linux Kernel, including native libraries such as WebKit, OpenGL, FreeType, SQLite, Media framework, C runtime library(Libc), etc. Webkit library supports the web browsing engine, SQLite is used for sharing and storing application data, Media to play record audio/video, etc. FreeType is for processing fonts, SSL libraries are for internet security, OpenGL and SGL are responsible for rendering 3D,2D graphics, respectively, the Surface manager is responsible for rendering windows and drawing surfaces of apps on the screen. Libraries also contain C++ libraries used by android system components.
    • Android Runtime (ART)- these have the core libraries also known as Dalvik Libraries (DVM) which are responsible for running an android application. Android Runtime is built to run apps in a restricted environment where there is limiter power in terms of battery, processing, and memory. ART uses DEX files, a type of byte code designed for Android to manage memory more efficiently.
    • Android Framework- On the top of Android runtime is Android Framework. It includes a collection of Android APIs written in Java. Enables and simplifies the reuse of core components and services such as Window, view, Activity, telephony, resources, locations, Content Providers (data) and package managers. It provides access to Android feature set fir developers to build a mobile app for Android OS.
    • Applications- Over the Android Framework lies the application layer covering system and other apps that the users can download from the Google Play Store. The core apps like email, SMS, calendar, maps, browser, contacts, etc are pre-packed in the mobile device. This layer uses all other layers for enhancing the performance of these mobile apps.

    Android Architecture

    Source: https://developer.android.com/guide/platform/images/android-stack_2x.png

    Concepts of Android SDK and .apk file and emulators

    Android SDK is a Software Development Kit which allows the developers to develop an application for the Android platform. The Android SDK comprises of software programs with the sample source codes, developer tools, documentation, tutorials, an emulator and essential libraries to build, test and debug mobile apps for Android. Apps are written in Java language and are run on Dalvik(DVM) that runs on Linux Kernel.
    APK stands for Android Application Package. It is a package file format used by Android OS for distribution and installation of mobile apps and middleware. For installing any mobile app/games, we require APK files with an extension .apk. These can be downloaded from the play store. Apk files are just like .exe files for windows. Apk file is in zip format and contains all necessary files required for app installation. The Apk archive usually contains META-INF directory:
    MANIFEST.MF: the Manifest file
    CERT.RSA: The certificate of the application.
    CERT.SF

    Android Emulators-

    Android emulator or Android Virtual Device (AVD) is a device that is a functional replica of an Android device that can be used to run and test the Android applications on the PC even before they are published in the market for final use. Android emulator comes as part of the Android SDK. It is a virtual device that lets the developer develop the apps without using a physical device. Android emulator requires JRE –Java Runtime Environment and Android SDK to function. The applications can be either downloaded or installed directly on the device from the Google play store or if the application is available in ‘.apk’ format, it can be installed using the “add” command.

    iOS and its versions

    iOS is a mobile operating system developed by Apple Inc. It was originated in 2007 for iPhone and later extended its support to other Apple devices like iPad and iPod touch. It is the second most popular mobile device in the world after Android. The iOS mobile apps can be downloaded from Apple’s App Store. The App store contains more than 2 million iOS apps today. The iOS apps are programmed in Objective C, C, and C++ languages. Version updates for iOS are released through iTunes software until the introduction of iOS 5 in 2011. Now, the software updates and data sync can happen wirelessly through Apple iCloud service. iOS has expanded its market by introducing new products powered by Apple like iWatch and AppleTV.
    It was formerly known as iPhone OS and the name was used for its other 3 subsequent versions until 2010 when Apple released iOS4. In 2011, iOS5 was released providing access to around 500000 iOS apps and some additional features. iOS 6, 7, 9 were released in the succeeding years with more advanced features and performance. The latest versions iOS 10,11 and 12 are released in 2017 and 2018 respectively.

    iOS Architecture

    iOS Architecture is also a layered one. Each layer is built with a variety of frameworks which can be assimilated in the iOS apps. The layers communicate with the hardware with the help of clearly described system interfaces that make it easy for the developer to build the app that is ready for different devices. Let us discuss each layer below:

    • Core OS- This layer is the foundation layer of the OS on which other layers are dependent. This layer is responsible for managing memory, system and OS tasks, networking and also interacts directly with the hardware. This layer comprises of frameworks like accelerate, external accessory, core Bluetooth, security and local authentication.
    • Core Services Layer- It consists of technologies that provide certain services to the app but are not directly related to the UI of the app. It contains high-level features like iCloud storage. The core services include address book framework(provides access to contacts and user database), CloudKit (medium of transferring the data between app and cloud), Core Data (to manage the data model of a model view controller app), Core Foundation( Technologies to provide Data management services to IOS), Core Location(gives location info to apps),Core Motion(ton access motion-based info on the device),Foundation(Using Objective C), Healthkit (handles health-related info of the user),Homekit(controlling connected devices of the user at home),Social( to access user’s social media accounts) and Storekit Framework( supports in making in-app purchases from iOS apps).
    • Media Layer- Media layer in iOS architecture enables the Graphics, Audio, Video technologies. Graphic Technologies like UIKit Graphics, Core Graphics framework, Core Animation, Core Images, OpenGl ES which handles 2D vector and animating views and 2D and 3D figures, GLKit and Metal. Audio Framework supports rich Audio experience and includes- Media Player Framework, AV Foundation, OpenAL.
      Video Framework includes AV Kit, AV Foundation, Core Media, Also the iOS support
      for the playback of movie files with the .mov, .mp4, .m4v. and .3gp filename
      extensions.

    • Cocoa Touch Layer – The layer defines the basic application and support for key technologies such as multitasking, touch-based input, push notifications, and many high-level system services. It includes EventKit, GameKit, iAd, MapKit, PushKit, Twitter and UIKit frameworks.

      iOS Architecture
      Source: https://dotnettricksweb.blob.core.windows.net/img/xamarin/ios-architecture.png

    Concepts of .ipa file and simulators

    IPA stands for iOS App Store Package. Any file with .ipa extension is an iOS application. It is an archive like ZIP that contains software sets used to develop the iOS app. Each .ipk file can be opened with Apple’s iTunes program. An IPA file has a binary for ARM architecture and can only be installed on an iOS device. IPA files cannot be installed on the iPhone Simulator. To run applications on the simulator, original project files which can be opened using the Xcode SDK are required.

    iOS Simulators – These are again programs to test and run the iOS applications without having any physical or the ‘real’ device. The iOS Simulator allows you to rapidly prototype and test builds of your app during the development process. Installed as part of the Xcode tools along with the iOS SDK, iOS Simulator runs on Mac and behaves like a standard Mac app while simulating an iPhone or the iPad environment. iOS simulators require MAC Environment and Xcode to function. To start the iOS simulator, firstly launch the Xcode and then do one of the following:
    1. Choose Xcode > Open Developer Tool > iOS Simulator.
    2. Control-click the Xcode icon in the Dock, and choose Open Developer Tool > iOS

    Conclusion

    Operating systems are being revamped using AI and connectivity to the Internet of Things. These technologies are still evolving and both Android community and Apple are trying to lead the way by enhancing the user experience. Android had an upper hand in the past as it has a very active open community to support the development. Although, Apple in the recent past has taken a new approach in getting ahead with technology for e.g. Air Pods and their own coding language Swift. We can be sure that both Android and iOS will be more convenient and interactive as both Google and Apple are the torch bearers of the future.

    In the next blog, we will talk about the types of mobile applications.

    Suyash Dubey
    Suyash Dubey

    Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

    Related Articles

    October 19, 2020
    Hustler's Mantra: Adopt an experimental Mindset

    "The very basis of creative work is irreverence. The very basis of creative work is bold experimentation. There has never been a creator of lasting importance who has not also been an innovator"– Eric Temple Bell Most of us are…

    Learn More Arrow

    October 19, 2020
    iPhone 12 Launch, Features and Updates

    The number of active users from last year released by apple showed that there are close to 1.4 billion people in the world that use an iPhone. The number is only growing and adding more revenue to innovate and come…

    Learn More Arrow

    October 16, 2020
    Summary of pCloudy’s New Pricing Plan

    This summary should help you understand the key upgrades we have made in terms of the Pricing and Benefits. We hope this page is helpful and urge you to read it in full to take advantage of the new pricing…

    Learn More Arrow

    Migrating to AndroidX

    Suyash Dubey
    By Suyash Dubey
    February 4, 2019
    4 min Read
    Share This Article
    Migrating to AndroidX

    What is AndroidX?

    AndroidX is an improved version of the android support libraries that the android team uses to develop, test, package, version and release libraries within the jetpack. AndroidX fully replaces the support library by providing feature parity and new libraries. In addition, AndroidX includes the following features:

    • All packages in AndroidX are in consistent namespace starting with the string AndroidX. The support library packages have been mapped into androidx.* packages. For a full mapping of all the old classes and built artifacts to the new ones.
    • Unlike the support libraries, AndroidX packages are separately maintained and updated. The AndroidX uses strict semantic versioning.
    • All new android development will occur in the AndroidX library. This includes maintenance of the original support library artifacts and introduction of new jetpack components.

    Android Jetpack
    Android jetpack is a set of components and tools along with architecture guidance designed to help you accelerate your android development. It gives a template to write production ready android code. Jetpack is made up of components in four categories, foundation architecture behaviour and UI. Each component is individually adaptable and build to maintain backwards compatibility. Android architecture components are very modular, so we are allowed to choose what feature sets we want that are compatible to our app.

    Espresso is now a part of the AndroidX family
    Espresso is a testing framework designed to provide a fluent API for writing concise and reliable UI test. Writing reliable UI test is difficult as user interfaces are asynchronous driven by events, transitions and data loaded from background threats. Coding around that without any help from UI testing framework would require a lot of boilerplate. Espresso takes care of any UI events, so that in most cases you don’t have to worry about any view state transition and implementation details. The basic UI test flow when using Espresso includes:

    • View Matchers: To find view in the current view hierarchy for e.g. to find UI elements like buttons, textbox etc.
    • View Action: To perform action on the view, e.g. to click on a button, double click, scrolling etc.
    • View Assertions: Allows to assert state of a view.

    Application of Espresso test recorder

    • Allows us to create effective UI test cases with user interactions.
    • We can capture assertions and interactions without accessing app structure directly which increases execution speed and optimizes test case.
    • Saves time searching for locators and then writing the test cases.
    • It supports multiple assertions making more reliable test cases.

    Pcloudy supports androidX instrumentation with Espresso
    Now you can write test cases in espresso and test the APIs in pCloudy using androidX Junit instrumentation. Here are the steps for running your Test scripts on multiple android devices:

    • Login over https://device.pcloudy.com with your registered Email ID & Password.
    • To schedule “Espresso” over pCloudy, follow the below mentioned steps-
    • Go to the “Automation” page.
    • Select the Automation tool as “Espresso”.
    • Select “Instrumentation Type” based on your Test Scripts you’ve written.
    • Androidx Espresso Test pCloudy_1
      Note: pCloudy provides support for Instrumentation Type (InstrumentationTestRunner, AndroidJUnitRunner and AndroidXJUnitRunner) for Android.

    • Select the Application APK and Test APK that you must have uploaded in the MY APP/DATA section.
    • Select the single device execution time and assign a name to your test cycle.
    • In the next step, Click on “ADD” to add the device for testing and click on ”
      Next”.
    • Click on “Schedule” to start the test.
    • Espresso Test pCloudy_2

    • Go to your mailbox and open pCloudy Automation Alert mail.
    • Click on the given link “Click to view Report”.
    • Espresso Test pCloudy_3

    • Now you have the result of your scheduled test automation.
    • Espresso Test pCloudy_4

    How to migrate to AndroidX?

    To migrate from support libraries to AndroidX the Google has provided a refractor tool in Android Studio. Projects can be migrated to AndroidX by clicking on ‘Refractor’ in the menu bar and then clicking on ‘Refactor to AndroidX’. Then it will search for the usage and show the result. To refactor click ‘Do Refactor’.

    pCloudy is leading the way in the field of automated mobile testing solutions.

    Try our device cloud

    Suyash Dubey
    Suyash Dubey

    Suyash is a content strategist at pCloudy. He is a frequent contributor to the world's leading mobile technology blogs and tech forums. In his spare time, you will find him reading detective novels, watching a documentary or exploring a new destination.

    Related Articles

    October 19, 2020
    Hustler's Mantra: Adopt an experimental Mindset

    "The very basis of creative work is irreverence. The very basis of creative work is bold experimentation. There has never been a creator of lasting importance who has not also been an innovator"– Eric Temple Bell Most of us are…

    Learn More Arrow

    October 19, 2020
    iPhone 12 Launch, Features and Updates

    The number of active users from last year released by apple showed that there are close to 1.4 billion people in the world that use an iPhone. The number is only growing and adding more revenue to innovate and come…

    Learn More Arrow

    October 16, 2020
    Summary of pCloudy’s New Pricing Plan

    This summary should help you understand the key upgrades we have made in terms of the Pricing and Benefits. We hope this page is helpful and urge you to read it in full to take advantage of the new pricing…

    Learn More Arrow

    Experience pCloudy Today

    Tickmark No Credit Card Required
    Tickmark Exceptional Security

    Copyright All Rights Reserved © 2020