13 Feb 2016

feedAndroid News, Rumours, and Updates

Retailers now selling Samsung’s Galaxy View for $449

The Galaxy View, which Samsung released only a few months ago, is seeing its price cut yet again by retailers. Samsung, Amazon, B&H Photo, and Best Buy all started selling the tablet in November for $599; however, sales don't seem to be very strong because the Galaxy View's price has now been lowered for a […]

Come comment on this article: Retailers now selling Samsung's Galaxy View for $449

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 8:15pm GMT

Here’s how to get Twitter’s Best Tweets on your timeline

In February, Twitter received a ton of heat when BuzzFeed uncovered that the company was going to introduce a new way in which tweets would be presented to users. The timeline would be restructured to have tweets from different times shown next to each other, a clear departure from the chronological order currently presented. Twitter […]

Come comment on this article: Here's how to get Twitter's Best Tweets on your timeline

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 7:30pm GMT

ZOPO Speed 8 to launch at MWC 2016

If you think the maturing Chinese smartphone market and emerging markets like India have the side effect of lots of manufacturers surfacing that you may not be familiar with, you are probably right. Although in the case of ZOPO, they have been around for a while, but as a small player in the market. They appear […]

Come comment on this article: ZOPO Speed 8 to launch at MWC 2016

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 6:34pm GMT

Lenovo renames Moto’s Twitter account

As part of their rebranding efforts related to Motorola, Lenovo updated the name on the company's Twitter account. The account is now @Moto_USA and is named "Moto US" to reflect the dropping of the Motorola brand. To kick off 2016, Lenovo announced that they would be dropping the Motorola name from their branding efforts. This […]

Come comment on this article: Lenovo renames Moto's Twitter account

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 5:55pm GMT

Unknown LG H840 leaks out with list of specifications, could it be a G5 variant?

The LG G5 may not be the only device LG has in store for MWC 2016. An unknown LG handset just leaked along with its specs and model number H840, sources say it could be a younger sibling G5. Samsung is usually the one releasing all the different flagship models, but a new leak suggests that LG […]

Come comment on this article: Unknown LG H840 leaks out with list of specifications, could it be a G5 variant?

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 1:52am GMT

[Deal] BlackBerry discounts both the Priv and Passport for Valentine’s Day

BlackBerry will be holding a special offering in honor of Valentine's Day. And the good news is, you'll have some extra time to decide if you're unsure whether the deal is for you. The latest deal from BlackBerry is active now and will run through February 24. Both the BlackBerry Priv and BlackBerry Passport will be […]

Come comment on this article: [Deal] BlackBerry discounts both the Priv and Passport for Valentine's Day

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 1:22am GMT

Google updates My Maps for Android with new UI

If you're a regular user of Google's custom mapping platform, My Maps, you may be glad to learn that the application has today received a fairly interesting update in the Play Store. The upgrade injects a new "look and feel" to the service, together with a new imagery feature, which enables you to view all […]

Come comment on this article: Google updates My Maps for Android with new UI

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 12:50am GMT

T-Mobile will roll out Marshmallow for the HTC One M9 on February 16 [Update: Verizon too!]

Earlier today, HTC's Vice President of Product Management, Mo Versi, took to his official Twitter profile to reveal that the Taiwanese company has at last received approval of the long-awaited Marshmallow update for the HTC One M9 from T-Mobile. The carrier will, begin pushing out the over-the-air upgrade to all carrier-branded variants of the handset starting […]

Come comment on this article: T-Mobile will roll out Marshmallow for the HTC One M9 on February 16 [Update: Verizon too!]

Visit TalkAndroid for Android news, Android guides, and much more!

13 Feb 2016 12:24am GMT

12 Feb 2016

feedAndroid News, Rumours, and Updates

JBL Legend receiver with Android Auto support now up for preorder

JBL's new in-dash smartphone receiver, the Legend CP100, is now available for preorder. The receiver sports a 6.75-inch touchscreen and is compatible with both Android Auto and Apple CarPlay. The receiver is compatible with your car's backup camera, as well as Bluetooth, and also allows you to make calls, send messages and navigate safely. It […]

Come comment on this article: JBL Legend receiver with Android Auto support now up for preorder

Visit TalkAndroid for Android news, Android guides, and much more!

12 Feb 2016 10:12pm GMT

Alcatel OneTouch Ride-Fi hotspot available through Sprint

The Ride-Fi portable LTE hotspot can now be picked up via the Sprint website, with the gadget serving as a top travel companion for those longer journeys. The 4G LTE hotspot works via a connection to a DC power connector and from there users can expect support for up to eight wireless devices simultaneously. Those interested in […]

Come comment on this article: Alcatel OneTouch Ride-Fi hotspot available through Sprint

Visit TalkAndroid for Android news, Android guides, and much more!

12 Feb 2016 9:49pm GMT

05 Feb 2016

feedAndroid Developers Blog

Android Studio 2.0 - Beta

Posted by Jamal Eason, Product Manager, Android

Android Studio 2.0 is latest release of the official Android IDE focused on build performance and emulator speed to improve the app development experience. With brand new features like Instant Run which enables you to quickly edit and view code changes, or the new & faster Android emulator, Android Studio 2.0 is the upgrade you do not want to miss. In preparation for the final release, you can download Android Studio 2.0 Beta in the Beta release channel. Overall, the Android Studio 2.0 release has a host of new features which include:

Check out the latest installment of Android Studio Tool Time video below to watch the highlights of the features.

New Features in Android Studio 2.0 Beta

Instant Run

We first previewed Instant Run in November; this latest beta release introduces a new capability called Cold Swap

Instant Run in Android Studio 2.0 allows you to quickly make changes to your app code while your app is running on an Android device or Android Emulator. Instead of waiting for your entire app to rebuild and redeploy after each code change, Android Studio 2.0 will try to incrementally build and push only the incremental code or resource change. Depending on the code changes you make, you can see the results of your change in under a second. By simply updating your app to use the latest Gradle plugin ( 'com.android.tools.build:gradle:2.0.0-beta2' ), you can take advantage of this time saving features with no other modifications to your code. If your project is setup correctly with Instant Run, you will see a lightning bolt next to your Run button on the toolbar:

Instant Run Button

Behind the scenes, Android Studio 2.0 instruments your code during the first compilation and deployment of your app to your device in order to determine where to swap out code and resources. The Instant Run features updates your app on a best-effort basis and automatically uses one of the following swap methods to update your app:

We made major changes to Instant Run since the first preview of Android Studio 2.0, and now the feature works with more code and resources cases. We will continue to add more code change cases to Instant Run in future releases of Android Studio. If you have any suggestions, please feel free to send us a feature request and learn more about Instant Run here.

App Indexing

Supporting app indexing is now even easier with Android Studio 2.0. App Indexing puts your app in front of users who use Google Search. It works by indexing the URL patterns you provide in your app manifest and using API calls from your app to make content within your app available to both existing and new users. Specifically, when you support URLs for your app content, your users can go directly to those links from Google Search results on their device.

Insert App Indexing API Code into your app

App Indexing Testing

App Indexing Test Results

Android Emulator

*Updated for Beta* The new and faster Android emulator also includes fixes and small enhancements for this beta release. Notably, we updated the rotation controls on the emulator toolbar and added multi-touch support to help test apps that use pinch & zoom gestures. To use the multi-touch feature, hold down the Alt key on your keyboard and right-click your mouse to center the point of reference or click & drag the left mouse button to zoom.

Pinch & Zoom Gesture with Multi-Touch

What's Next

Android Studio 2.0 is a big release, and now is good time to check out the beta release to incorporate the new features into your workflow. The beta release is near stable release quality, and should be relatively bug free. But as with any beta release, bugs may still exist, so, if you do find an issue, let us know so we can work to fix it. If you're already using Android Studio, you can check for updates on the Beta channel from the navigation menu (Help → Check for Update [Windows/Linux] , Android Studio → Check for Updates [OS X]). When you update to beta, you will get access to the new version of Android Studio and Android Emulator.

Connect with us, the Android Studio development team, on Google+.

05 Feb 2016 9:03pm GMT

04 Feb 2016

feedAndroid Developers Blog

Project Tango workshops help bring indoor location apps to life

Posted by Eitan Marder-Eppstein, Developer Engineering Lead, Project Tango

GPS helps us find our way outside whether it is turn by turn navigation to the nearest grocery or just getting us oriented in a new city. But once we get indoors, it is not quite as easy - GPS doesn't work, with accuracy dropping and navigation becoming all but impossible. This is one of the reasons why we started Project Tango, which has centimeter-scale accuracy of a device's location, allowing better navigation and experiences in indoor spaces.

Over the past few weeks, we've been collecting amazing ideas from around the world for great apps for Lenovo's Project Tango-powered phone. (Have an idea? If you can dream it, you can submit it!) As part of this program we're hosting workshops, focused on specific Tango features. And we just wrapped up a session that we hosted with Westfield Labs devoted to indoor location. Here are some of the highlights:

As you can see, everyone from retail brands to robot startups joined in on the fun-using Project Tango's motion tracking, depth perception, and area learning capabilities to build some amazing location-based apps. Some of our favorites included:

The next stop in our series is a utilities workshop, where we'll be going deep on getting things done with Project Tango-like taking 3D measurements, or mapping your home or building. In the meantime, keep submitting your ideas to the App Incubator (the deadline is February 15!), and we'll see you soon!

04 Feb 2016 5:21pm GMT

01 Feb 2016

feedAndroid Developers Blog

Marshmallow and User Data

Posted by Joanna Smith, Developer Advocate and Giles Hogben, Google Privacy Team

Marshmallow introduced several changes that were designed to help your app look after user data. The goal was to make it easier for developers to do the right thing. So as Android 6.0, Marshmallow, gains traction, we challenge you to do just that.

This post highlights the key considerations for user trust when it comes to runtime permissions and hardware identifiers, and points you to new best practices documentation to clarify what to aim for in your own app.

Permission Changes

With Marshmallow, permissions have moved from install-time to runtime. This is a mandatory change for SDK 23+, meaning it will affect all developers and all applications targeting Android 6.0. Your app will need to be updated anyway, so your challenge is to do so thoughtfully.

Runtime permissions mean that your app can now request access to sensitive information in the context that it will be used. This gives you a chance to explain the need for the permission, without scaring users with a long list of requests.

Permissions are also now organized into groups, so that users can make an informed decision without needing to understand technical jargon. By allowing your users to make a decision, they may decide not to grant a permission or to revoke a previously-granted permission. So, your app needs to be thoughtful when handling API calls requiring permissions that may have been denied, and about building in graceful failure-handling so that your users can still interact with the rest of your app.

Identifier Changes

The other aspect of user trust is doing the right thing with user data. With Marshmallow, we are turning off access to some kinds of data in order to direct developers down this path.

Most notably, Local WiFi and Bluetooth MAC addresses are no longer available. The getMacAddress() method of a WifiInfo object and the BluetoothAdapter.getDefaultAdapter().getAddress() method will both return 02:00:00:00:00:00 from now on.

However, Google Play Services now provides Instance IDs, which identify an application instance running on a device. Instance IDs provide a reliable alternative to non-resettable, device-scoped hardware IDs, as they will not persist across a factory reset and are scoped to an app instance. See the Google Developer's What is Instance ID? help article for more information.

What's Next

User trust depends largely on what users see and how they feel. Mishandling permissions and identifiers increases the risk of unwanted/unintended tracking, and can result in users feeling that your app doesn't actually care about the user. So to help you get it right, we've created new documentation that should enable developers to be certain that their app is doing the right thing for their users.

So happy developing! May your apps make users happy, and may your reviews reflect that. :)

01 Feb 2016 6:09pm GMT

27 Jan 2016

feedAndroid Developers Blog

Android Developer Story: Travel app Wego, increases monthly user retention by 300% with material design

Posted by Lily Sheringham, Google Play team

Headquartered in Singapore, Wego is a popular online travel marketplace for flights and hotels for users in South East Asia and the Middle East. They launched their Android app in early 2014, and today, more than 62 percent of Wego app users are on Android. Wego recently redesigned their app using material design principles to provide their users a more native Android experience for consistency and easier navigation.

Watch Ross Veitch, co-founder and CEO, and the Wego team talk about how they increased monthly user retention by 300 percent and reduced uninstall rates by up to 25 percent with material design.

Learn more about material design, how to use Android Studio, and how to find success on Google Play with the new guide 'Secrets to App Success on Google Play.'

27 Jan 2016 5:12pm GMT

How Fabulous and Yummly grew with App Invites

Posted by Laurence Moroney, Developer Advocate

Introduced in May 2015, App Invites is an out-of-the-box solution for conducting app referrals and encouraging sharing. So far, we've seen very positive results on how the feature improves app discovery. While 52 percent of users discover apps by word of mouth, we have seen 92 percent of users trust recommendations from family and friends with App Invites. In this post, we'll share some success stories from companies that have already used App Invites to grow their user base.

Fabulous is a research-based app incubated in Duke University's Center for Advanced Hindsight. The app helps users to embark on a journey to resetting poor habits, replacing them with healthy rituals, with the ultimate goal of improving health and well-being.

Users started taking advantage of App Invites within the app to share their experience with their friends and family. App Invites installs now account for 60 percent of all Fabulous installs via referrals. Sharing clicks also increased by 10 percent once App Invites were used. Fabulous also noticed increased user retention, with 2x the Life Time Value of the app for users that came in to it via App Invites. Fabulous simplified their user experience, combining SMS and email into a single interface, allowing users to focus on sharing.

Additionally, users that were acquired via App Invites versus other channels were found to be twice as likely to stay with the app.

CTO of Fabulous, Amine Laddhari, commented, "It took me only a few hours to implement App Invites versus several days of work when we built our own solution. It was straightforward!"

You can view the full case study from Fabulous here.

Yummly, a food discovery platform that views cooking a meal as a personalized, shareable experience wanted to expand its user base and generate awareness on the Android platform. It added App Invites so that users could recommend the app to their family and friends, giving functionality to share specific recipes, dinner ideas or shipping lists.

With App invites, they found that installation rates were about 60 percent higher compared to other sharing channels. Additionally, Yummly was able to take advantage of the seamless integration of Google Analytics. It's the only share channel that has this integration, allowing data such as the number of invites sent, accepted and resulting installs to be accurately tracked.

Melissa Guyre, Product Manager at Yummly, commented, "The App Invites Integration process was seamless. A bonus feature is the excellent tracking tie-in with Google Analytics."

You can view the full case study from Yummly here.

App Invites is available for Android or iOS, and you can learn how you can build it into your own apps at g.co/appinvites.

27 Jan 2016 12:09am GMT

25 Jan 2016

feedAndroid Developers Blog

New features to better understand player behavior with Player Analytics

Posted by Lily Sheringham, Developer Marketing at Google Play

Google Play games services includes Player Analytics, a free reporting tool available in the Google Play Developer Console, to help you understand how players are progressing, spending, and churning. Now, you can see what Player Analytics looks like with an exemplary implementation of Play games services: try out the new sample game in the Google Play Developer Console, which we produced with help from Auxbrain, developer of Zombie Highway 2. The sample game uses randomized and anonymized data from a real game and will also let you try the new features we're announcing today. Note: You need a Google Play Developer account in order to access the sample game.

Use predictive analytics to engage players before they might churn

To help you better understand your players' behavior, we've extended the Player Stats API in Player Analytics with predictive functionality. The churn prediction method will return data on the probability that the player will churn, i.e., stop playing the game, so you can create content in response to this to entice them to stay in your game. Additionally, the spend prediction method will return the probability that the player will spend, and you could, for example, provide discounted in-app purchases or show ads based on these insights.

Create charts in the new funnels report to quickly visualize sequences of events

The funnels report enables you to create a funnel chart from any sequence events, such as achievements, spend, and custom events. For example, you could log custom events for each step in a tutorial flow (e.g., tutorial step 1, step 2, step 3), and then use the funnel report to visualize the exit points in your tutorial.

Measure and compare the effect of changes and cumulative values by new users with cohort's report

The cohorts report allows you to take any event such as sessions, cumulative spend, and custom events, and compare the cumulative event values by new user cohorts - providing valuable insight into the impact of your decisions on your gaming model. For example, you can view users that started the day before you made a change and the day after. This allows you to measure and compare the effect of changes made, so if you doubled the price of all your items in your in-game store, you can see if the cumulative sessions started after the change was lower or higher than the users that started before the change.

Updated C++, iOS SDKs and Unity plug-in to support Player Stats API

We have updated the C++ and iOS SDKs, and the Unity plug-in, all of which now support the Player Stats API, which includes the basic player stats as well as spend and churn predictions. Be sure to check out the sample game and learn more about Play Games Services. You can also get top tips from game developer Auxbrain to help you find success with Google Play game services.

25 Jan 2016 5:24pm GMT

23 Jan 2016

feedAndroid Developers Blog

Play Games Permissions are changing in 2016

Posted by Wolff Dobson, Developer Advocate

We're taking steps to reduce sign-in friction and unnecessary permission requests for players by moving the Games APIs to a new model. The new interaction is:


In order to respect user's privacy and avoid revealing their real name, we also have to change the way player IDs work.

Potential issues

Most games should see no interruption or change in service. There are a handful of cases, however, where some change is required.

Below are some issues, along with potential solutions.

These are:

  1. Asking for the Google+ scope unnecessarily
    • Issue: Your users will get unnecessary, potentially disturbing pop-up consent windows
    • Solution: Don't request any additional scopes unless you absolutely need them
  2. Using the Play Games player ID for other Google APIs that are not games
    • Issue: You will not get valid data back from these other endpoints.
    • Solution: Don't use player ID for other Google APIs.
  3. Using mobile/client access tokens on the server
    • Issue: Your access token may not contain the information you're looking for
      • ...and this is not recommended in the first place.
    • Solution: Use the new GetServerAuthCode API instead.

Let's cover each of these issues in detail.

Issue: Asking for unnecessary scopes

Early versions of our samples and documentation created a GoogleApiClient as follows:

 // Don't do it this way!  
 GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this)  
           .addScope(Plus.SCOPE_PLUS_LOGIN) // The bad part  
 // Don't do it this way!  

In this case, the developer is specifically requesting the plus.login scope. If you ask for plus.login, your users will get a consent dialog.

Solution: Ask only for the scopes you need

Remove any unneeded scopes from your GoogleApiClient construction along with any APIs you no longer use.

 // This way you won't get a consent screen  
 GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this)  
 // This way you won't get a consent screen  

For Google+ users

If your app uses specific Google+ features, such as requiring access to the player's real-world Google+ social graph, be aware that new users will still be required to have a G+ profile to use your game. (Existing users who have already signed in won't be asked to re-consent).

To require Google+ accounts to use your game, change your Games.API declaration to the following:

 .addApi(Games.API, new GamesOptions.Builder()  

This will ensure that your game continues to ask for the necessary permissions/scopes to continue using the player's real-world social graph and real name profile.

Issue: Using the Player ID as another ID

If you call the Games.getCurrentPlayerId() API, the value returned here is the identifier that Games uses for this player.

Traditionally, this value could be passed into other APIs such as Plus.PeopleApi.load. In the new model, this is no longer the case. Player IDs are ONLY valid for use with Games APIs.

Solution - Don't mix IDs

The Games APIs (those accessed from com.google.android.gms.games) all use the Player ID, and as long as you use only those, they are guaranteed to work with the new IDs.

Issue: Using mobile/client access tokens on the server

A common pattern we've seen is:

This is not recommended in the first place, and is even more not-recommended after the shift in scopes.

Reasons not to do this:

Solution: Use the new GetServerAuthCode flow

Fortunately, the solution is known, and is basically the same as our server-side auth recommendations for web.

  1. Upgrade to the latest version of Google Play Services SDK - at least 8.4.87.

  2. Create a server client ID if you don't already have one

    1. Go to the Google Developer Console, and select your project

    2. From the left nav, select API Manager, then select Credentials

    3. Select "New Credentials" and choose "OAuth Client ID"

    4. Select "Web Application" and name it something useful for your application

    5. The client id for this web application is now your server client id.

  3. In your game, connect your GoogleApiClient as normal.

  4. Once connected, call the following API:

    1. Games.getGamesServerAuthCode(googleApiClient, "your_server_client_id")

    2. If you were using GoogleAuthUtil before, you were probably calling this on a background thread - in which case the code looks like this:

 // Good way  
      GetServerAuthCodeResult result =   
           Games.getGamesServerAuthCode(gac, clientId).await();  
      if (result.isSuccess()) {  
           String authCode = result.getCode();  
            // Send code to server.  
 // Good way  

  1. Send the auth code to your server, exactly the same as before.

  2. On your server, make an RPC to https://www.googleapis.com/oauth2/v4/token to exchange the auth code for an access token, probably using a Google Apis Client Library.

    1. You'll have to provide the server client ID, server client secret (listed in the Developer Console when you created the server client ID), and the auth code.

    2. See more details here: https://developers.google.com/identity/protocols/OAuth2WebServer?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog#handlingresponse

    3. No, really: You should use a Google Apis Client Library to make this process easier.

  3. Once you have the access token, you can now call www.googleapis.com/games/v1/applications/<app_id>/verify/ using that access token.

    1. Pass the auth token in a header as follows:

      1. "Authorization: OAuth <access_token>"

    2. The response value will contain the player ID for the user. This is the correct player ID to use for this user.

    3. This access token can be used to make additional server-to-server calls as needed.

Note: This API will only return a 200 if the access token was actually issued to your web app.

In summary

Let's be very clear: If you do nothing, unless you are depending explicitly on Google+ features, you will see no change in functionality, and a smoother sign-in experience.

If you are:

Thanks, and keep making awesome games!

23 Jan 2016 7:27pm GMT

20 Jan 2016

feedAndroid Developers Blog

Android Developer Story: Music app developer DJIT builds higher quality experiences and successful businesses on Android

Posted by Lily Sheringham, Google Play team

Paris-based DJiT is the creator of edjing, one of the most downloaded DJ apps in the world, it now has more than 60 million downloads and a presence in 182 countries. Following their launch on Android, the platform became the largest contributor of business growth, with 50 percent of total revenue and more than 70 percent of new downloads coming from their Android users.

Hear from Jean-Baptiste Hironde, CEO & Co-founder, Séverine Payet, Marketing Manager, and Damien Delépine, Android Software Engineer, to learn how DJit improved latency on new Android Marshmallow, as well as leveraged other Android and Google Play features to create higher quality apps.

Find out more about building great audio apps and how to find success on Google Play.

20 Jan 2016 6:19pm GMT

16 Jan 2016

feedAndroid Developers Blog

Create promo codes for your apps and in-app products in the Google Play Developer Console

Posted by Yoshi Tamura, Product Manager, Google Play

Over the past six months, a number of new tools in the Google Play Developer Console have been added to help you grow your app or game business on Google Play. Our improved beta testing features help you gather more feedback and fix issues. Store Listing Experiments let you run A/B tests on your app's Play Store listing. Universal App Campaigns and the User Acquisition performance report help you grow your audience and better understand your marketing.

Starting today, you can now generate and distribute promo codes to current and new users on Google Play to drive engagement. Under the Promotions tab in the Developer Console, you can set up promo codes for your apps, games, and in-app products to distribute in your own marketing campaigns (up to 500 codes per app, per quarter). Consider using promo codes to reward loyal users and attract new customers.

How to use promo codes

  1. Choose your app in the Developer Console.
  2. Under the Promotions tab choose Add new promotion.
  3. Review and accept the additional terms of service if you haven't run a promotion before.
  4. Choose from the options available, then generate and download your promo codes.
  5. Distribute your promo codes via your marketing channels such as social networks, in email, on the web, to your app's beta testers, or in your app or game itself.
  6. Users can redeem your promo codes in a number of ways, including:
  1. From Google Play, using the Redeem menu option.
  2. From your app. They'll be directed to the Play checkout flow before being redirected back to your app.
  3. By following a link that embeds the promo code (see tips below).

For more details about running a promotion for your app or game, read this article on the Google Play Developer Help Center.

Tips for making the most of promo codes

Some things to keep in mind when running a successful promotion:

We hope you find interesting ways to use promo codes to find new users and engage existing fans. To learn more about the many tools and best practices you can use to grow your business on Google Play, download our new developer playbook, "The Secrets to App Success on Google Play".

16 Jan 2016 1:46am GMT

14 Jan 2016

feedAndroid Developers Blog

Using Google Sign-In with your server

Posted by Laurence Moroney, Developer Advocate

This is the third part in a blog series on using Google Sign-In on Android, and how you can take advantage of world-class security in your Android apps. In part 1, we spoke about the user experience improvements that are available to you. In part 2, we then took a deeper dive into the client-side changes to the Google Sign-In APIs that make coding a lot simpler.

In this post, we will demonstrate how you can use Google Sign-In with your backend. By doing so, users signing in on their device can be securely authenticated to access their data on your backend servers.

Using Credentials on your server

First, let's take a look at what happens if a user signs in on your app, but they also need to authenticate for access to your back-end server. Consider this scenario: You've built an app that delivers food to users at their location. They sign into your app, and your app gets their identity. You store their address and order preferences in a database on your server.

Unless your server endpoints are protected with some authentication mechanism, attackers could read and write to your user database by simply guessing the email addresses of your users.

Figure 1. A third party could spoof your server with a fake email

This isn't just a bad user experience, it's a risk that customer data can be stolen and misused. You can prevent this by getting a token from Google when the user signs in to the app, and then passing this token to your server. Your server would then validate that this token really was issued by Google, to the desired user, and intended for your app (based on your audience setting, see below). At this point your server can know that it really is your user making the call, and not a nefarious attacker. It can then respond with the required details.

Figure 2. Third Party Fake Tokens will be rejected

Let's take a look at the steps for doing this:

Step 1: Your Android app gets an ID token (*) after signing in with Google. There's a great sample that demonstrates this here. To do this, the requestIdToken method is called when creating the GoogleSignInOptions object.

 GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)  

This requires you to get a client ID for your server. Details on how to obtain this are available here (see Step 4).

Once your Android app has the token, it can POST it over HTTPS to your server, which will then try to validate it.

(*) An ID token is JSON Web Token, as defined by RFC7519. These are an open, industry standard method for representing claims securely between two parties.

Step 2: Your Server receives the token from your Android client. It should then validate the token with methods that are provided in the Google API Client libraries, in particular, verifying that it was issued by Google and that the intended audience is your server.

Your server can use the GoogleIdTokenVerifier class to verify the token and then extract the required identity data. The 'sub' field (available from the getSubject() method) provides a stable string identifier that should be used to identify your users even if their email address changes, and key them in your database. Other ID token fields are available, including the name, email address and photo URL. Here's an example of a servlet that was tested on Google App Engine that can verify tokens using a provided library. These libraries allow you to verify the token locally without a network call.

 GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory)  
      // Here is where the audience is set -- checking that it really is your server  
      // based on your Server's Client ID  
      // Here is where we verify that Google issued the token  
 GoogleIdToken idToken = verifier.verify(idTokenString);  
 if (idToken != null) {  
      Payload payload = idToken.getPayload();  
      String userId = payload.getSubject();   
      // You can also access the following properties of the payload in order  
      // for other attributes of the user. Note that these fields are only  
      // available if the user has granted the 'profile' and 'email' OAuth  
      // scopes when requested. Even when requested, some fields may be null.  
      // String email = payload.getEmail();  
      // boolean emailVerified = Boolean.valueOf(payload.getEmailVerified());  
      // String name = (String) payload.get("name");  
      // String pictureUrl = (String) payload.get("picture");  
      // String locale = (String) payload.get("locale");  
      // String familyName = (String) payload.get("family_name");  
      // String givenName = (String) payload.get("given_name");  

Note that if you have an existing app using GoogleAuthUtil to get a token to pass to your backend, you should switch to the latest ID token validation libraries and mechanisms described above. We'll describe recommendations for server-side best practices in a future post.

This post demonstrates how to use authentication technologies to ensure your user is who they claim they are. In the next post, we'll cover using the Google Sign-In API for authorization, so that users can, for example, access Google services such as Google Drive from within your app and backend service.

You can learn more about authentication technologies from Google at the Google Identity Platform developers site.

14 Jan 2016 6:00pm GMT

13 Jan 2016

feedAndroid Developers Blog

Spatial audio comes to the Cardboard SDK

Originally posted on Google Developers Blog

Posted by Nathan Martz, Product Manager, Google Cardboard

Human beings experience sound in all directions-like when a fire truck zooms by, or when an airplane is overhead. Starting today, the Cardboard SDKs for Unity and Android support spatial audio, so you can create equally immersive audio experiences in your virtual reality (VR) apps. All your users need is their smartphone, a regular pair of headphones, and a Google Cardboard viewer.

Sound the way you hear it

Many apps create simple versions of spatial audio-by playing sounds from the left and right in separate speakers. But with today's SDK updates, your app can produce sound the same way humans actually hear it. For example:

Optimized for today's smartphones

We built today's updates with performance in mind, so adding spatial audio to your app has minimal impact on the primary CPU (where your app does most of its work). We achieve these results in a couple of ways:

Simple, native integrations

It's really easy to get started with the SDK's new audio features. Unity developers will find a comprehensive set of components for creating soundscapes on Android, iOS, Windows and OS X. And native Android developers will now have a simple Java API for simulating virtual sounds and environments.

Experience spatial audio in our sample app for developers

Check out our Android sample app (for developer reference only), browse the documentation on the Cardboard developers site, and start experimenting with spatial audio today. We're excited to see (and hear) the new experiences you'll create!

13 Jan 2016 5:23pm GMT

08 Jan 2016

feedAndroid Developers Blog

Get your app featured on the first smartphone with Project Tango from Lenovo

Originally posted on Google Developers Blog

Posted by Johnny Lee, Technical Project Lead, Project Tango

Today, at CES, Lenovo announced the development of the first consumer-ready smartphone with Project Tango. By adding a few extra sensors and some computer vision software, Project Tango transforms your smartphone into a magic lens that lets you place digital information on your physical world.

*Renderings only. Not the official Lenovo device.

To support the continued growth of the ecosystem, we're also inviting developers from around the world to submit their ideas for gaming and utility apps created using Project Tango. We'll pick the best ideas and provide funding and engineering support to help bring them to life, as part of the app incubator. Even better, the finished apps will be featured on Lenovo's upcoming device. The submission period closes on February 15, 2016.

All you need to do is tell us about your idea and explain how Project Tango technologies will enable new experiences. Additionally, we'll ask you to include the following materials:

For some inspiration, Lowe's Home Improvement teamed with developer Elementals Web to demonstrate a use case they are each working on for the launch. In the app, you can point your Project Tango-enabled smartphone at your kitchen to see where a new refrigerator or dishwasher might fit virtually.

Elsewhere, developer Schell Games let's you play virtual Jenga on any surface with friends. But this time, there is no cleanup involved when the blocks topple over.

There are also some amazing featured apps for Project Tango on Google Play. You can pick up your own Project Tango Tablet Development Kit here to brainstorm new fun and immersive experiences that use the space around you. Apply now!

08 Jan 2016 2:32am GMT

30 Dec 2015

feedAndroid Developers Blog

Get ready for Javascript “Promises” with Google and Udacity

Sarah Clark, Program Manager, Google Developer Training

Front-end web developers face challenges when using common "asynchronous" requests. These requests, such as fetching a URL or reading a file, often lead to complicated code, especially when performing multiple actions in a row. How can we make this easier for developers?

Javascript Promises are a new tool that simplifies asynchronous code, converting a tangle of callbacks and event handlers into simple, straightforward code such as: fetch(url).then(decodeJSON).then(addToPage)...

Promises are used by many new web standards, including Service Worker, the Fetch API, Quota Management, Font Load Events,Web MIDI, and Streams.

We've just opened up a online course on Promises, built in collaboration with Udacity. This brief course, which you can finish in about a day, walks you through building an "Exoplanet Explorer" app that reads and displays live data using Promises. You'll also learn to use the Fetch API and finally kiss XMLHttpRequest goodbye!

This short course is a prerequisite for most of the Senior Web Developer Nanodegree. Whether you are in the paid Nanodegree program or taking the course for free, won't you come learn to make your code simpler and more reliable today?

30 Dec 2015 8:20pm GMT

18 Dec 2015

feedAndroid Developers Blog

Google Play Services 8.4 SDK is available

Posted by Laurence Moroney, Developer Advocate

We're delighted to announce the availability of Google Play services 8.4. There's a lot of new information to share with you about what's available to you in this release.

Custom Email App Invites

App Invites is a technology that enables your users to share apps with people they know. In Google Play services 8.4 we've updated this to make it easier for them to share via email. Before this you could create a custom email that contained user defined text and an image, but now we're allowing you to add content from the app directly into the message. It allows you to fully define the email body using HTML, and set the email subject line. So, for example, if you have a favorite cooking app that you want to share with your friends, your invite to use the app can include a favorite recipe from the app. They get the immediate benefit of being able to access the desired content, giving them a more informed choice about whether or not they decide to install the app to get richer and more content. Check out the App Invites sample on GitHub here.

Predicting User spend and churn in games

The Play Games Analytics developer experience is designed to enable game developers to better understand, manage, and optimize game experiences throughout the player lifecycle. With this in mind, we've extended the Player Stats API to help you better understand your players behavior, and based on this, entice them to stay in your game.

The churn prediction method will return data on the probability that the player will churn, i.e., stop playing the game. You can create content in response to this to entice them to stay in your game.

Additionally, the spend prediction method will return the probability that the player will spend something in the game. It's up to you how to handle this data, but -- for example -- if there's a low probability that the player will spend something, you could provide discounted in-app purchases or show ads.

Fused Location Provider Updates

The Fused Location Provider (FLP) in Google Play services provides location to your apps using a number of sensors, including GPS, WiFi and Cell Towers.

When desiring to save battery power, and using coarse updates, the FLP doesn't use Global Positioning Services (GPS), and instead uses WiFi and Cell tower signals. In Google Play services 8.4, we have greatly improved how the FLP detects location from cell towers. Prior to this, we would get the location information relative to only the primary cell tower. Now, the FLP takes the primary tower and other towers nearby to provide a more accurate location. We've also improved location detection from WiFi access points, particularly in areas where GPS is not available -- such as indoors.

Maps API Improvements

Have you ever wished you could easily handle a tap on a suburb without having to add another layer on the map to intercept the taps? We've added an onClickListener for polygons, so you can easily add transparent polygons and intercept the taps directly. We've also added on click listeners to polylines and ground overlays.

Here's how you can use a listener to detect a click on a polygon:

 map.setOnPolygonClickListener(new GoogleMap.OnPolygonClickListener() {  
       public void onPolygonClick(Polygon polygon) {  

Info windows now also offer an OnInfoWindowCloseListener and an OnInfoWindowLongClickListener. The on close listener is particularly useful if you wish to zoom back out on the map after the user has looked at the detail associated with a particular marker.

 mMap.setOnInfoWindowCloseListener(new GoogleMap.OnInfoWindowCloseListener() {...});  

 mMap.setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() {...});  

For more details, and an example that uses these, see the ApiDemos sample on GitHub and check out the historical changes to this sample, so you can see how the new APIs work. Also see the Release Notes.

Support for Aztec bar codes

In Google Play services 7.8, we launched Vision APIs that supported face and barcode detection. One bar code format we didn't support was Aztec bar codes, so with Google Play services 8.4 we've now added support for these.

Applications using BarcodeDetector in its default configuration (no barcode format restrictions) will automatically start decoding AZTEC codes.

Background Beacon Scanning

With Google Play services 8.4, the Nearby Messages API now supports background scanning for Eddystone, the open beacon format from Google. With this update, your app can be woken up when a BLE beacon is sighted. Back in July, Google Play Services 7.8 introduced the Nearby Messages API with a simple publish-subscribe interface. In the case of beacons, developers publish content by adding attachments to beacon records using Proximity Beacon API. These attachments are served back to your app when Nearby sights a beacon of interest.

New methods that we've added include a subscribe method for background beacon subscriptions where BLE scans are triggered at screen-on events; an associated unsubscribe event; and the ability to handle intents that you get when the Nearby API calls back during a background subscription.

Fitness Platform HistoryApi Improvements

We now support consistent step counts across the Google Fit app, other fitness apps and Android Wear watch faces with the HistoryApi.readDailyTotal() method. Please see the following documentation for more detail: https://developers.google.com/fit/android/history#read_daily_total_data?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog

We also have a new HistoryApi.updateData() method. This method allows you to update data in one API call without having to delete and insert with two calls.

Place Picker Autocomplete Widget

Today we are announcing the mobile autocomplete widget, the latest addition to our existing set of programmatic autocomplete features on Android and iOS, as well as the addition of Autocomplete to our place picker widget. Autocomplete functionality assists users by automatically completing the name and address of a place as they type. Widgets make it even easier for developers to add autocomplete functionality to their application with just a small amount of code. Learn more about this at this blog post.

18 Dec 2015 6:05pm GMT

17 Dec 2015

feedAndroid Developers Blog

The Learning Continues! New lessons for Advanced Android course

Posted by Joanna Smith, Developer Advocate

Magic moments happen when your app does something very useful with minimal effort from your users -- like figuring out their location for them automatically. The new Places lesson in the Advanced Android App Development course teaches you how to add a Place Picker to your app so that users can pick a nearby location without having to type anything.

The Advanced Android App Development course, built by Udacity in conjunction with Google, is a follow-up course to Developing Android apps. The advanced course is for Android Developers who are ready to learn how to polish, productionize and publish their app, and even distribute it through Google Play.

Updates to the course also include an explanation of the new GCM Receiver, as well as an entirely new lesson on publishing your app, which explains how to build and sign an APK so you you can distribute your app on Google Play.

After all, why build an app if you can't get it to your users?
Get started now, because it's going to be awesome!

17 Dec 2015 9:55pm GMT

16 Dec 2015

feedAndroid Developers Blog

Invitation: Your Ultimate 31-Course Holiday Banquet

Posted by Shanea King-Roberson, Program Manager

The Holidays. Food for the body. Food for the mind. Google and Udacity offer you 31 courses that will make your mouth water and your mind dance. Savor one or several of our 31 self-paced online training courses to indulge your curiosity, expand your knowledge, and hone new skills. Choose from Android, Web, Entrepreneurship, or Cloud and Backend tracks. Are you ready?


More and more people around the world are embracing mobile at an increasing pace, whether on their phones, in their cars, at home, and around their wrists. Learn to build apps for them!


Refine your web development skills for mobile. Create fast, fluid user experiences. Deploy for all desktop and mobile devices. Streamline checkout and payment. Learn how to build beautiful, performant, responsive applications for the world's largest platform.

Cloud and Backend

Does your app need to support more users? (Congratulations!) Do you want to move data handling for an existing app from the device to the cloud? Learn how to take advantage of public cloud infrastructure to support millions of users and terabytes of data.


Start the year with a new start up. That says it all. Take these courses to learn how to do it successfully.

And that's it. 31 courses that will catapult your skills and make 2016 your best year yet! Happy Holidays!

16 Dec 2015 11:13pm GMT

10 Nov 2011

feedAndroid Forums

Latest action game INC from OrangePixel now available!

From the developer of Meganoid and Stardash comes a new action arcade game: INC! http://www.youtube.com/watch?v=9j5OEG-3RyM Get it from the...

10 Nov 2011 9:31am GMT

Free online video chat

More than 1000 broadcast cameras for you online - the most incendiary models in Russia. 1000 girls, 1000, the temptations, 1000, full of desire - all...

10 Nov 2011 7:48am GMT

Layout problem

Hi Friends I decided to work with a tab layout application. Program consist of 3 tabs and a button. I like to place the button below the tab. ...

10 Nov 2011 5:20am GMT

[ANDROID]5 New Live Wallpapers for ANDROID !

*1-) Spectrum ICS * Image: http://i.imgur.com/IjE5B.jpg *2-) Alien Shapes* Image: http://i.imgur.com/7hQHA.jpg

10 Nov 2011 12:50am GMT

09 Nov 2011

feedAndroid Forums

New to Android, thinking of getting Asus Transformer

Hey all, New to this site and Android. I'm a 50 year old fireman who has resisted the newest tech gadgets but am wanting a tablet for use at home....

09 Nov 2011 10:33pm GMT

Island Fortress - "reverse Angry Birds" (FREE GAME)

Island Fortress is a free physics based puzzle/construction game where player has to defend the treasure from the pirate's cannonballs....

09 Nov 2011 8:42pm GMT

Unlock Code Question (MyTouch 3G)

I have a question about using an unlock code with an HTC T-Mobile MyTouch 3G. So I got the phone from a guy on Craigslist, and I have AT&T. In order...

09 Nov 2011 8:28pm GMT

[Game] Mini-Bubbles

Free Mini-Bubbles Android Market Link: https://market.android.com/details?id=br.com.dotfive.minibubbles Pop the most bubbles you can within...

09 Nov 2011 6:39pm GMT

Top 6 Android Tablet For 2011

Well now a days we are seeing new tablets coming every day and we see new upcoming tablets leaks too! It's difficult to choose best one which works...

09 Nov 2011 4:15pm GMT

unlock code

Hello, I need unlock code for telephone my touch 3g tmobile. thanks

09 Nov 2011 2:56pm GMT