Mobility Is Changing the Transportation and Logistics Industry

The transport and logistics (TLS) companies operate in a decidedly complex market with numerous dynamic variables, including high investment, fluctuating oil prices, multimodal freight policies, large data, and human attributes. Mobility solutions streamline operations while offering substantial operational and cost advantages. Consequently, transport companies are able to extend the value to their customers by offering fast, flexible, and reliable services.

Operational challenges associated with the Logistics Industry

All businesses, regardless of the field of activity, must buy and sell products that have to be moved from one location to another. Also, people are swamped with work and prefer to buy things online instead of going to a supermarket. The need for logistics today is progressively increasing because eCommerce has become a major trend, and freight is considered the lifeblood of a country’s economic development.

However, dealing with logistics processes has always been a complex and arduous task. Companies with large fleet operations often struggle with operational challenges and inefficiencies.

Major challenges that logistics teams encounter:

  • Adherence to regulations
  • Organize and demystify operations
  • Offering categorized, custom-made services
  • Logistic and workforce management

Opportunities to reap the benefits from mobility solutions

By leveraging mobility solutions, TLS companies reap the benefits of operational efficiency, mainly reduced operational costs. Cloud-based mobile apps provide a bird’s eye view of the fleet and boost efficiency in functioning. These apps are delivered across devices and platforms enabling stakeholders, field personnel, and analysts to easily access and use them to monitor at any point in time. A connected fleet on a mobile app enables tracking of operational systems, preventative maintenance, hours of equipment usage, resource utilization, etc.

The GPS tracking systems monitor the movement of vehicles, shipments, and cargo in real-time accounting for any breakdowns, accidents, or delays. Automation replaces many laborious manual processes enabling legacy companies to upgrade to digital methodologies. Standardizing processes and workflows using mobile applications ensures a paperless workflow with digital dashboards that help in making quicker decisions. Automating sales and customer services’ communication cuts downtime/resources on repetitive and predictive tasks and reduces the scope for delays and human errors.

The most important feature of a mobile app is it facilitates gathering and synthesizing data. Firms mine data for better insights into customer preferences, performance enabling critical decision making. According to a report from McKinsey Global Institute, companies that embrace analytics can generate additional 3 to 5 percent return on sales.*

Leveraging Mobility Solutions by Logistics companies (Surge, HDFleet, and ReedTMS)

In the last several years, logistics has been seeing significant growth because of developments in technology, and organizations are tempted to make the most of the new-fangled innovations and continual evolutions. The augmented demand for mobility has created the need to focus on challenges such as investment and capricious gas prices. The logistic business has created a mobile transportation system that can satisfy the imminent requirements of the economy and society. The main goal of mobility solutions in the logistics industry is to improve the efficiency and safety of transportation, coupled with bettered environmental sustainability.

  • Operations – Fleet management solutions enable tracking multiple vehicles with their latest location, generating MIS reports for analyzing productivity.
  • Route planning – Mobility solutions bring the capabilities of planning the best routes – a factor critical in logistics to save time, fuel, and thus optimize costs.
  • Geo-fencing – A Geo-fence configured into an app prompts or triggers a pre-programmed alert when a mobile device enters or exits a virtual boundary set up around a geographical location. They are particularly useful to monitor the fleet so as to reduce cost and trigger warnings to drivers entering uncharted territory or deviating from their route.
  • Control & Safety – The apps monitor the driving pattern and in turn, provide the safety index of the driver. It’s an excellent tool for performance analysis and to incorporate performance-related incentive systems. It also helps in continuously tracking vehicles with location and real-time photos & videos that in turn help in claiming insurance. The systems can also constantly monitor driver’s conditions and alarm us in case of violation of traffic rules such as usage of phone while driving, rash driving, overspeeding, and stopping at unauthorized locations.
  • Documentation – Freight documentation is completely digitized, cutting down manual labor and errors. In case of accidents, providing documentation is easier for claims and procedures. The digital driver’s license or digital copy of a driver’s license, stored in a smartphone can be used to authenticate documentation.
  • Influences decision-making – Applications gather data about demand and supply, observe business performance, and help in making key decisions for a company.
  • Customer Services – Mobile apps improve the quality of customer service by providing a friendly user interface, end-to-end shipment tracking, manage customer complaints, act as proof of delivery, alerts, and notifications.

The Fitting Solution for Your Enterprise

Trigent’s Mobility Services team is well-equipped to develop applications and tools whether it is for your existing systems or new business needs. We develop solutions that have the ability to seamlessly integrate with the existing systems. We explore the progressive web, native, cross-platform, and hybrid applications and our experts prescribe the most suitable one keeping in mind your current and future requirements. Our secure, reliable, scalable apps enable you to achieve operational efficiency and reduce costs significantly.

Get in touch with our team to take the next step.

Hybrid Apps or Cross-Platform? The right strategy for Retail Mobile Apps in 2021

In the digital world of today, it’s impossible to run any business without a mobile application. But developing multiple apps for different platforms is challenging and expensive. 2020 saw a surge in mobile adoption as consumers went mobile to learn, work, and shop to cope up with the pandemic. The spending on mobile apps touched a whopping $143 million indicating a 20% rise as compared to 2019.

But even before the pandemic, popular Dutch lingerie designer brand Marlies Dekkers saw more than 75% of their revenue through mobile. Brands like Nike and many others had already started diversifying business practices to avert the retail apocalypse. Walmart had begun consolidating multiple apps into a centralized one to bring in greater choice and diversity to consumers. Leading eCommerce major Shopify achieved 10 years’ worth of growth in just 90 days. Retailers are having to roll out new features faster in their mobile app experiences while ensuring feature parity across the different platforms. To meet this challenge, popular brands such as Amazon, Apple, Remote POS, and Baskin Robbins have gone the hybrid way.

Enhancing the experience further with cross-platform

A hybrid app is your best bet if you wish to launch your mobile app quickly. According to a recent report, 74% of the top iOS retail apps are hybrid apps. These statistics might defy the conventional wisdom that was once in the favor of native apps for their superlative performance and the seamless user experience. After perfecting the infrastructure built for the web for several years, it didn’t make much sense to rebuild it for mobile. That would duplicate effort and result in a huge loss of time and resources. But then, the game changed altogether with hybrid apps. While offering total value for your investments, hybrid proved to be a smart choice thanks to low-code development tools. A hybrid app would mean 60-80% savings as compared to a native app with a 234% ROI.

But despite being a time and money savior, hybrid does pose a challenge in achieving the ideal UI and UX. These overheads of having to develop separate native apps for iOS and Android are effectively addressed by cross-platform apps that offer an elegant means to code once for both platforms.

Today, there is a growing inclination towards cross-platform apps that ensure feature parity and work equally well for all platforms such as Android, iOS, and Windows. Hybrid apps followed by cross-platform apps have ushered in so much functionality that both strategies are adopted as needed. The world clearly cannot stop raving about cross-platform apps. So if you are wondering if a cross-platform app is right for your retail business, here’s what you should know.

The shift to cross-platform

The truth is that you get to experience just the tip of the iceberg when you download an app. The infrastructure behind the app is evident only after you start using it as you browse through product catalogs, access purchase history, view shipping information, etc. The modern cross-platform apps now respond and react as quickly as their native counterparts providing users everything they need. With a full-fledged native-quality mobile experience, retailers are now jumping onto the cross-platform app bandwagon.

Experience matters

A bad mobile experience will drive away customers. A cross-platform app offers the perfect solution to the changing needs of businesses. It is a single-codebase app created using tools like Flutter, Kotlin, Xamarin, React Native, etc. and common examples of this app include Facebook Ads Manager, Airbnb, Reddit, and Zipcar. Cross-platform app development is now gaining a lot of momentum allowing hybrid mobile app development companies to create cross-platform apps that deliver exceedingly well on the performance front too.

Benefits for migrating toward cross-platform:

  • Efficient use of developer resources – Developers need to maintain just a single code base when building these apps thereby saving a huge amount of time typically required by native apps
  • Maintain Feature Parity across platforms. Brands can ensure common experience and functionality independent of the platform capabilities
  • Faster Time To Market: Once app development teams learn how to handle the OS differences or platform-specific store publication procedures effectively, the design-to-launch time will drastically reduce. Cross-platform apps also enable simpler and quicker updates, a boon considering the speed with which updates keep coming up.
  • Lower development and maintenance cost – They are easy to create and maintain with simple tools that can be used in-house thereby eliminating the need for hiring new talent for the job.
  • Consistent User experience – Due to the cross-platform approach with just one codebase running on desktop, web, and mobile, redundancies across channels are removed ensuring better design and UX consistency across platforms.

Wrapping up

A mobile app is rarely made for just one platform since users would want to use them across devices and platforms. Unlike a native approach that requires separate apps for each mobile platform and sometimes with very specific customization for tablets and smartphones, the cross-platform approach offers adaptive styling to ensure that the look and feel of your retail app automatically adapts to each platform. It enables retailers to reach out to a wider audience while saving cost and ensuring platform consistency. With immense potential, it serves as the perfect gateway to opportunities for custom mobile app development companies. Accelerating your mobile app development with cross-platform therefore makes a lot of sense.

Build with Trigent

As you re-evaluate your Mobile App strategy to address the scale and speed expected by your consumers, consider the Hybrid & Cross Platform alternatives. We, at Trigent, have powered apps for some of the coolest companies out there. We choose the right architecture, the ideal cloud computing platform, and an appropriate technology stack to ensure that the cost of building and maintaining an app is minimal while the experience is seamless. We also pay a lot of attention to security and compliance testing to ensure you get a secure, high-performing cross-functional app.

Embark on a software development journey with our experts. Contact us today to give your retail business a digital high.

Top 20 iOS 14 features which you cannot ignore

They say patience is a virtue, and the ones who are patient do get rewarded. It stands to be true for many of the iOS aficionados, if not for all. The latest iOS 14 release has unveiled many features that stand out and command attention. Here is a list of the top 20 iOS 14 features that can enhance your mobile experience.

  1. App Clips – The feature allows the user to use micro parts of the app, meaning performing a small task under 10MB without downloading the complete app. An example is purchasing coffee from a coffee shop (Without downloading the entire app) by signing in with Apple/Apple Pay (So, there is no need to create a new account) and get the rewards into the account. The user can download the app if the performance meets the user’s expectations in App Clip.
  2. Picture-in-picture – From this version of iOS 14, all iPhones have picture-in-picture support as part of multitasking. Previously this feature was available only on iPad, not on iPhone.
  3. App Library – Customize the home screen by organizing the folders by categories like Sports, Health & Fitness, Business, Travel, etc., to maintain apps in a single home screen instead of using multiple home screens with swipe gesture navigation.
  4. Widgets Enhancement – A new widget like “Today View” has many more information accommodation facilities and draggable onto the home screen with different sizes as per user’s preferences. A “Smart Stack Widget” is used to organize and swipe through the recent and liked widget.
  5. Siri Interface – Siri interface will appear like a blob at the bottom of the screen instead of occupying the whole screen for Siri functionality and shows the results as rich notifications at the top of the screen.
  6. Message Stack – User can pin nine message chats as favorites, and those pinned conversations will appear in the “Message Stack,” which is relatively easier for fast access to messages.
  7. FaceTime has performance increments, and Memoji has updated with different icons, Augmented Reality and Machine Learning has new efficient tools for better performance.
  8. Keyboard Tweaks – Emoji picker has a search bar to pick out a specific emoji faster.
  9. Camera Improvements
    • Quick Take Video feature is there in all iPhones by the press and holds the shutter button under photo mode to switch into video mode
    • Camera App can change video resolution, frame rate directly instead of using Settings
    • Picture quality and its performance has been enhanced
      Guidance Indicator will show the status of camera shot
  10. Maps Improvements – Maps has new features as well
    • The “Cycling Directions” feature has been added in Maps for the areas such as New York, Los Angeles, San Francisco, Shanghai, and Beijing. Later on, the feature will expand to other areas in upcoming versions
    • “EV Routes” feature has been added to denote the “Electric Vehicle Charging Stops” for charging “Electric Vehicles” along the traveling route, initially supported car companies are Ford and BMW
    • “License Plate Access” feature will show whether that particular vehicle has the privilege to travel for that specific route or not
  11. Default Email and Browsers Customization – User can set their preferred third-party email and browsers as their default email and browser
  12. Translate App – Apple supports the default “Translate App” in landscape mode by splitting the screen in a 50:50 ratio. Hold on the microphone button listens to input the word/sentence to translate in the left pane. Once the microphone button is released immediately, the translated output will get displayed on the right pane. Users can select languages for translation. Currently, it supports only 11 languages.
  13. Privacy Enhancements – iOS 14 majorly concentrated on “Privacy Policy” for data security as follows
    • Permission added to access approximate location instead of sharing the exact location
    • Permission added to access only specific photo instead of providing access to the entire gallery
    • If the Microphone is running, then the status will be indicated on the status bar with a little amber dot
    • If the Camera is running, then the status will be displayed on the status bar with a little green dot, which is easy to track the Background process of an app for security purposes
    • Mandatory addition of “Privacy Policy” in App Store pages to publish the app to show the data collection on the app from the users, which maintains data security
  14. Apple Arcade – Provides quick access to recently played games, and “Game Center Friends Preferred Games” will be stacked here for gaming.
  15. CarPlay – Provides new EV Routing in Maps, Parking, and Food Ordering apps under categories, new development tools have been introduced to integrate audio, text messages, and VoIP apps.
  16. CarKeys – Initiated better-digitized car keys via iPhones with Tesla Manufacturers.
  17. Safari Enhancements
    • Safari can access Privacy Reports of websites
    • Monitors “Saved Passwords” to prevent security breaches
    • Translate the entire webpage by using Apple default Translate App
  18. UIWebView – Deprecated and suggested to use WKWebView. UIWebView usage in the app will block the app publish from December 2020.
  19. Daylight Saving Time Issue – Under iPhone Settings in iOS14, the Automatic time setting has an improper time and timezone. So, suggested setting the time and timezone manually under Settings. Then either restarts the phone (or) Turn ON and Turn OFF Airplane Mode, saving user time to restart the phone. Now, the DST time and timezone issues are fixed.
  20. A new cell registration technique has been introduced where a new configuration API will encapsulate the cell’s contents and background view properties. It works based on “States” to set and update data into the cell. So, the user doesn’t have to use “Cell Identifiers” to register the cell in UICollectionView.

Are you looking at developing a mobile application loaded with the latest features or exploring the best mobility technology platform to create an app that meets your immediate business needs? Explore how our mobility experts can help you grow your returns and influence through contemporary mobility solutions.

Keychain – An effective way of securing sensitive information on iOS mobile apps

Mobile devices are a significant propellant for modern-day digital technology. Mobile devices are compact and the quickest mode to establish instant communication, eclipsing long distances. The underlying element that enables this exchange between individuals using their mobile devices is data. It is data exchanged between two or more devices that make communication or any other activity possible.

The digital mobile technology baseline is a vast data collection, stored either locally or remotely, sharing numerous information fields for multiple purposes. Flexible Image Transport System or FITS is a digital file format useful for storing, transmission, and processing data that in common parlance refers to information or data related to people such as photos, audio, video, text formats, travel itineraries, or shopping details. Private data can never be seen in a silo. It has to coexist with privacy policies that ensure optimal data security.

Mobile devices are inevitable in modern life, and securing mobile data is a critical concern in a digitally-driven world for quite. While there is increasing awareness among individuals to safeguard their data, cybercriminals are always on the lookout for loopholes. There are umpteen safeguards in place to thwart cybercrime, but the slightest of negligence can be an invitation to trouble such as phishing or data theft.

This post is a DIY for iOS developers to enable Keychain wrapper to secure small chunks of data on applications and secure services.

Before we get into the nitty-gritty of setting up a keychain wrapper for your iOS app, here’s what Apple has to say about the keychain wrapper API.

‘The keychain services API helps you solve this problem by giving your app a mechanism to store small bits of user data in an encrypted database called a keychain. When you securely remember the password for them, you free the user to choose a complicated one.

Keychain – An effective way of securing sensitive information on iOS mobile apps

Keychain wrapper can be considered to be one of the most secure technologies to store sensitive data, such as passwords, authentication tokens, or session data. Its security stems from the automatic encryption of data that is enabled before the file is stored in the system without the need of building encryption algorithms.

Following are the details on how to use keychain wrapper in mobile application development.

Install SwiftKeychainWrapper framework either by cocoapods or carthage. Sample code for few of the common usages are as follows

Add data value to keychain:
let saveThe Data: Bool = KeychainWrapper.standard.set(“Some String”, forKey: “myKey”)
Retrieve data value from keychain:
let retrieveTheData: String? = KeychainWrapper.standard.string(forKey: “myKey”)
Removedata value from keychain:
let removeTheData: Bool = KeychainWrapper.standard.removeObject(forKey: “myKey”)

Developers can do the following in Keychain Wrapper:

“Service Name” – used to customize bundle identifier value. By default, app Bundle ID is used to store the data in keychain
Data can be shared between applications using keychain by “Access Group”
By default, all items saved to keychain can only be accessed when the device is unlocked. To change this accessibility, an optional withAccessibility param can be set on all requests to select the accessibility level desired
To access the data in keychain in all the different devices used by the users, we can synchronize the data in iCloud
Unlike “User Defaults” – Data stored in Keychain will not get deleted while app cleared from cache (or) uninstalled from the device

Are you looking at developing an iOS application with robust security features? Trigent’s expert developers with decades of experience in iOS app development can help you with end to end development of secure and robust applications. Here’s a solution that was developed with an emphasis on personal data security.

Twitter propels its mobile business using progressive web apps

Pattern of app usage among users – prevailing scenario

The smartphone user base has experienced an exponential boom in the past few years to reach 2.97 billion users worldwide. A recent study notes that an average US adult spends about 3 hours 10 minutes on his phone every day. 90% of mobile time is spent on applications. The increase in smartphone users and their usage pattern indicates that the mobile screen is the more preferred screen than the computer. The usage pattern is also a clear indicator that businesses vying for their customers’ attention must adopt a mobile strategy.

The world of native applications – challenges galore

Though users spend 90 percent of their mobile time on applications, they are quite picky. Users spend 77% of their time on only three apps. What’s more, 96% of that time is spent on their ten favorite apps. The interest in applications makes the mobile application space highly competitive. The chunk of these applications is native applications primarily categorized into Android or iOS apps. Statista 111 thousand applications are released on the Google Play Store every month, making it the most prominent online store for applications. Following toe is the Apple App Store, which has an approx 1.8 million applications available for download. The numbers are proof of the stiff competition applications face to garner interest among users and survive. Besides the stiff competition, many other reasons can sometimes weigh against building a native application. One of the foremost considerations a business looking to upgrade their mobility capabilities the native way has to address is cost followed by compatibility. Native applications are platform-specific as they are developed for a specific platform, either Android or iOS, and can limit your reach to a particular platform user set. Maintenance and upgrades can again have a significant impact on your spending.

A progressive mobile experience – the solution

Progressive Web Apps – PWA has been a boon for businesses trying to make immense in the mobile age. A PWA is built and lives on the web but has capabilities similar to the native apps. The look and feel or how the app behaves is quite similar to native apps.

Progressive web apps provides easy optimization of your website to enable mobile experience for your users irrespective of the platform. It renders a seamless experience across iOS and Android platforms and does not require uploading on any app stores. This also eliminates the need for users to install updates on their phones. Every time there is a new version of the app, it just needs to be deployed on the webserver and is automatically available to the users when they visit next.

Benefits

World-renowned businesses utilizing PWAs are reaping some impressive benefits that demonstrate that PWAs are an excellent proposition for online entities looking to initiate their journey and association with their users on their mobiles. Businesses are looking at an economical solution to make their foray on the mobile or companies already having a native app but looking to expand their reach using a web-based mobile app.

The following compilation lists out the businesses that have adopted progressive web apps to garner impressive gains.

Renowned publisher – Forbes

Renowned Publisher

Headquartered in New York, Forbes is an American business biweekly. Steve Forbes is the editor-in-chief of the widely recognized magazine. Two of its distinct offerings are the Forbes 400 that lines out the richest people in the world and Forbes 500 that lists out the top performing companies in the world. Forbes launched its mobile PWA couple years ago and has experienced a favorable outing.

  • 0.8 seconds average load time, faster loading
  • 100% increase in user engagement
  • 43% more time spent in user session
  • Increase in scroll depth by 3 times
  • Advertisement views up by 20%
  • Average size of web pages reduced from 2MB to 30KB

Social media biggie – Twitter

Microblogging Site

A popular microblogging platform launched in 2006, Twitter is the second most successful social media platform after Facebook. Twitter introduced Twitter Lite, a PWA variant for smartphone users. An optimized version of the app Lite requires less data and storage space and loads quicker even on slower connections. The app occupies 1 Mb space on the device.

  • 65% increase in pages per session
  • 75% increase in tweets
  • 20% decrease in bounce rate
  • Loads quickly on 2G and 3G networks
  • Enables optimal utilization of data by only downloading content that the users clicks on
  • Significantly smaller size of the PWA app at 600 Kb compared to the size of the 23.5 Mb native app

Global coffee house chain – Starbucks

Global Coffee House Chain

Starbucks, an international coffee house chain and a popular brand, wanted to create a web based application. An app with dynamic functionalities and a native feel. They wanted to integrate a user-friendly ordering that could be seamlessly accessed through a url without having to install the app. Starbucks foresightedness to invest in a progressive app provided it with some healthy benefits.

  • High on performance, intuitive app for its users
  • Ability of the app to function across regions with low or inconsistent internet connectivity

There are many other international businesses that have benefited going the PWA route. You can read about them here. Do you know of a business that has benefited immensely using progressive web applications? Share it with us in the comments section.

The progress of PWA (Progressive Web Applications) mobile apps

The first part of a two blog series on Progressive Web Application introduces the easily adaptable and popular PWA and a very distinct history behind it. It also lines out the future and advantages of the web-based application. The second blog post will line out the adoption of PWAs among some of the recognized businesses and the benefits they have incurred.

The two blog posts will help digital business owners make up their mind on utilizing PWA to either make a foray into the mobile screens of their user base or complement their native app offering to reach out to a wider audience.

The first time the idea of Progressive Web Applications (PWA) was coined way back in 2007. Albeit, it was not christened PWA then. At the launch of the iPhone, the legendary Steve Jobs shared his idea of web apps developed in HTML5 using AJAX architecture that would be fully integrated into the device through the safari browser engine.

In 2015 Frances Berriman and Alex Russell, senior engineers with Google, observed a new class of websites providing a better user experience than traditional web applications. These applications rated high on user experience were independent of the browser tab and lived on their own while maintaining their ubiquity and linkability. Berriman and Russell named this new breed of applications as Progressive Web Applications.

Eric Bidelman, Senior Staff Developers Programs Engineer, introduced PWA at the Google I/O event in 2016.

The potential of PWAs can be gauged in the fact that two of the world’s biggest tech rivals Microsoft and Google, joined hands to make room for the technology.

Since becoming a widely recognized term in technology, PWA’s have made rapid strides towards widespread acceptance. Apple Inc., whose founder had first proposed web-based mobile applications, is actively pursuing it but calling it by a different name. They use the term: “HTML5 Apps” and “Home Screen web apps” instead.

Inside PWAs

A PWA is built and lives on the web but has capabilities similar to the native apps. Be it the look and feel or the way the app behaves it is quite similar to native apps.

A progressive web application leverages the website, adds some extra features that enhance the web properties to drive capabilities on mobile. In technical parlance, that would mean serving your web site over HTTPS and having a service worker and manifest.json file to turn your website into a PWA.

A service worker or a JavaScript enables the website to function in the absence of an internet connection. The service worker acts like a proxy server and acts as a bridge between the browser and the network and helps intercept network requests and serve custom responses.

PWA – How it works

PWA provides easy optimization of your website to enable mobile experience for your users irrespective of the platform. Simply put it renders a seamless experience across iOS and Android platforms and does not require uploading on any app stores. This also eliminates the need for users to install updates on their phones. Every time there is a new version of the app, it just needs to be deployed on the webserver and is automatically available to the users when they visit next.

PWAs are in demand and for legit reasons

Talk of PWAs and the discussion invariably steers towards a comparison between a native application and PWA capabilities. Listed below are a few factors enticing businesses to take a plunge into the mobile-first world with a PWA. It also is a viable option for businesses looking to complement their existing native application to expand their reach across devices and platforms.

  • Truly progressive: PWAs work for every user irrespective of the browser or the platform because the base is built with progressive enhancements.
  • Highly responsive: Progressive web applications are highly responsive and seamlessly adapt to the various screen sizes be it desktops, different mobile devices, and tablets.
  • Closely replicating native apps: The user experience and interface match up to that of native applications.
  • Easily and regularly updated: The process of running updates is convenient thanks to the data update process offered by service workers.
  • Secure: As PWAs run through HTTPS, it ensures safety in content delivery and content interaction.
  • Searchable: Indexed by search engines PWAs show up in Google search results.
  • Installable: Installing PWA applications is an easy affair as it does not require users to download it from the app store or play store, consuming little space.
  • Linkable: A clickable link is all it takes to install or share the application among users.
  • Offline functionality: PWAs work without the internet connection leveraging data cached from the last instance the user interacted with the application

We are confident that with the evolution of PWAs there will be many more benefits that may come to the fore. Are there benefits or interesting facts about PWA that you have come across and would like to share with us? Drop it here in the comments section.

Read the next blog on the adoption of PWAs among some of the recognized businesses and the benefits they have incurred.

Will Dart and Flutter Lead the List of Mobile App Development Frameworks?

Dart, as we know, is an open-source, object-oriented, general-purpose programming language developed by Google in 2011. It uses a `C’ style syntax and optionally trans-compiles it into JavaScript. While it is frequently used from client-side and server-side web development it is also used actively for mobile app development – both native and cross-platform. As per the TIOBE 2019 ranking – the de-facto standard for gauging the popularity of programming languages, Dart is in the 26th position, halfway through the listing of the top 50 preferred languages. Delphi and R, are however in the 15th and 16th position, which essentially means that they continue to remain popular programming options.

Dart’s entry timing might have been wrong, and its position amongst giants, makes it seem a negligible option. This could be the reason for its infamous ranking in Codementor in 2018. Codementor, listed Dart back then as the number one not to be learned the language. This period in its evolution was also not very encouraging if you see the lackluster demand in the job market for programmers with Dart skills. This, in spite of the fact, that Dart offers programmers ease of use and is naturally lightweight. With these two classical features, it should have been a programmer’s best friend, but in the competitive world of languages, Dart’s better features were ignored. That is until recently! Now, what could be the clincher for Dart is Google’s recent Cross-Platform mobile development Framework, Flutter completely supports Dart. This is definitely changing Dart’s fortune for the better. Flutter is popular and Dart is back on track.

Understanding Flutter

Towards the end of last year, Google’s new cross-platform mobile app framework Flutter released its first version. Though initially it was intended for mobile app development, now they are making it as a multi platform framework. Let’s take a closer look at what Flutter is doing for app development today.

Flutter is an open-source, cross-platform mobile app development framework. It currently supports iOS and Android development, with potential for other platforms including web and desktop support. Flutter sets itself apart from competition like React Native and Xamarin through consistency across platforms.

A Flutter app made using Material Design will look exactly the same on iOS as it does on Android. Additionally, Flutter is powered by Google’s Dart programming language, which should feel familiar to developers of various backgrounds.

Flutter first entered the programming world as `Sky’ and it ran on the Android operating system. Now Flutter completely supports Dart platform and uses its advanced features. On Android, iOS, Linux and Windows, Flutter apps use just-in-time and ahead-of-time compilations. Special feature of it is `hot reloads’, i.e. make modifications to running apps. This feature sets Flutter apart from the crowd.

Flutter support’s Google’s Skia graphics library, opening the world to its core world of animation and graphics.

Flutter – a game changer for Dart

Forbes.com’s Todd Fabacher, Experienced Chief Executive Officer, with an extensive history of working in the computer software industry for over 25+ years, says that he is constantly asked a fundamental question by companies, “What development language should I choose, and what tech is coming around the next corner?”

His answer is Flutter and Fuchsia. He also says that these two words will dominate all programming discussions in 2019.

Flutter is footloose and free and ideal for young, cash strapped developers. `Download it and start’ is the mantra.

Fuchisa is Google’s take on Android and is an operating system of the future. But then aren’t there enough operating systems? Why bother to create a new one? According to Todd, the answer to this question is three simple letters: IoT. It’s all those hundreds of millions of devices that are starting to be embedded in our everyday lives: Amazon’s Alexa, self-driving cars from Tesla, intelligent temperature control devices and even smart locks for our homes. Fuchsia might make is home in the billions of IoT devices in the next few years, and its secret will be Flutter. Flutter makes the development look easy, and it is built for the future.

The three forces, Dart, Fuchsia and Flutter are gearing up to take on the world of hybrid and cross-platform mobile application development and in a few years, they will be most programmers best friends.

Mobility for workforce and customer engagement

We, at Trigent, have crafted and implemented comprehensive mobility solutions for large enterprises and SMBs. We can extend this capability to design, develop, and provide mobility solutions to empower you with seamless ecosystems that transcend distances, devices, and distribution models. To know more about our mobility offerings, click here.

Kotlin on Android – Is it Good for Developers?

After the Android team’s announcement of first class support for Kotlin in the Google I/O keynote in 17th May 2017, Kotlin came to limelight and Android developers started thinking of using Kotlin as the programming language instead of Java (ADT).

Kotlin is a statically-typed programming language developed by Jet Brains that runs on the Java virtual machine (JVM) and also can be compiled to JavaScript source code or uses the LLVM (Low Level Virtual Machine) compiler infrastructure. It is designed to interoperate with Java code and is dependent on Java Class Library, such as the collections framework. Kotlin is a fully supported programming language on Android. Kotlin was written by the same folks who created Android Studio, so its background comes from the mobile industry.

According to jetBrains, following are the reasons to use Kotlin for Android development.

  • Concise – Drastically reduces the amount of boilerplate code. More concise than Java. The code looks clean and easy to understand.
  • Interoperability – Use any existing library on the JVM, as there’s 100% interoperability. Target either the JVM or JavaScript.
  • Safe – Prevents more kinds of errors than Java and avoid entire classes of errors like null pointer exception.
  • Simpler – Way simpler than Scala! For a Java developer, getting started with Kotlin is very easy. The automated Java to Kotlin converter included in the Kotlin plugin helps with the first steps.
  • Performance – Compiles as fast as Java.
  • Small footprints – Kotlin has a very compact runtime library, which can be further reduced through the use of ProGuard. In a real application, the Kotlin runtime adds only a few hundred methods and less than 100K to the size of the .apk file. This means Kotlin adds just a little to .apk file size.

Installation:

The Kotlin plugin is bundled with Android Studio starting from version 3.0. If you use an earlier version, you’ll need to install the Kotlin plugin.

  1. Go to File | Settings | Plugins | Install JetBrains plugin…
  2. Then search for and install Kotlin.
  3. You’ll need to restart the IDE after this completes.
  4. After restarting, Android studio will prompt to configure the Kotlin plugin, select the latest version and click OK.
  5. It will again prompt to sync the gradle, click on sync.

Create a Project or convert existing project:

  1. Create a project normally.
  2. If you have existing code and want to convert in Kotlin then press ctrl+shift+A to find action.
  3. Write convert Java file to Kotlin file and press enter or press the shortcut ctrl+alt+shift+K (this will convert only the current file).

Related: Collaboration, Communication & Connectivity for future-ready organizations, leveraging mobility to create inclusivity, speed and cohesiveness.

4. Or start writing code with Kotlin to call methods written in Java or vice-versa as it is 100% interoperable with Java.

Everything is now ready to build the application and run it on an emulator or device. You can make a release or build an APK of the application and sign it similarly. Kotlin compiler produces byte-code, thus there really is no difference in terms of look and feel of Kotlin applications versus those written in Java.

Nice features of Kotlin:

1. Completely Null safe:

Kotlin completely removes null references by making all datatypes non-nullable (by default) i.e. the compiler won’t let you to use a non-initialized, non-nullable variable. To declare the type as nullable, add a question mark after the type. The compiler will enforce a null-check before accessing the variable. This practice drastically reduces bugs.

You can check if it’s nullable variable in two ways.
(a).The first is a traditional if statement:

if (nullVar != null)
 nullVar.fooboo();

(b).The second is with NULL safe call operator:

nullVar?.fooboo()

For example:

println(nonNullVar.substring(0, 3)) //prints first 3 characters
 println(nullVar?.substring(0, 3)) //prints first 3 characters if the string is not null, prints null otherwise

In some cases programmer may need to test the code if it is null pointer exception or not ,or if he knows the variable is nullable. Then he can use it as the compiler will not check for the null, and if it is null then throws null pointer exception.

println(nullVar!!.substring(0,3)) //prints first 3 characters if the string is not null, crashes with a NullPointerException otherwise.

2. Extension functions:

With an extension function, you can call a function from an object as if it were a part of its class. Kotlin lets you extend a class by adding additional functions to it without manipulating the original definition. Such functions are known as extension functions. The names of these functions should be preceded by the names of the classes they extend.

For example, to add an extension function isTeenager to the Student class, you write the following code outside the class:

fun Student.isTeenager(): Boolean {
 // If age falls in the range
// 13-19 return true
 return age in 13..19 //range
}

In Kotlin, it is compiled to a static function that returns a boolean value. You’d call it as if it were a member function, like

var student = Student()
 student.isTeenager()

as if it is a member function of Student class

3. Data Classes:

We all know that most of our apps are data dependent, we often find ourselves creating model classes to hold data. In Java, this can be very tedious task, generating getter and setter functions for each field. With Kotlin, we can declare the class and all its properties in a single line. The compiler will generate all getter and setter functions, as well as the equality members, toString() and a copy() function.

For example, take this in Java:

public class Student{
 private String name;
 private int age;
 public User(String name, int age) {
 this.name = name;
 this.age = age;
 }
 public void setName(String name) {this.name = name;}
 public String getName() {return this.name;}
 public void setAge(int age) {this.age = age;}
 public int getAge() {return this.age;} 
}

To run the same function in Kotlin, all we need is:

data class Student(var name: String, var age: Int?)

You just have to add data keyword before class keyword and the compiler will take care of generating constructor and getter setters.

4. Singleton: Kotlin doesn’t support static member for class. So, how can we create singleton class in Kotlin?

A thread safe singleton design pattern

In Java if it is like:

public class SomeSingleton {
 private static SomeSingleton instance = null; private SomeSingleton(){
 }
 private synchronized static void createInstance() {
 if (instance == null) {
 instance = new SomeSingleton();
 }
 }
 public static SomeSingleton getInstance() {
 if (instance == null) createInstance();
 return instance;
 }
 }

In Kotlin, it is

object SomeSingleton

The object will be instantiated and its init blocks will be executed lazily upon first access, in a thread-safe way as constructors are private and in case programmer need to initialize something.

With an object declaration, you are getting a safe and efficient singleton class.

object SomeSingleton {
 init {
 println("init called")
 }
 }

5. More features that will save you from some more keystrokes:

(a). Type aliases: Assign an alias to any given type. This is most useful for long types with many generic parameters.

E.g.

typealias MofL = Map<String, List> fun useMap(map: MofL) { }

(b). Clicklistners:

Consider this click listener

In Java:

view.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View v) {
 // perform click event
 }});

In Kotlin:

view.setOnClickListener { // perform click event }

(c). Semi colons: It is sufficient for Kotlin to sense the end of the statement through a line break. So if you forget to add semicolon at the end of the line, it’s okay!

(d). Constructors: Kotlin’s syntax to create a constructor is very compact. You don’t need to write a constructor separately to initialize member variables but you can add it to the class header only like in the example shown:

class Person(var name: String, var age: Int, var school: String?) {}

If you don’t need to write anything in class then you don’t even need curly braces.

You can add other constructors as well and are known as secondary constructors but you have to delegate it to the primary constructor using this keyword.

constructor(name: String, age: Int, school: String?, email: String) : this(name, age, college) {
 this.email = email
 }

Limitations:

Whenever a new programming language is launched, it takes some time to get into the market. When Kotlin launched, it wasn’t as mature and proper as it is now. Looking at the limitations, as it is new in town, you will not get proper tutorials and learning stuff. Programmers who already worked with Java can pick up Kotlin in a day just by going through the documentation. Kotlin has its own library that will be added on top of Java’s standard library, so file’s build size increases by 100kb and gradle build also takes little more time.

Conclusion:

So you can saw that Kotlin doesn’t have any ground breaking characteristics. While the goal was not to create something revolutionary, but to provide something that is usable and familiar to modern enterprise developers. Kotlin helps us in avoiding some common pitfalls which are common with Java like null references, which increases code efficiency and product quality and it is 100% interoperable with Java.

How to Programmatically Make your Android Phone Look Like an iPhone

In Android Operating System (OS) based on mobile phone or devices, the UI screen that appears first after the user presses the ‘Power on’ button is called the “Android Launcher Screen”. It is possible in Android to construct a custom launcher application, which can be used as a replacement for the default launcher application that comes along with Android phones. Unlike the iPhone, this is one of Android’s best features which lets you design your phone’s interface.

Android Launcher concept

The Launcher falls into one of two categories: ‘design’ or ‘smart’.

Design launchers focus on User Interface. You can change the entire layout of your Android phone’s home screen, application icon shape, icon drag and drop concepts, image gallery etc. You can customize everything it has to offer, including the themes, animations, layout, shortcuts and colors. Some of its interesting features include unlimited scrolling, customize app drawer layout, download-able themes and widget customization.

Smart Launchers learn the most relevant information about you which can be your wake up time, head out on your commute, work at the office, most favorite spot of city etc. You also can add custom gestures to your phone such as double-tapping the screen to open a specific application, web-page or specific setting.

Requirement

You need to have the following installed and configured on your development machine:

  • Android SDK and platform tools
  • Android Studio
  • An emulator or Android device running Android 2.2 or higher

Project Manifest.xml File Modification

In manifest.xml file add two activities. First activity displays the home screen and the second activity needs to display the applications that are installed on user’s device. It is also responsible for launching the installed applications. We don’t need any special configuration for this Activity.

Add the following two categories in Manifest.xml file to the intent-filter group. This intent-filter is associated with the Activity.

 <category android_name="android.intent.category.HOME" />
 <category android_name="android.intent.category.DEFAULT" />

We also need to set the android:launchMode to “singleTask” to make sure that only one instance of this Activity is held by the system at any time. To show the user’s wallpaper, set the theme to

android:theme=”@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen”

 <activity
 android_name="ah.hathi.simplelauncher.HomeScreenActivity"
 android_label="Simple Launcher Home"
 android_theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
 android_launchMode="singleTask"
 android_stateNotNeeded="true">
 <intent-filter>
 <action android_name="android.intent.action.MAIN" />
 <category android_name="android.intent.category.HOME" />
 <category android_name="android.intent.category.DEFAULT" />
 </intent-filter>
 </activity>

Add one more activity in Manifest.xml file for displaying the applications that are installed on user’s device.

<activity
 android_name="ah.hathi.simplelauncher.AppsListActivity"
 android_theme="@android:style/Theme.NoTitleBar.Fullscreen" > </activity>

Launcher Main Activity Layouts

Add UI design code in Activity_HomeScreen.xml file. Here layout has a single Button that responds to click events. Clicking the button takes the user from home screen to the list of applications.

<RelativeLayout xmlns_android="http://schemas.android.com/apk/res/android"
 xmlns_tools="http://schemas.android.com/tools"
 android_layout_width="match_parent"
 android_layout_height="match_parent"
 tools_context=".HomeActivity" >

<Button
android:id=”@+id/home_screen_apps_button”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_alignParentRight=”true”
android:layout_alignParentTop=”true”
android:layout_marginRight=”10dp”
android:layout_marginTop=”10dp”
android:text=”Show Apps”
android:onClick=”showApps”
/>
</RelativeLayout>

Next is to create an XML file for the AppListActivity class in the project’s res/layout folder and name it as activity_apps_list.xml. The layout contains a ListView that takes up the entire screen.

<?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns_android="http://schemas.android.com/apk/res/android"
 android_layout_width="match_parent"
 android_layout_height="match_parent"
 android_orientation="vertical" >

<ListView
android:id=”@+id/apps_list”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
>
</ListView>

</LinearLayout>

Finally, create a third XML file in the same location and name it as list_item.xml. This file defines the layout of an item in the ListView

 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns_android="http://schemas.android.com/apk/res/android"
 android_layout_width="match_parent"
 android_layout_height="match_parent"
 android_padding="10dp"
 >

<ImageView
android:id=”@+id/item_app_icon”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_alignParentLeft=”true”
android:layout_centerVertical=”true”
/>

<TextView
android:id=”@+id/item_app_label”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_toRightOf=”@+id/item_app_icon”
android:paddingLeft=”10dp”
/>

<TextView
android:id=”@+id/item_app_name”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:layout_below=”@+id/item_app_label”
android:layout_toRightOf=”@+id/item_app_icon”
android:paddingLeft=”10dp”
/>

</RelativeLayout>


Implementing the HomeScreenActivity Classes

With the layouts of the application created, it is time to create two Activity classes. When creating the two classes, make sure the name of each class matches the one you specified in the project manifest file earlier.

Create a new class named HomeScreenActivity and set android.app.Activity as its superclass.

Add this code in your HomeScreenActivity class or your main Activity class in onCreate method.

selectButton.setOnClickListener(new View.OnClickListener() {
 @Override
 public void onClick(View view) {

Intent i = new Intent(this, AppsListActivity.class);
startActivity(i);

}
});


We create an Intent for the AppsListActivity class and start it.

AppsListActivity Class

Create another Activity class named AppsListActivity and set android.app.Activity as its superclass. In the class’s onCreate method, we invoke setContentView, passing in the activity_apps_list layout we created earlier.

import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;

public class AppsListActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_apps_list);
}

}

AppDetail.java class file

Create a class named AppDetail that will contain the details of an application, its package name, label, and application icon. The interface is pretty basic as you can see below.

public class AppDetail {
 CharSequence label;
 CharSequence name;
 Drawable icon;
 }

Fetching installed Applications

In the LoadApplication method of the AppListActivity class, we use the queryIntentActivities method of the PackageMangaer class to fetch all the Intents that have a category of Intent.CATEGORY_LAUNCHER. The query returns a list of applications that can be launched by a launcher. We loop through the results of the query and add each item to a list named Apps.

private PackageManager manager;
 private List<AppDetail> apps;

private void loadApplication(){

manager = getPackageManager();
apps = new ArrayList<AppDetail>();

Intent i = new Intent(Intent.ACTION_MAIN, null);
i.addCategory(Intent.CATEGORY_LAUNCHER);

List<ResolveInfo> availableActivities = manager.queryIntentActivities(i, 0);
for(ResolveInfo ri:availableActivities){
AppDetail app = new AppDetail();
app.label = ri.loadLabel(manager);
app.name = ri.activityInfo.packageName;
app.icon = ri.activityInfo.loadIcon(manager);
apps.add(app);
}
}

List of Applications

The Apps variable containing all the details we need, we can show the list of applications using ListView class. We create a simple ArrayAdapter and override its getView method to render the list items. We then associate the ListView with the adapter.

private ListView list;
 private void loadListView(){
 list = (ListView)findViewById(R.id.apps_list);

ArrayAdapter<AppDetail> adapter = new ArrayAdapter<AppDetail>(this,
R.layout.list_item,
apps) {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(convertView == null){
convertView = getLayoutInflater().inflate(R.layout.list_item, null);
}

ImageView appIcons = (ImageView)convertView.findViewById(R.id.item_app_icon);
appIcons.setImageDrawable(apps.get(position).icon);

TextView appLabels = (TextView)convertView.findViewById(R.id.item_app_label);
appLabels.setText(apps.get(position).label);

TextView appNames = (TextView)convertView.findViewById(R.id.item_app_name);
appNames.setText(apps.get(position).name);

return convertView;
}
};

list.setAdapter(adapter);
}

ListView OnClickListener Method for List item

When the user clicks an item in the ListView, corresponding application will be launched by our launcher. We use the getLaunchIntentForPackage method of the PackageManager class to create an Intent with which we start the application.

private void addonClickListener(){
 list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
 @Override
 public void onItemClick(AdapterView<?> av, View v, int pos ,long id) {
 Intent i = manager.getLaunchIntentForPackage(apps.get(pos).name.toString());
 AppsListActivity.this.startActivity(i);
 }    
 });<br > }

Putting It All Together

We need to invoke loadApplication, loadListView and AddClickListener in the onCreate method of AppsListActivity class as shown below.

protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_apps_list);

loadApplication();
loadListView();
addClickListener();
}

Conclusion

Build and run your application once more to see the result. You should now be able to see the applications that can be launched when you click a button on the home screen of our launcher. Click on an item to launch the corresponding applications. That’s it! Now, try to mimic the UI look and feel of iPhone in your launcher application as you have got complete control over everything!

Here’s a quick read to help you update Android apps outside of Google Play.

Five of the Most Popular Databases for Mobile Apps

Mobile OS is growing bigger and bigger and recently Android mobile OS surpassed Windows OS as the most used Operating System in the world. As mobile OS is growing larger and hardware as powerful as any normal computing device, data computation from mobiles is also increasing.

The database is the most common way of storing and managing data. For quite some time now,  databases are handled on server-side or cloud and mobile devices only communicate with them through the network. However, to make applications more responsive and less dependent on network connectivity, the trend of offline usage or less dependency on the network is gaining popularity. Nowadays, applications keep DB locally or make a copy of DB over the cloud onto local devices and sync with it once in a day or whenever there is network connectivity. This will help in faster and responsive applications that are functional even when there is no or limited internet connectivity.

Databases for mobiles need to be:

  • Lightweight as storage is limited on mobile devices.
  • No server requirement.
  • In the form of the library with no or minimal dependency (embeddable) so that it can be used when needed
  • Fast and secure.
  • Easy to handle through code, and the option to make it private or shared with other applications.
  • Low memory and power consumption.

There are lots of mobile databases coming into the market but not all of them satisfy all requirements mentioned in this article. Let us discuss a few of the most popular databases for mobile apps and try to highlight their characteristics, pros, and cons.

Progressive web applications are helping businesses increase their user base. Read how 

SQLite

SQLite is relational DB, a lighter version of SQL designed for mobile. It is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. It is an embedded SQL Database engine without any separate server process, unlike any other SQL database.

SQLite supports all the relational database features and is an open-source compact library which is by default, present in two main Mobile OS i.e. Android and iOS, and supported by blackberry and windows phone.

SQLite can be stored both on disk as well as in-memory and each database file is a single disk file and can be used cross-platform. It is very fast and needs very little memory to operate.

Realm DB

The realm is a relational database management system which is like conventional databases, data can be queried and filtered, interconnected, and persisted but also have objects which are life and fully reactive.

Realm DB is developed by Realm and specially designed to run on mobile devices. Like SQLite, Realm is also serverless and cross-platform. It can be stored both on disk as well as in memory.

Realm has so many advantages over native SQLite, like:

  • Objects in Realm are native Objects, You don’t have to copy objects out of the database, modify them, and save them back—you’re always working with the “live,” real object.
  • Objects always stay in sync.
  • The realm is much faster than SQLite. Realm can query up to 57 records/sec, whereas SQLite can do only up to 20 records/sec.
  • Data can be secured with transparent encryption and decryption.
  • Realm has a reactive architecture, which means it can be directly connected to UI, if data changes it will automatically refresh and appear on the screen.
  • It automatically syncs to Realm Object server (if present) when there is network connectivity present.
  • One application can have multiple Realms, both local and remote
  • Can set different permissions for different users.
  • Available for Android, iOS, JavaScript, etc.

ORMLite

ORMLite is a lighter version of Object Relational Mapping which provides some simple functionality for persisting Java objects to SQL databases. It is ORM wrapper over any mobile SQL related DB.

ORMLite is used to simplify complicated SQL operations by providing a flexible query builder. It also provides powerful abstract Database Access Object (DAO) classes.

ORMLite is helpful in big size applications with complex queries because it handles “compiled” SQL statements for repetitive query tasks. It also has support for configuring tables and fields without annotations and supports native calls to Android SQLite database APIs.

But ORMLite does not fulfill all the requirements like it is bulky as compared to SQLite or Realm, slower than SQLite and Realm but faster than most of the other ORMs present in the market.

All in all, ORMLite is a good SQLite replacement if the application is big and complex in terms of DB usage.

Berkeley DB

Berkeley DB is an open-source high performance embedded DB that allows us to handle data in different ways. It was developed by Sleepycat Software but acquired by Oracle in 2006. It provides API for so many languages including Android and iOS.

Berkeley DB can handle data in many ways. It can be in a relational way like SQLite (by replacing SQLite with its own library), or it can be in Key/Value pair data as byte arrays and supports multiple data items for a single key. It also supports java objects as data or it can also be XML documents. Different libraries provide different types of API to handle multiple formats but all packaged Berkeley DB.

Berkeley can work as relational DB as well as NoSQL DB (Depends on which library you are using).

The good thing about Berkeley DB is that the API provided by it are compatible with SQLite. So one can use Berkeley DB without rewriting the whole code again. The combination of Berkeley and SQLite is considered faster and perform better in concurrent and single writing multiple reading operations.

Berkeley is relatively faster than SQLite but because of so many different features, it is bulkier than any other discussed DBs. So if the size of the application is a criterion try to use some other DB, unless you want a feature exclusively provided by Berkeley DB.

Couchbase Lite

Couchbase Lite is a powerful NoSQL embedded JSON database. It is a highly scalable DB with enterprise-level security.

Data in Couchbase Lite is stored as JSON documents. Each document can have one or more attachments which are stored and loaded separately from documents.

Couchbase Mobile is the solution provided by Couchbase Lite for mobile applications. It is comprised of three different components: Couchbase Lite, an embedded NoSQL database, Sync Gateway. Couchbase is an offline-first DB and sync with Cloud is needed or when the network is available.  Couchbase Lite runs locally on the device and persists data as JSON and binary format. All crud operations performed on local DB. The developer does not need to write sync code (if needed) to sync local DB with the cloud, it is handled by Sync Gateway. Couchbase Lite comes with a conflict resolution mechanism that is quite similar to the one used by Git.

Another advantage of Couchbase Lite is that it provided native APIs for Android and iOS and plugins for Xamarin and PhoneGap.

So if there is a requirement of any NoSQL DB in mobile OS, Couchbase lite is the best bet as it is very fast, reliable, and moderate in size.

In the end, it totally depends on the requirements and feasibility for the application to choose which DB will fit in. But every mobile DB should fill most of the above-mentioned requirements if not all.

Our end to end mobile app development services can help ideate, build deploy, update, and maintain your mobile applications without a worry.

Different Types of Mobile Applications – Native, Hybrid and Web Apps

Every day we use so many Apps (Applications) on our mobile devices for various purposes. Generally we classify these apps into three different categories like Native, Hybrid and Web. Reading this blog content will help you to understand and differentiate these apps.

These days we see the mobile devices mainly running on Android,  iOS or Windows 10. These are known as operating systems or platforms. Native apps are developed to target one specific platform like Android, iOS or Windows. Hybrid apps are developed to target multiple platforms whereas web apps are mobile-optimized web pages that look like an app.

Native apps are built for a specific operating system. A native app developed for iOS operating system won’t work on Android devices and vice-versa. If an app is developed for iOS, it will remain exclusive to that operating system. If at all the app has to support Android version, new app has to be built again for Android operating system. Softwares’ used to develop native apps generally would be Objective-C or Swift for iOS, Java and ADT for Android operating system and .NET(C#) for Windows operating system.

Mobile web apps are the web applications to render/deliver pages on web browsers running in mobile devices. Since these apps target browsers, they work on different mobile operating systems. You can view a mobile web app on Android, iOS or Windows tablets and phone devices. They also work on PC web browsers. Softwares’ used to develop these applications are generally HTML, CSS, Javascript, JQuery

Hybrid apps are a mixture of both native and mobile web apps. This type of application has cross-platform compatibility but can still access phone’s hardware. Softwares used to develop these apps are generally HTML, CSS, Javascript, JQuery, Mobile Javascript frameworks, Cordova/PhoneGap etc.

Native Apps

Hybrid Apps

Web Apps

Skills required Objective-C, Swift, iOS SDK, Java, ADT, .NET(C#) HTML, CSS, Javascript, Cordova/PhoneGap, Cross platform Mobile Development Frameworks HTML, CSS, Javascript, JS frameworks
Distribute Apple iTunes, Google Play store, Windows App store, Amazon App Store Web
Development effort More Medium Less
Performance Good Average Good in PC’s and Average in mobile browser
Good for Games or consumer-focused apps where performance, graphics and overall user experience are more important Apps that do not have high performance requirements, but need full device access Apps that do not have high performance requirements, and do not need push notifications or access to device hardware/functionality

Thanks for reading blog.

Using ORMLite in Android Mobile Apps

Introduction:

ORMLite (Object Relational Mapping) database provides lightweight data mapping between Java Classes & SQL Databases. ORMLite mainly supports the following JDBC connections: MySQL, Postgres, H2, SQLite, Derby, HSQLDB, Microsoft SQL Server and so forth.

Since it is not an in-built library in Android like SQLite, developers need to add the respective Jar file or dependency first before starting development.

Why ORMLite?

Before delving into the topic of ORMLite, we need to understand why we need ORMLite. As compared to SQLite database in an Android library, ORMLite can be used repeatedly without making too many changes to the code (in terms of queries).While dealing with ORMLite, it is not necessary to learn SQL as another language since we can use objects and pre-defined methods to create our database.

How to start & use ORMLite:

To start development using ORMLite in Android, we need to follow the below mentioned steps:

Downloading ORMLite jar file (Android):

For using ORMLite with Android application, you should download ormlite-android-4.43.jar and ormlite-core-4.43.jar & above version files. Add them as library files to the project and you are ready to start the development.

Configuration of your model class:

After successful download of ORMLite jar files, the second step for a user is to configure their Model class. Users can use the following annotations to configure their classes.

  • @DatabaseTable: The @DatabaseTable annotation is used to provide a specific user-define name to a database while creating a Database Table..
  • @DatabaseField: The @DatabaseField annotations are used to provide fields to the database created.
  • @DatabaseField(id=true): The @DatabaseField annotation is used if a user need to declare any of the fields created in the database as a Primary Key.

Below is an example to demonstrate ORMLite model class:

Example:

@DatabaseTable(tableName = "employee")
 public class Employee{
 @DatabaseField(id = true)
 private String name;
 @DatabaseField
 private String empID;
 @DatabaseField
 Private double salary;
 public Employee() {
 // ORMLite needs a no-arg
 constructor with package visibility.
 }
 public Employee(String name, String empID,String salary) {
 this.name = name;
 this.empID = empID;
 this.salary =salary;
 }
 public String getName() {
 return name;
 }
 public void setName(String name) {
 this.name = name;
 }
 public String getempID() {
 return empID;
 }
 public void setempID(String empID) {
 this.empID= empID;
 }
 Public double getsalary(){
 return salary;
 }
 public void setsalary(double salary) {
 this.salary= salary;
 }
 }

Configuration of DAO:

DAO stands for Data Access Object which provides us CRUD (Create, Read, Update & Delete) database operations. The simplest way to create a DAO is to use a static createDao method in the DaoManager class. The DAO of Employee class defined will look like:

**Private Dao<Employee,String> empdao = DaoManager.create(connectionSource,Employee.class);

Custom Statement Builder:

DAO has some pre-defined methods to query for an object that matches an ID field as (queryForId) & if it matches all objects, then (queryForAll) and some other simple matching methods. However, for more custom queries we have queryBuilder() method which returns a QueryBuilder object for a DAO with which you can construct custom queries of your database tables.

Query Builder Basics:

To start working with query builder, we have to first provide column names to our database fields so that it will be easy for us to use them while building our query. Below is an example to show how to build a query in ORMLite:

@DatabaseTable(tableName =“Employee")
 public class Employee{
 public static final String FIELD_NAME = "name"; ...
 @DatabaseField(canBeNull = false, columnName = FIELD_NAME)
 //this will check that the name given by user to column FIELD_NAME should not be empty
 private String name; …
 Now let us start building query as:
 QueryBuilder<Employee, String> queryBuilder = empdao .queryBuilder();
 Where<Employee, String> where = queryBuilder.where();
 where.eq(Employee.FIELD_NAME, "Rohit");
 where.and();
 where.eq(Employee.FIELD_Emp_ID, "12345");
 PreparedQuery<Employee> preparedQuery = queryBuilder.prepare();

Using this With Android OS:

While working with Android operating system we need to create our own database helper class extends to OrmLiteSqliteOpenHelper class. This class creates an override method as onCreate and onUpgrade .These override methods create and upgrade your database when your application is going to start and can also provide the DAO.

Classes used by other classes:

While working with this, you should keep your helper class as public so that all other classes can easily access it. Once you have defined your database helper you need to use it in your activities.

The simple method to use your OpenHelperManager is to extend it to OrmLiteBaseActivity for each of your activities. If you don’t want to follow the above method you can directly call OpenHelperManager.gethelper() method to your respective classes.

Once you use OpenHelperManager.gethelper() save the helper class and then call OpenHelperManager.release() to release the call.

Table Config File:

We have used ORMLite annotations for configuring our class. If required you can also remove the annotations which makeour data access objects operations a bit faster.. In ORMLite you can configure data using a text configuration file. This configuration file consists of different tags related to database table and the fields associated with it. The OrmLiteConfigUtil class writes this config text file in android raw resource folder and can be declared in your database helper class. Below is an example of config text file:

public class DatabaseConfigUtil extends OrmLiteConfigUtil {
 public static void main(String[] args) throws Exception {
 writeConfigFile("ormlite_config.txt");
 } }

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.

The What, When & Why of Mobile Interrupt Testing

Read an overview of mobile app testing.

Mobile Interrupt Testing is a form of mobile application testing that deals with the behavior of an application when it is interrupted in the foreground and resumes to a state before the interruption.

Interrupt Testing, on the other hand, applies to any application type, i.e. web, mobile, stand-alone, etc. However, the variety of devices, networks, configurations, etc. makes this form of testing appropriate for mobile applications.

What is Mobile Interrupt Testing?

We all have our daily interruptions in day-to-day life. Consider a real-life example of being interrupted by a call when reading a newspaper. Some of us may notice the call, ignore it and continue to read the paper, some see the call, acknowledge it, and continue reading, a few more might attend the call, and then resume reading the paper. However, in all the above instances, one’s thought process when reading the paper has been interrupted or lost. To translate this to mobile technology, Interrupt Testing tries to find out which behavior your application exhibits when an interruption occurs.

Given below are a few examples of interruptions in smartphones:

  • Battery low
  • Battery full – when charging
  • Incoming phone call
  • Incoming SMS
  • Incoming alert/push notification from another mobile application
  • Plugged in for charging
  • Plugged out from charging
  • Device shut off
  • Application update reminders
  • Alarm or calendar reminders
  • Network connection loss
  • Network connection restoration

This list is not exhaustive and only includes the most common scenarios.

Before we move on let us understand the phrases, ‘application running in the foreground’ and ‘application running in the background’.

The application running in the foreground is the app on which the user has direct control and which will be seen on the smartphone screen.

Background applications are those apps running on the smartphone but on which the user will not have direct control until it is brought to the foreground. Apps running in the background are expected to resume to the last controlled screen/action when called to the foreground.

Usually, an app goes to the background when we open multiple apps and then we toggle between apps based on our need without closing/quitting the app. The app which is in the background will be using the memory of the phone till it is quit by killing.

The application needs to handle the interruptions adequately to meet user requirements. The expected behavior of an app for these interruptions might resemble the following:

  1. Run in the background: The interruption takes over while the application goes to the background. It gains control after the interruption ends. For example, A phone/WhatsApp/Skype call that you attend while you are reading/playing a game on the smartphone. When the call ends the game or the activity you were involved with, should resume to the state it was in, before the interruption.
  2. Show alert. Alert disappears, and you work as usual. ‘SMS received’- messages appear in the header. The user does not bother about it and continues working with the application as normal. Other mobile app alerts, such as a new friend request on Facebook or WhatsApp messages, also fall into this category. But if the user decides to read the message, the behavior described in Point 1 is followed. If ignored, the application’s state is unchanged.
  3. Call to Action: Alarms have to be turned off or snoozed before you continue working. The same thing applies to app update messages. You either have to ‘Cancel’ or ‘Accept’ the changes before you proceed. Another example is that of the low battery alert – You can choose to continue as usual or go into a low power mode (if the device allows it).
  4. No impact: An example is: if a network connection becomes available and your device connects to it. Also, when you plug your device in for charging, no alert or call to action step is necessary. It will probably do its job while you continue using your application.

Thus, depending on the interruption you are testing for, understand the behavior, and see if your application satisfies it.

Also, the behaviors described above need not be the same for all applications and devices. Be sure to find out specific details about your particular Mobile App.

Now that we understand what Interrupt Testing is and what to validate when conducting it, it is time to talk about how to do it.

How to Conduct Mobile Interrupt Testing

Look at this scenario: Google Chrome or any browser app for that matter has to run in the background when the user receives an incoming phone call.

Would you not call this a functional requirement of the google chrome app? I know, I would.

So, Interrupt Testing is a subset of Mobile Application Functional Testing. And, to conduct Interrupt Testing, you would follow the same Mobile Application Test Frameworks and Tools. It is the skill of the tester to conceive these scenarios. Once done, you would design the test cases and execute them in the same way as any other test. And do not get confused with the interrupt testing with the recovery testing. The recovery Test is to validate the restoration from a failure. Interrupt Testing is not necessarily a failure. It is a mere distraction.

The need for interrupt testing with various scenarios is very much necessary in this mobile app enriched world where competition between similar apps is at its peak. The best app with excellent usability is always talked about, referred to, and chosen by users.

Need help with your mobile application testing requirements? Trigent’s experienced quality assurance and testing team ensure your product is market-ready within stipulated timelines.

GPS Programming in Android for Offline Maps

Most mobile users and several developers may not be aware of the fact that GPS navigation is possible without Internet connectivity, i.e. ‘Offline map usage’ is possible without accessing the Internet!

Given below are a few tips on how to make this work and understand where offline data is stored:

To access maps, offline, i.e. when you are not connected to the Internet, you have to store the map tiles in your device and the code will render the map from the locally stored tiles’ information. ‘Tiles’ is the file which is in .zip or SQL format which will have all the information with respect to routes – latitude and longitude. All the map related files can also be stored in SD Card or device memory based on requirements.

In case you do not want to utilize your device storage for storing entire world map related data, the solution is simple. Download an application which is developed using some libraries that will download tiles and store files in device storage based on your selected region.

If you are an Android app developer and want to understand the process behind offline map application and if you also want to know the most feasible method to develop this kind of application, the answer is, there are a lot of libraries available and most of them are open source.

Given below are a few suggestions on open source libraries:

OSMAndroid :

Osmandroid is a tool which is used to show data from Open Street Maps when on-line, and can use tiles for off-line access. This is a raster-based option, and you can use Mobile Atlas Creator to create tiles from pretty much any WMS service.

Reference: https://github.com/osmdroid/osmdroid

MapsForge :

This is an excellent library for rendering OSM data on-the-fly or when needed, which means it will download the tiles based on the region. It has a special optimized tile format, and the rendering performance is quite good.

Reference: https://github.com/mapsforge/mapsforge

ArcGis Runtime for Android :

ArcGis seems to be oriented towards showing ArcGIS Server’s Mapservices. ArcGis can show data in an offline mode, by storing tiles in the compact cache storage format, or by using tile packages.

Reference: http://resources.arcgis.com/en/page-has-moved/

Nutiteq :

This is a fully featured library and includes several unique features such as support for 3D, various OGC services, custom Map API’s, offline routing and maps in any projection.

Reference: http://www.nutiteq.com/nutiteq-sdk/comparison/

Google Maps Android API :

This is the default mapView in Android, and it uses the data from Google Maps. While the Google map application itself can be used in offline mode, as far as my knowledge goes, it is not possible to use Google Data in the offline mode. However it is possible to show your own tiles in offline mode.

Reference: https://developers.google.com/maps/documentation/android-api/

MapBox :

This company has recently released an Android SDK, which can be used for online and offline maps.

Reference: https://github.com/mapbox/mapbox-android-sdk-legacy

To summarize, I have provided some information on libraries you can use for Android app development. These are the most popular open source libraries/tools for implementing offline maps. There are several other paid libraries and end-to-end solutions for implementing offline maps.

Referral: http://mobac.sourceforge.net/

Listed below are some of the best offline maps available in Google Play Store:

Maps.me

Download: https://play.google.com/store/apps/details?id=com.mapswithme.maps.pro&referrer=utm_source%3DAndroidPIT%26utm_medium%3DAndroidPIT%26utm_campaign%3DAndroidPIT

OsmAnd

Download: https://play.google.com/store/apps/details?id=net.osmand&referrer=utm_source%3DAndroidPIT%26utm_medium%3DAndroidPIT%26utm_campaign%3DAndroidPIT

This blog with basic level information and referral links is for curious developers who want to understand how offline maps work.  If you have any questions, do write to me at: mohammed_n@trigent.com