Saturday, 22 October 2016

Double tap: five killer Android features

Everyone has their own particular favorite Android features. Over the years there have been plenty. Some have stuck around, like a two-finger swipe to access Quick Settings, while others have disappeared, like lock screen widgets.
But when I started thinking about some of my all-time favorite Android features, I realized that, for me at least, they all had something in common: they were all based around a double tap.

Double tap to wake

Originally appearing on the LG G2, the first and last of the G series to not have big issues, Knock On – also known as double tap to wake – is easily one of my all-time favorite Android features. Frequently imitated, the feature is so convenient you frequently find yourself trying to do it on phones that don’t support it.
Using a knuckle to quickly activate the display is a great option when you’re eating and have messy fingers, don’t have easy access to the power button (especially useful considering the G2’s rear-mounted power button) or just generally feel like smacking your smartphone around a bit.
But not all knuckle gestures are equal: Huawei’s horrid knuckle gestures are a joke and even LG’s Knock Code was a bad idea. Sometimes the first idea is the best idea, and in the case of applying knuckles to your phone screen, this was it.

Quick app switching

Found only in devices running Android 7.0 Nougat and above, quick app switching is easily the most intuitive gesture I’ve ever come across. It takes moments to get used to and just minutes to become reliant on.
Switching back to a phone that doesn’t support quick app switching is one of the most painful Android experiences you’ll ever endure. Who would’ve thought that something as simple as double tapping the recent apps button would become such a cornerstone of the Android experience basically overnight?

Camera shortcut

This has been my favorite hardware shortcut since it first appeared. The Moto X may have been the first device (as I recall) to provide a quick camera shortcut, but that awkward wrist flick gesture was goofy and slow.
Then, HTC’s “press a button and raise the phone in landscape orientation” combination came a little closer to getting things right, but it wasn’t until the Galaxy S6 and Nexus 6P that all my dreams were fulfilled (I have bland nerd dreams, what can I tell you).

I personally prefer the power button shortcut to the home button version found on Samsung devices, mostly because I’m less likely to accidentally hit the power button twice whereas I found myself continually in the camera on the S6 when I didn’t want to be.
When I got the OnePlus 3 after that with the same functionality, I hoped it would quickly be adopted by all manufacturers. We’re not there yet but I can still hope. Some ideas are so good and so fundamental to the platform that they truly deserve to be gifted to all OEMs without any pesky patent claims to get in the way out our enjoyment.

Double tap to highlight words

If you do as much translating of foreign words as I do, or simply copy hashtags, URLs or other snippets of text on the regular, then being able to double tap to instantly highlight a word (or double tap and swipe to highlight phrases) is a godsend.
It’s far from the sexiest double tap shortcut on this list but its easily the one I use the (second) most, right up there with quick app switching.

Honorable mention: fingerprint scanner gestures

Now, this shortcut doesn’t rank as highly as the others because its only available on a couple of Huawei phones and the new Google Pixels, but being able to use the fingerprint scanner as a tool for bringing up the notification shade, navigating menus and swiping through image galleries is brilliant.
But the double tap functionality I’m talking about here is the double tap to clear all notifications gesture (which isn’t supported on Pixels). I have to admit that the use cases of some scanner gestures can get a little lost because you don’t typically have your index finger resting on the scanner for that moment your gallery app launches. In those cases it’s much simpler to just swipe with a fingertip on screen.
But for unlocking your phone, dragging down the navigation shade, reading your notifications and then clearing them all away, the fingerprint scanner gesture and double tap combo is a one-stop shop of fantastic. I’m not sure how far scanner gestures will ever spread, but Android 7.1 on the Nexuses doesn’t seem to support them (apparently due to a missing piece of scanner hardware).

Friday, 21 October 2016

Google is creating an open developer platform called "Actions on Google"

4th oct 2016 announcements by Google have certainly given us a lot to look at in terms of new hardware and features – and possibly a case of sticker shock. But while the show was mostly dominated by new gadgets and demos of Google assistant, there was a really important addition for developers (and ultimately users) at the tail end of the event. Google intends to turn assistant into a major ecosystem for apps and services by opening up the platform to developers.
The platform is called "Actions on Google" and it will allow developers to deliver custom experiences through Google assistant. Google assistant can already take advantage of many existing capabilities like app indexingdeep linking, and even the Voice Interaction API to provide helpful answers and services. However, these techniques put a wall between apps and the voice interaction that would call them, leaving a very limited form of interaction. By opening assistant to developers, it will be possible to create very streamlined interactions.
Developers will be able to create two types of actions: direct and conversational. Direct actions can be triggered by Google assistant when a command is clear and doesn't require any subsequent follow-up. These are very similar to the voice actions Google already supports with a number of existing partners. For example, this could include a command to play a specific song from a music app or turn on the light in front of your house.
Conversation actions are used for things that require more continuous Q&A with users. This can turn into a dialog where assistant asks the questions necessary to fulfill a request and based on a user response, additional questions may follow. Examples of these interactions could include asking for a car to pick you up, then responding to questions about where it should stop, how large the vehicle should be, and more.
Google wants these actions to be accessible without necessarily installing an app or authorizing a service in advance. As it was described on stage, Google assistant will detect what is needed based on the context of the request and attempt to provide it. There are no details about how this will be achieved, but it sounds like developers will register their actions in a discovery service.
Google recently acquired API.AI, a service that helps developers create conversational user interfaces. These can be turned into actions for Google assistant, and similar tools and services will be supported in the future.
According to the presentation, the Actions on Google platform will be open and allow anyone to build for it. The intended launch date is expected to be sometime in early December, though there are no details beyond that. Visit to sign up for news and updates.
In addition to opening up the platform to allow developers to work within it, Google is also working to make it available to more hardware. The Embedded Google assistant SDK was also announced with the intent to encourage hardware makers to include Google assistant in anything from major product lines all the way down to personal projects built on Raspberry Pi. In other words, we can expect to see Google assistant running on plenty of hardware beyond just the Pixel phonesGoogle Home, and a short list of other partner devices – but the terms might be restrictive. The embedded SDK is expected to launch next year, but that's about the extent of the details.
This will be Google's first fully open hook into its interactive voice capabilities. Amazon already allows developers to integrate with Alexa's conversational flow, although it is fairly limited, and Apple released SiriKit earlier this year to allow iOS and macOS developers to integrate with its own voice assistant.

Google’s Android 7.1 Developer Preview starts rolling out to beta testers

No major surprises here: Earlier this month, Google announced that the Android 7.1 Nougat Developer Preview and its SDK tools would roll out to developers sometime later this month — and now that we have passed the middle of the month, the preview is indeed rolling outto those who have signed up for the Android Beta Program.
While the Android Beta Program is mostly geared toward developers, there’s nothing stopping you from giving Android 7.1 a try if you are simply curious about what this latest update has in store for you. It’s beta software, though, so keep in mind that it may still have plenty of bugs (I wouldn’t install this on my main phone, for example).

This is the same Android 7.1 that’s already on the Google Pixel, though, so we’re probably looking at a pretty stable release. Sadly, Google isn’t bringing all the Pixel’s best features to other devices. That means even though you may have 7.1 on your Nexus 6P, you still won’t get to use the system-wide Google Assistant feature, for example.
Google’s plan is to release another preview in November and then roll out the final version in December. If you currently own a Nexus 5X, 6P or Pixel C and are enrolled in the beta program, you should see the over-the-air update very soon. The final release will also come to the Nexus 9, Nexus Player and Android One devices, as well as the new Pixel phones.
As for the new features in Android 7.1, check out our post from earlier this month (spoiler: There aren’t that many, but the ones that are included are pretty useful).

Thursday, 20 October 2016

5 Reasons Why You Should Choose Realm Over CoreData/SQLite

Recently, there's been released a very interesting tool for iOS Developers (and soon Android too). That is Realm. Realm is a mobile database that aims at replacing CoreData and SQLite. What really impressed me is that Realm is not only very well built, but also very fast. Surprisingly way faster than CoreData and SQLite! In this post I will share with you 5 reasons why you should already choose Realm over CoreData/SQLite for your next project.

1. Ease of use

I've never really been a fan of CoreData and i am sure many of you feel the same. Sure, it's a powerful tool, but it's not so easy to catch up and maintain. On the other side, Realm, couldn't be easier to use. Realm data models are defined using traditional NSObject-style classes with @properties. Simply subclass RLMObject to create your Realm data model objects.
Realm objects can be instantiated and used standalone just like regular objects. To share objects between threads or re-use them between app launches, you must add and retrieve them from a Realm. All changes to an object (addition, edition and deletion) have to be done through write transactions: 
To query the saved Realm objects, use  [RLMObject allObjects]which returns all RLMObject instances of the same subclass type from the default Realm:
Easy as that! No more NSManagedObjects, NSPersistentStoreCoordinators, etc.

2. Speed

I was really surprised to see that Realm is actually faster than other popular mobile data storage solution. Especially the queries speed. Needless to say anything about it. Just check the benchmarks bellow.


3. Realm Browser

There are a few solution to explore your CoreData database independently, but many of those are either expensive or not working. A few of them:  SQLite Professional, Core Data Editor, Core Data Pro, etc. The amazing engineers at Realm thought about this too. They provided an utility called Realm Browser. It allows you to easily explore your Realm databases and guess what? You can even edit them!


4. Cross-platform

Soon, Realm will be available for Android too. I was told that you could use the same .realm databases across multiple platforms. Just imagine what you could develop with that huge advantage of sharing the same data models over iOS & Android. That's something you could very hardly achieve using CoreData/SQLite. Besides that, Realm is in continuous development, so we might see some more platforms support in the future.

5. Free, Well-documented, Other Features

Some of you might not be surprised that Realm is free, but just take a look at all the advantages you have compared to other similar solutions and you'll see that this is a pretty awesome. The guys at Realm worked really hard on their documentation and what i especially like is that is very straight forward. If you have a question on a related feature, you will easily find your answer. One more thing some developers might like is that Realm supports Objective-C as well as Swift, which suggests that this would be a long-term solution for iOS Developers. 

I didn't went in much technical details about it, but Realm means way more than you've just read. Right now it's in very early stages but with the help of an amazing community, i am sure it will grow a lot. It supports relationships, migrations, background operations, notifications, etc. I highly recommend you to check it out on and give it a chance for your next project. I promise you won't be disappointed.

Wednesday, 19 October 2016

What Is Rooting? Is Rooting My Android Smartphone Illegal?

If you are a long time Android user, you might have come across various applications asking for root access to function. The internet is full of articles on rooting and the whole process is different for different smartphones. There are tons of guides on online forums and there is no single guide that works for all smartphones. Well, in this article, I’ll try to tell you the meaning of rooting and some related aspects.

What is rooting?

Here, at Fossbytes, we love Linux and open source software. So, I expect that you might be using a Linux distribution for everyday computing. In that case, you might be aware of running a command with sudo. It allows you to run programs with root permissions. If you’re using a Windows PC, it’s similar to running programs as administrator privileges. It’s often compared to jailbreaking an iOS device, a process that’s entirely different.
The Android operating system is based on Linux and it uses the same permissions and file-system ownership. When you buy a new Android device, you have the option to install new applications, uninstall them, and do various kinds of stuff. However, there could be lots of preloaded stuff, also called bloatware, that you might wish to uninstall.
On a rooted Android smartphone, a user (superuser) has root permissions to do anything with the applications and move any system file. In short, with root permissions, you have the power to control how things work on your phone. With rooting, you can run a firewall, install custom ROMs, or enable tethering if your carrier is blocking it.
The rooting process simply adds a standard Linux function that was removed by your OEM. This tiny file, su, is put in the system with permissions so that you can run it. There are different tools that automate the process of flashing a .zip file containing the su binary from the recovery mode screen.
Warning: Please note that an incomplete or some wrong rooting step can brick your phone. So, take up this task at your own risk.

Is rooting an Android phone illegal?

Rooting a device involves removing the restrictions placed by the cellular carrier or device OEMs. Many Android phone makers legally allow you to root your phone, e.g., Google Nexus. Other manufacturers, like Apple, don’t allow jailbreaking. Other manufacturers, including LG, HTC, and Motorola, officially allow unlocking the bootloader which allows one to root the phone without exploiting a vulnerability.
In some countries, the practice of jailbreaking and rooting is illegal. Manufacturers don’t like when a user roots the device as they lose control over the ecosystem and delete the bloatware installed by them. These companies often void the warranty of such devices.
The legality of this issue entirely depends on your location. In the USA, under the DCMA, it’s legal to root your smartphone. However, rooting a tablet is illegal. This exemption grant came around 2012. In 2016, the overall picture is still unclear. So, there are chances that you’ll lose your warranty after rooting your device.
On the other hand, in European countries, the situation is much better. FSFE, the Free Software Foundation Europe, has concluded that rooting a device doesn’t hamper your device’s warranty. The user can make warranty claims for up to 2 years after buying the device. However, if the OEM can prove that rooting or installing an unofficial software has damaged the hardware of the device, you might be out of luck.
In near future, I’ll be writing more articles on rooting, its importance, myths, and more. So, don’t forget to drop your feedback in the comments section below.

Best ways to market an Android app

 We need to first know how App ranking is decided. Google has, indeed, adopted a very sophisticated system in determining the ranking of an App for a keyword. The criteria taken into account are listed as follows:
(1) Number of Installs
(2) Retention Rate (how many days an App stays installed on a device?)
(3) Rating (out of 5.0) and number of ratings and reviews).
(4) Number of backlinks to your App's Google Play page.

The most important criteria is (1), it weights about 60-70% in determining ranking, therefore, your main task is to get as many installs as possible in a short period of time.

The next question is, how to get installs. There are many ways:
(1) Improve your App's quality. It could be done by making your game bug-free, hiring an expert artist to improve your game's graphic quality, etc. With good game quality, you get higher ratings and players are more willing to download your App when they visit your App's page.
(2) Cost-per-install campaigns. You can purchase a large amount of installs to boost your App's ranking on Google Play. It is actually essential as there is no better ways to acquire visibility to your App (imagine if you choose to spend tens of thousands of dollars on billboard, TV or newspaper adverts, how many downloads do you think those methods can bring to you?)
Out of all providers, I genuinely recommend app2top since it provides install at the rate of 0.1 USD per install and it can deliver up to 15000-20000 installs in a single day. It also provides rating and review services at the rate of 0.2 USD per rating and 0.25 per review. All installs have 3 days retention guarantee, so criteria (2) and (3) listed above are boosted as well. Most importantly, App2top provides real device installs, so it is safe for you. The business owner is also a nice person who readily replies to enquires. More importantly, most installs are from European/USA countries - so the valuer of downloads are higher.
As a personal experiment, I have obtained 40 Australian installs for a game with app2top and it successfully got charted in Australia for 8 days! You may try with your App too! (but of course, if you aim for UK/US, you need much more installs to have the same effect)
(3) App Store Optimization. It can be done by making a good looking icon for your App, including good looking screenshots, and a good description with good keywords included. Good keywords can be found on Sensor Tower - Mobile App Store Marketing Intelligence It is advised that you localize your game's name and keywords into different languages - even if you don't have a translator, Google Translate can help you, having localized keyboards can, according to a study, bring 30% more users to your App, so it is surely worth the effort (I guess localizing Apps will take less than 10% of your resources!).
(4) To increase the number of backlinks to your App's Google Play page, I suggest you to post your App onto as many forums as possible. Join a few facebook app developers group and share your link with other developers so earn a few more downloads.