Sunday, September 11, 2016
How Google Cloud Messaging handles Doze in Android 6 0 Marshmallow
How Google Cloud Messaging handles Doze in Android 6 0 Marshmallow
Posted by, Laurence Moroney, Developer Advocate

Android 6.0 Marshmallow introduces a new power saving feature called Doze. A device enters Doze when the user leaves it unplugged and stationary for a period of time and with the screen off. When this happens, the system defers application activity to save power. It will periodically and briefly resume normal operations, called an idle maintenance window, in order to perform app syncing and other pending operations.
If your app uses Google Cloud Messaging (GCM), you will need to take into account the following behaviors for users whose devices are in Doze.
GCM has two priority types for messages, called high priority and normal priority. When using high priority, GCM attempts to deliver messages immediately, waking a device in Doze, as needed. With Android Marshmallow, nothing changes here.
However, when using normal priority (the default priority), there are a number of different behaviors when the device is in Doze, including:
- The most important change is that messages will be batched for devices in Doze. When the device enters its idle maintenance window, the batch of messages will be received.
- We discard messages whose time_to_live expires while the device is in Doze (including TTL=0).
Despite this, it is recommended that, unless absolutely necessary, you keep your notifications as normal priority ones, as this will minimize battery impact. They will still sync during doze mode as described above, and of course once the device exits Doze.
High priority messages should only be used by applications that need to generate an immediate notification to the end user such as a chat app notification or an incoming phone call.
To learn more about Google Cloud Messaging message priorities, visit the Google Developers site.
Available link for download
Wednesday, September 7, 2016
Allo and Duo Googles New Messaging Apps
Allo and Duo Googles New Messaging Apps
Hangouts was supposed to be Googles unified messaging solution, but things didnt go as planned: Hangouts was buggy, lacked features and many people hated it. After releasing a separate app for SMS (Messenger), Google will soon launch 2 other apps: Allo for group chat and Duo for video calling.
Both Allo and Duo use your phone number, much like WhatsApp, so you can chat or talk with anyone from your phonebook. Allo includes a special version of the Smart Reply feature from Google Inbox and it suggests replies for both text messages and photos. Smart Reply learns over time and adapts to your style, suggesting replies you are likely to send.

Theres also a Google Assistant you can add to a conversation to answer quick questions, show search results and even perform actions like reserving a table at a restaurant. "The Google assistant in Allo understands your world, so you can ask for things like your agenda for the day, details of your flight and hotel, or photos from your last trip. And since it understands natural language patterns, you can just chat like yourself and itll understand what youre saying," informs Google.
Allo lets you share photos, add text to photos, add emojis and stickers. Theres also a Whisper Shout feature that lets you resize the text before sending it.

Allo has an incognito mode for private conversations. The incognito mode features end-to-end encryption and discreet notifications. Much like in Chrome, youll need to manually start an incognito conversation and some features arent available in incognito mode.
Duo is a simplified one-to-one video calling app that uses your phone number, works well on slow Internet connections (it uses WebRTC) and has a Knock Knock feature that shows a live preview of the caller before you answer. Hopefully, users will be able to block those who abuse this feature.

"Duo calls are in crisp HD video (up to 720p) and audio. Weve optimized Duo to work well even on spotty networks, so if bandwidth is limited it gracefully adjusts quality so youre still able to connect. We also seamlessly transition calls between cellular and Wi-Fi, so you dont need to worry about what network youre on. Finally, we built Duo with privacy and security in mind and all calls on Duo are end-to-end encrypted," explains Google.
Allo and Duo will launch this summer and will be available for Android and iOS. For now, Hangouts will continue to exist, since Allo and Duo lack many of the features from Hangouts.
Google doesnt have a good track record when it comes to messaging services, so its hard to tell whether the new apps will be successful. It looks like Allo and Duo will be simple, fast and more focused.
{ via Google Blog }
Available link for download