Tag Archives: Software

Android Oreo

How to Optimize GPS and Background Processes for Android Oreo

As our past article Android Oreo Serves Up the Sweets will show, Android Oreo lived up to expectations upon release and gave both consumers and app developers plenty of enhancements to enjoy.

However, for app developers, enhancements to the UI aimed to conserve battery life affect GPS services and require changes to the code in order to optimize pre-existing apps for the new OS. Specifically, Android Oreo restricts apps that are running in the background with limited access to background services. Additionally, apps can no longer use their manifests to register for most implicit broadcasts. When an app is in the background, it is given several minutes to create and use services, but at the end of that time slot, the app is considered idle and the OS will stop running background services.

These changes directly affect apps with geolocation functionality. Android Oreo limits how frequently apps can gather location in the background. Background apps can only receive location updates a few times each hour. The APIs affected due to these limits include Fused Location Provider, Geofencing, Location Manager, Wifi Manager, GNSS Measurements and GNSS Navigation Messages.

Apps that currently use location services in previous Android OS’s will require an update to optimize for Android Oreo. Apps that use location services range anywhere from navigational apps like Waze and Google Maps to social media apps like Twitter, and food apps like Yelp and Seamless.

For apps that require frequent location updates, increasing the usage of the app in the foreground will ensure that the app gets frequent access to location information. In order to program this, developers must implement startServiceinForeground() instead of startService() in Activity class.

In Service class in onStartCommand(), developers can use the following code:

Screen Shot 2018-05-07 at 12.46.57 PM

Via StackOverflow

When foreground services running in the background consume high energy, Oreo fires an automatic push notification to the user informing them of the battery-consuming service. With the push notification in place, app users are more likely to uninstall apps that track location without conserving battery life, putting the onus on software developers to deliver battery-efficient apps. One of the biggest issues facing some app developers is ensuring that battery life is not sucked as a result of tracking location in apps. Check out our full rundown of how to build battery-efficient geolocation apps for supplementary reading.

The results of the limits put in place with Android O are increased battery life for the user and the necessity for app owners to consider how their apps interact with location information. Retaining a thorough understanding of how location information will be retrieved and used through out the development process ultimately benefits both software developers and consumers with better UI and more energy efficient processes.

Data Encryption

How to Safely Encrypt Sensitive Data in Your Mobile App

In November 2014, cybercriminals perpetrated one of the biggest cybercrimes of the decade. They hacked into Sony’s computer systems, stole sensitive data, paralyzed the company’s operations, and gradually leaked embarrassing information to the media. The hackers threatened to continue until Sony agreed to pull the controversial comedy The Interview from its theatrical release.

As the headlines will tell you, the encryption of sensitive data is one of the most important investments a company can make. Facebook is currently under heat for data protection practices. The UK National Crime Agency called WannaCry a signal moment for awareness of cyberattacks and their real world impact. With the stakes higher than ever, the encryption of sensitive data in apps has never been more important.

Here are our top tips on how to safely encrypt sensitive data in your mobile app.

TIP #1: Coding and Testing

Writing secure code is fundemental to creating a secure app. Obfuscating and minifying code so that it cannot be reverse engineered is critical to keeping a secure environment. Testing and fixing bugs when they are exposed should be an ongoing investment of resources as it will pay off in the long run.

Tip #2: Scramble Data

Sometimes, the best method of encrypting data is scrambling. Software and web developers often become obsessed with storing every bit of data in databases and logs, assuming it may be useful later, but doing so can create a target for cybercriminals.

Cunning developers will only store a scrambled version of the data, making it unreadable to the outside eye, but still useful for those who know how to query it correctly.

For an in-depth dive into scrambling data, check out this awesome essay on how Amazon does it.

Tip #3: In Transit Vs. At Rest Encryption

There are two types of data to be encrypted: in transit data and at rest data. In transit data is moving data, be it in transit via email, in apps, or through browsers and other web connections. At rest data is stored in databases, the cloud, computer hard drives, or mobile devices. In transit data can be protected through the implementation of robust network security controls and firewalls. At rest data can be protected through systematically categorizing and classifying data with data protection measures in mind.

Tip #4: Secret Vs. Public Key Algorithms

Secret Key Algorithms are algorithms that use the same key for encryption and decryption. Public-key algorithms us two different encryption keys, one for encryption and the other for decryption. The public key is how the data is sent and the private key decodes it. Public-key algorithms are more secure, but require more computer processing power.

Tip #5: Blockchain Cryptography

We’ve covered the Blockchain in our past article on The Revolutionary Mechanics of the Blockchain. Blockchain cryptography has been on the rise because blockchain databases are distributed and thus more resilient in the face of a DOS attack.

Tip #6: Apps that Clean Up after Themselves 

Apps that collect sensitive information don’t necessarily need to store it. It is wise to delete sensitive data from mobile apps when the data is no longer in active use.

Tip #7 Choose the Right Algorithm

There are several popular pre-existing algorithms in existence that can be used to encrypt sensitive data in mobile apps. Check out UpWork’s awesome rundown:

  1. Advanced Encryption Standard (AES)
  2. RSA
  3. IDEA
  4. Signal
  5. Blowfish and Two Fish
  6. Ring Learning With Errors or Ring-LWE

Over the last 10 years, enterprise-wide use of encryption has jumped by 22 percent according to the Ponemon Institute. When building a mobile app, investing in encrypting sensitive data will pay off in the long run and haunt those that short-change it.

Artificial

The Real Power of Artificial Intelligence

Technological innovations expand the possibilities of our world, but they can also shake-up society in a disorienting manner. Periods of major technological advancement are often marked by alienation. While our generation has seen the boon of the Internet, the path to a new world may be paved with Artificial Intelligence.

WHAT IS ARTIFICIAL INTELLIGENCE

Artificial intelligence is defined as the development of computer systems to perform tasks that normally require human intelligence, including speech recognition, visual perception, and decision-making. As recently as a decade ago, artificial intelligence evoked the image of robots, but AI is software not hardware. For app developers, the modern-day realization of artificial intelligence takes on a more amorphous form. AI is on all of your favorite platforms, matching the names and faces of your friends. It’s planning the playlist when you hit shuffle on Apple Music. It’s curating the best Twitter content from you based on data-driven logic that is often too complex even for the humans who programmed the AI to decipher.

MACHINE LEARNING

Currently, Machine Learning is the primary means of achieving artificial intelligence. Machine Learning is the ability for a machine to continuously improve its performance without humans having to explain exactly how to accomplish all of the tasks it has been given. Web and Software programmers create algorithms capable of recognizing patterns in data imperceptible to the human eye and alter their behavior based on them.

For example, Google’s autonomous cars view the road through a camera that streams the footage to a database that centralizes the information of all cars. In other words, when one car learns something—like an image or a flaw in the system—then all the cars learn it.

For the past 50 years, computer programming has focused on codifying existing knowledge and procedures and embedding them in machines. Now, computers can learn from examples to generate knowledge. Thus, Artificial Intelligence has already permanently disrupted the standard flow of knowledge from human to computer and vice versa.

PERCEPTION AND COGNITION

Machine learning has enabled the two biggest advances in artificial intelligence:  perception and cognition. Perception is the ability to sense, while cognition is the ability to reason. In a machine’s case, perception refers to the ability to detect objects without being explicitly told and cognition refers to the ability to identify patterns to form new knowledge.

Perception allows machines to understand aspects of the world in which they are situated and lays the groundwork for their ability to interact with the world. Advancements in voice recognition have been some of the most useful. In 2007, despite its incredibly limited functionality, Siri was an anomaly that immediately generated comparisons to HAL, the Artificial Intelligence in 2001: A Space Odyssey. 10 years later, the fact that iOS 11 enables Siri to translate French, German, Italian, Mandarin and Spanish is a passing story in our media lifecycle.

Image recognition has also advanced dramatically. Facebook and iOS both can recognize your friends’ faces and help you tag them appropriately. Vision systems (like the ones used in autonomous cars) formerly made a mistake when identifying a pedestrian once in every 30 frames. Today, the same systems err less than once in 30 million frames.

EXPANSION

AI has already made become a staple of mainstream technology products. Across every industry, decision-making executives are looking to capitalize on what AI can do for their business. No doubt whoever answers those questions first will have a major edge on their competitors.

Next week, we will explore the impact of AI on the Digital Marketing industry in the next installment of our blog series on AI.

Scopes: How Ubuntu Is Changing the OS Landscape by Eschewing Apps

In the world of operating systems, Android and Apple reign supreme. According to leading research firm Gartner, about 97% of new smartphones sold are either iPhone or Android devices. While Windows, Firefox OS, and Blackberry all attempted to take a seat at the OS table, no company has been able to top Android & iOS. With the landscape more fixed than ever, Ubuntu has entered the arena with a different strategy which may break through the noise and catch on.

Ubuntu managed to stir up publicity in 2013 when they launched the largest crowdfunding campaign of all time through IndieGoGo—and failed. They attempted to raise $32 million in one month, but only hit $12.8 million and received none of the funds. Regardless, the stunt captured the attention of many and helped make a name for the young company.

Ubuntu has made waves in the tech world with an innovative strategy which eschews traditional OS models. Instead of apps, Ubuntu uses Scopes. Scopes are home-screen dashboards which present content from various sources alongside each other on a page. For instance, the music Scope puts songs stored locally on the device side-by-side with Youtube, Apple Music, and other music library services. The video Scope allows users to search for a title and see where it is available for viewing rather than forcing the user to to search individual video streaming libraries like Netflix and Hulu. Instead of forcing the user to search for content within a specific app, Scopes present the content from all providers that have it available.

If apps are folders in a computer, Scopes allow the user to search through the entire local storage disk rather than have to check each individual folder. The philosophy is intended to provide a more intuitive user experience. When a user wants to find content or information, they care less about where it’s coming from than receiving the content with the highest quality attainable.

Check out this awesome video walkthrough of Scopes functionality to better understand how they work visually:

Scopes are easier and less time-consuming to design than native-apps. Scopes also appeal to mobile developers as they offer more discoverability for their companies than apps in the app store. The lack of division in presenting search results ensures the best content will rise to the top, rather than the most popular brand. Given the lower price of entry and the innovative approach, Ubuntu parent company Canonical has managed to bring name-brand content providers to build Scopes, including Twitter, Facebook, Amazon, Yelp, SoundCloud, and more. Communities are also developing Scopes for other apps, including Dropbox and Spotify, using their APIs.

Meizu launched the Meizu PRO 5 Ubuntu Edition in February 2016. They currently have four phones on the market, including BQ Aquarius E5 HD, and the previous versions of either device. Windows 10 with Ubuntu recently went into public preview. Going forward, Ubuntu must become available on enough devices to gain traction and popularity if they want to compete with Android & iOS. Given the amount of resources at their disposal and the clear innovation on display in Ubuntu’s philosophy, we wouldn’t be surprised if Apple or Android took a shot at figuring out a way of applying Scopes within their OS.