Saturday, May 24, 2014

Inside Out or Outside In?



Even though I had earlier designed solutions for mobile, it’s while working for CloudMagic I got to learn about the subtle nuances of how things work in iOS and Android. It was indeed a challenge to design the app’s features keeping the OS restrictions and possibilities in mind but was equally exciting to just know about them and the thinking behind.

Apple is all about hardware and Google about software

If you observe closely this is evident in lot of the thinking behind how similar looking features are implemented in both the operating systems. The most interesting of the lot is push notifications. They are so similar on the surface but absolutely different under the hood. Let me try to explain in the context of an email application.

iOS

Apple’s own apps on iOS have superpowers but 3rd party apps have a lot of restrictions. For starters 3rd party apps like CloudMagic are not allowed to run in the background forever. The native email app can. This is to make sure that 3rd party apps don't abuse the OS resources to make it slower and drain the battery. So for an app like CloudMagic the only way to receive and update new emails is to wait till the user opens the app and download the emails from the server. Here is where push notifications come into the picture. It notifies the users about the new mail outside the app and swiping on it would open the app to start downloading the new email.

Push notifications are only possible for email apps with a server component, like CloudMagic. It checks for new emails in the server and intimates the Apple Push Notification Service to send a push notification to the phone. This is the reason why Sparrow doesn't support push notifications and hence will download new email only when its open.

1. Push notifications show up as a list on the lock screen. I can either swipe on a specific notification to go to the app directly or just unlock the phone. After that the list disappears. I also have the option to set notifications from some apps appear as an alert too.

2. The missed notifications continue to live as a list grouped under app names in the notification center which is absolutely out of sight. The app has the ability to remove the notifications from the list once opened or they will continue to remain there forever.

3. I can customize the notifications to an extent in the Settings app which is detached from the original app. But things like changing the alert sound is not in there. For this reason, almost all 3rd party apps end up giving notification settings on their own which adds to the confusion.

4. To circumvent the ‘out of sight’ problem, the notifications can also add a number badge to the app icons. This again behaves different from app to app; again configurable from the app’s settings as well as from ‘Settings app’.

Android

Android apps can have an always on agent called a Service, stay in the background to interact with the OS when the app is not active. This agent can either keep checking emails on timed intervals or like in CloudMagic can listen to push notifications sent from our servers.

1. When a new email is received, our server passes it to Google Cloud Messaging which in turn pushes a notification to the phone.
The agent receives the new email information from the notification and pokes the CloudMagic app to wake up from its slumber.
The app wakes up with the new email information in the background and start downloading the rest of the content from the respective email servers and keep it ready to be read.

2. Once the email is downloaded, the app shows a message in the Notification Center. This is biggest difference between iOS and Android. In Android the notification center is completely controlled by the app and every notification is a micro widget in itself. It’s up to the app to decide what, when and how the notifications should be shown. This is how CloudMagic shows a single email notification that can directly take you to the new email and update it with a grouped notification when more emails are received. The format of the notification, it behavior, sounds and the action buttons, basically the entire notification experience is controlled by the app and not by the OS. Of course the framework provides templates for the format for consistency but its up to the app to follow it or break out to give something better, or even worse. Hence the settings to control notifications remains in the app itself.

3. When the notification area receives a message, it shows a visible animation and then continue to show as small icons on the status bar till they are removed. So the notifications are kind of out of sight (non intrusive) but not out of mind.
Once the user has accessed or dismissed a notification on one device the same notifications are removed from other devices owned by me.

Android notifications are well thought through than iOS

Android notifications were designed with the objective of letting an app effectively notify the user about an update. If I remember right, when iOS started supporting 3rd party apps, there were no push notifications. It would have been an afterthought that made them add push notifications later in order to poke the user to open the app and load new content. Later it went through a lot of iterations to become what it is today. It’s still messy and largely unusable.

Starting with the right problem is key for designing better solutions.
Post a Comment