tag:blogger.com,1999:blog-30300320053447447272024-03-19T23:04:16.543-07:00ALL ABOUTS OPERATING SYSTEMAnonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.comBlogger338125tag:blogger.com,1999:blog-3030032005344744727.post-6040038005853725592016-02-05T13:03:00.000-08:002016-02-07T05:13:22.748-08:00Android Studio 2.0 - Beta <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkv1Ce4aD95LZHLbs7zOMqc4e8O6rGVVuBUdaF7_VMEMdb9FXehgGnQmQlht8ylnT4aXAs20eyRbxigJcCvKvVc7_SoPXwbVWAWZs4BLQx5Suwm-eOjEbgtbsIixNvlvPGqgiuTqno_02D/s1600/image04.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkv1Ce4aD95LZHLbs7zOMqc4e8O6rGVVuBUdaF7_VMEMdb9FXehgGnQmQlht8ylnT4aXAs20eyRbxigJcCvKvVc7_SoPXwbVWAWZs4BLQx5Suwm-eOjEbgtbsIixNvlvPGqgiuTqno_02D/s200/image04.png" /></a></div><i><p>Posted by <a href="https://www.google.com/+JamalEason">Jamal Eason</a>, Product Manager, Android<p></i><br /><br /><p>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 <a href="http://tools.android.com/download/studio/beta">Beta release channel</a>. Overall, the Android Studio 2.0 release has a host of new features which include:</p><br /><br /><ul><br /> <li><b>*<font color="#0000FF">Updated for Beta</font>* Instant Run</b> - Enables a faster code edit & app deployment cycle.</li><br /> <li><b>*<font color="#0000FF">Updated for Beta</font>* Android Emulator </b> - <a href="http://android-developers.blogspot.com/2015/12/android-studio-20-preview-android.html">Brand new emulator</a> that is faster than most real devices, and includes a brand new user interface.</li><br /> <li><b>*<font color="#0000FF">Updated for Beta</font>* Google App Indexing Integration & Testing </b> - Adding <a href="http://g.co/AppIndexing/AndroidStudio">App Indexing</a> into your app helps you re-engage your users. In the first preview of Android Studio 2.0 you could add indexing code stubs into your code. With the beta release you can now test and validate your URL links in your app all within the IDE.</li><br /> <li><b>Fast ADB</b> - Installing and pushing files is now up to 5x faster using Android Studio 2.0 with an updated Android Debug Bridge (ADB) offered in platform-tools 23.1.0.</li><br /> <li><b>GPU Profiler Preview</b> - For graphics intensive applications, you can now visually step through your OpenGL ES code to optimize your app or game</li><br /> <li><b>Integration of IntelliJ 15</b> - Android Studio is based on the efficient coding platform of Intellij. Check out the new features from IntelliJ <a href="https://www.jetbrains.com/idea/whatsnew/">here</a>.</li><br /></ul><br /><br /><p>Check out the latest installment of Android Studio Tool Time video below to watch the highlights of the features.</p><br /><BR><br /><!--[Interactive video] --><iframe width="557" height="370" " frameborder="0" src="https://www.youtube.com/embed/xxx3Fn7EowU?list=PLWz5rJ2EKKc_w6fodMGrA1_tsI3pqPbqa" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 80px;" allowfullscreen></iframe><br /><br><br /><h3>New Features in Android Studio 2.0 Beta</h3><br /><br><br /><b><br />Instant Run</b><br /><br /><p>We first <a href="http://android-developers.blogspot.com/2015/11/android-studio-20-preview.html">previewed Instant Run</a> in November; this latest beta release introduces a new capability called Cold Swap</p><br /><br /><p>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 ( '<code>com.android.tools.build:gradle:2.0.0-beta2</code>’ ), 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:<p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh08FSPGZxXpONCQRuCSz0kCIh-4YpcVKlN6VmErIUC3Jpr4mvOun7_y38cB3wxB7UbEXJtZtxA_mIt-lBPoojiGh2_5MgJ3sq_XySUmiHnwtbCAolxmxN8FZdOLgH-GsKxwiHcrwHJzwg/s1600/image06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh08FSPGZxXpONCQRuCSz0kCIh-4YpcVKlN6VmErIUC3Jpr4mvOun7_y38cB3wxB7UbEXJtZtxA_mIt-lBPoojiGh2_5MgJ3sq_XySUmiHnwtbCAolxmxN8FZdOLgH-GsKxwiHcrwHJzwg/s400/image06.png" /></a></div><br /><p><center>Instant Run Button</p></center><br /><br /><p>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:</p><br /><br /><ul><br /> <li><b>Hot Swap</b> - When only method implementations (including constructors) are changed, the changes are hot swapped. Your application keeps running and the new implementation is used the next time the method is called. </li><br /> <li><b>Warm Swap</b> - When app resources are changed, the changes are warm swapped. This is similar to a hot swap, except that the current Activity is restarted. You will notice a slight flicker on the screen as the Activity restarts.</li><br /> <li><b>*<font color="#0000FF">New for Beta</font>* Cold Swap</b> - This will quickly restart the whole application. Typically for structural code change, including changes to the class hierarchy, method signatures, static initializers, or fields. Cold Swap is available when you deploy to targets with API level 21 or above.</li><br /></ul><br /><br /><p>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 <a href="http://tools.android.com/tech-docs/instant-run">here</a>.</p><br /><br /><b><p><br />App Indexing</p></b><br /><br /><p><br />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.</p><br /><br /><ul><br /> <li><b>Code Generation</b><br />Introduced in Android Studio 2.0 Preview, you can right click on AndroidManifest.xml or Activity method (or go to <b>Code → Generate…→ App Indexing API Code</b>) to insert HTTP URL stub codes into your manifest and app code.<br /></li><br /></ul><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb9BuLJ26DLHu5u_uB7IwKddRNcKzveKkoxpqKGEfS5jjruSxlLXO_yrZl6vKBDPyDQVxS_CznCQRgfr7IecmtNojzcFv9A8jTQ9OaMb3OcjsPt29C4fljya6iOnmPMJLwE0_wZzTWnlyM/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb9BuLJ26DLHu5u_uB7IwKddRNcKzveKkoxpqKGEfS5jjruSxlLXO_yrZl6vKBDPyDQVxS_CznCQRgfr7IecmtNojzcFv9A8jTQ9OaMb3OcjsPt29C4fljya6iOnmPMJLwE0_wZzTWnlyM/s640/image01.png" /></a></div><br /><br /><ul><br /> <li><b>*<font color="#0000FF">New for Beta</font>* URL Testing & Validation</b><br />What is new in Android Studio 2.0 Beta is that you can now validate and check the results of your URLs with the built-in validation tool <b>(Tools → Android → Google App Indexing Test)</b>. To learn more about app indexing, click <a href="http://g.co/AppIndexing/AndroidStudio">here</a>.</li><br /></ul><br /><i><p><center>Insert App Indexing API Code into your app</p></center></i><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWpCmbxnPJY3Dx-zsHskf04T_fHi6qWK7mjH1T-ukpTPDX3Yv_7bQJc_N84pAyiaJO3My12mhquSDPXktM509lEGPOq5vSEGvCHKtOLVsPzF1z8HbeFkimElA2uKP5p7e8-eH6-7RrB9gq/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWpCmbxnPJY3Dx-zsHskf04T_fHi6qWK7mjH1T-ukpTPDX3Yv_7bQJc_N84pAyiaJO3My12mhquSDPXktM509lEGPOq5vSEGvCHKtOLVsPzF1z8HbeFkimElA2uKP5p7e8-eH6-7RrB9gq/s640/image00.png" /></a></div><br /><i><p><center>App Indexing Testing</p></center></i><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfDUL_4Cft75AJ5PpG9aggD60qmTFycGCuyxlsWsd_e6f8pmtmJRvgLqlI-M2yOdHiYFKyhafPoCAc4WLO9UKB5lrbeH24xwhLikZeuoEpY8167eD1ifBy4hEu40RBXO-lqQm7HluNW1LK/s1600/image05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfDUL_4Cft75AJ5PpG9aggD60qmTFycGCuyxlsWsd_e6f8pmtmJRvgLqlI-M2yOdHiYFKyhafPoCAc4WLO9UKB5lrbeH24xwhLikZeuoEpY8167eD1ifBy4hEu40RBXO-lqQm7HluNW1LK/s640/image05.png" /></a></div><br /><i><p><center>App Indexing Test Results</p></center></i><br /><br /><b><p>Android Emulator</p></b><br /><br /><p><b>*<font color="#0000FF">Updated for Beta</font>*</b> The <a href="http://android-developers.blogspot.com/2015/12/android-studio-20-preview-android.html">new and faster Android emulator</a> 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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNdjj5lS2xhzEQH6PiOeNTUx8yBnQK2BRfUlwotA892iX51CDZi1rHHib6Qk4g5CTcFRgcLMaBRDe27kODbox2-8DGynI4HIs_vHQnk43QWbus6m8tHWgD_VyYBnqOrcHNBmqA_1VwUym4/s1600/image07.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNdjj5lS2xhzEQH6PiOeNTUx8yBnQK2BRfUlwotA892iX51CDZi1rHHib6Qk4g5CTcFRgcLMaBRDe27kODbox2-8DGynI4HIs_vHQnk43QWbus6m8tHWgD_VyYBnqOrcHNBmqA_1VwUym4/s400/image07.gif" /></a></div><br /><i><p><center>Pinch & Zoom Gesture with Multi-Touch</p></center></i><br /><br /><b><p>What's Next</p></b><br /><br /><p>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. </p><br /><br /><p>Connect with us, the Android Studio development team, on <a href="https://plus.google.com/communities/114791428968349268860">Google+</a>.</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-47924955395394642722016-02-04T09:21:00.000-08:002016-02-07T05:13:22.723-08:00Project Tango workshops help bring indoor location apps to life <i><p>Posted by Eitan Marder-Eppstein, Developer Engineering Lead, Project Tango</p></i><br /><br /><p>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.</p><br /><br /><p><br />Over the past few weeks, we’ve been collecting amazing ideas from around the world for great apps for <a href="http://android-developers.blogspot.com/2016/01/get-your-app-featured-on-first.html">Lenovo’s Project Tango-powered phone</a>. (Have an idea? If you can dream it, you can <a href="https://www.google.com/atap/project-tango/app-incubator/">submit it</a>!) 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 <a href="http://www.westfieldlabs.com/">Westfield Lab</a>s devoted to indoor location. Here are some of the highlights:</p><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/MZgHoRhffJg" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><br /><p>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:</p><br /><br /><ul><br /> <li>Wayfair made it possible to look through your phone and visualize how a piece of furniture would look in your home.</li><br /> <li>Lowe’s Innovation Labs improved in-store navigation by overlaying directions to individual items<br /></li><br /> <li>And Aisle411 created a shop-along experience with some of your favorite celebrities</li><br /></ul> <br /><br><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit60XwKmMdnNCVgGg7_m5n1jBZvU62NWaGoa5mAUAarcZKMEeGWnEv8FWRv8E6ynHEnXLf3I9iKh0-QGARBJu9ReI2urYMJrtjIBHD4kSZ7IBvDUP6HIlIMxLWAYUigouxigbckeuvGLvv/s1600/image00.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit60XwKmMdnNCVgGg7_m5n1jBZvU62NWaGoa5mAUAarcZKMEeGWnEv8FWRv8E6ynHEnXLf3I9iKh0-QGARBJu9ReI2urYMJrtjIBHD4kSZ7IBvDUP6HIlIMxLWAYUigouxigbckeuvGLvv/s400/image00.jpg" /></a><br /><br /><p>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 <a href="https://www.google.com/atap/project-tango/app-incubator/">submitting your ideas</a> to the App Incubator (the deadline is February 15!), and we'll see you soon!</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-46483801869183933422016-02-01T10:09:00.000-08:002016-02-07T05:13:22.719-08:00Marshmallow and User Data<div class="separator" style="clear: both; float: right;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWlMJ8jNX8qDq-kZrbGzz1ICx9w2SGBQv9lITdc-NeyLEk7YOxeR857ZDHlxPLzj1a9dLnh8TFtZvwwFfLCr6HVYeAItXQGw9GxJxeuVHCflEPZnZd_u-ZqnAQYbVNVErT-GaPmbNM-tEE/s520/image00.png" /></div><br /><br /><p><em>Posted by Joanna Smith, Developer Advocate and Giles Hogben, Google Privacy Team</em></p><br /><br /><p>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.</p><br /><br /><p>This post highlights the <strong>key considerations for user trust</strong> when it comes to runtime permissions and hardware identifiers, and points you to <strong><a href="http://developer.android.com/training/best-permissions-ids.html?utm_campaign=android_discussion_marshmallow_020116&utm_source=anddev&utm_medium=blog">new best practices</a></strong> documentation to clarify what to aim for in your own app.</p><br /><br /><h3>Permission Changes</h3><br /><p>With Marshmallow, <b>permissions have moved from install-time to runtime.</b> 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.</p><br /><br /><p>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.</p><br /><br /><p>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.</p><br /><br /><h3>Identifier Changes</h3><br /><br /><p>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.</p><br /><br /><p>Most notably, <b>Local WiFi and Bluetooth MAC addresses are no longer available.</b> The <code>getMacAddress()</code> method of a <code>WifiInfo object and the BluetoothAdapter.getDefaultAdapter().getAddress()</code> method will both return <code>02:00:00:00:00:00</code> from now on.</p><br /><br /><p><br />However, <b>Google Play Services now provides Instance IDs</b>, 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 <a href="https://developers.google.com/instance-id/?utm_campaign=android_discussion_marshmallow_020116&utm_source=anddev&utm_medium=blog">What is Instance ID?</a> help article for more information.</p><br /><br /><h3>What’s Next</h3><br /><p>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.</p><br /><br /><br /><ul><br /> <li>Understand how <a href="http://developer.android.com/training/articles/user-data-overview.html?utm_campaign=android_discussion_marshmallow_020116&utm_source=anddev&utm_medium=blog">permissions and user data are linked</a></li><br /> <li>Learn more about the <a href="http://developer.android.com/training/articles/user-data-permissions.html?utm_campaign=android_discussion_marshmallow_020116&utm_source=anddev&utm_medium=blog">best practices for permissions</a></li><br /> <li>Discover the <a href="http://developer.android.com/training/articles/user-data-ids.html?utm_campaign=android_discussion_marshmallow_020116&utm_source=anddev&utm_medium=blog">best practices for unique identifiers</a>, with clarity based on changes in Marshmallow.</li><br /></ul> <br /><br /><p><br />So happy developing! May your apps make users happy, and may your reviews reflect that. :)<br /></p><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-56781614742182617652016-01-27T09:12:00.000-08:002016-02-07T05:13:22.741-08:00Android Developer Story: Travel app Wego, increases monthly user retention by 300% with material design<i><p>Posted by Lily Sheringham, Google Play team</p></i><br /><br /><p>Headquartered in Singapore, <a href="https://play.google.com/store/apps/details?id=com.wego.android&hl=en">Wego</a> 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.</p><br /><br /><p>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.</p><br /><BR><br /><!--[Interactive video] --><iframe width="557" height="370" " frameborder="0" src="https://www.youtube.com/embed/J3IvOfvH1ys?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 80px;" allowfullscreen></iframe><br /><br /><p>Learn more about <a href="https://www.google.com/design/spec/material-design/introduction.html">Material Design</a>, how to use <a href="http://developer.android.com/tools/studio/index.html?utm_campaign=android_update_wego_012716&utm_source=anddev&utm_medium=blog">Android Studio</a>, and how to find success on Google Play with the new guide ‘<a href="https://developer.android.com/distribute/googleplay/guide.html?utm_campaign=android_update_wego_012716&utm_source=anddev&utm_medium=blog">Secrets to App Success on Google Play</a>.’</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-37786010660121197552016-01-26T16:09:00.000-08:002016-02-07T05:13:22.713-08:00How Fabulous and Yummly grew with App Invites<i><P>Posted by Laurence Moroney, Developer Advocate</p></i><br /><br /><p>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.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix0Qf8DfqYCQPfgcWKL3Szu2VvVLOqUV1s0Zp6SX6d9b7UyqsoD17ZQ9LHMOA2J8GV8afW7m437nIsEXT4Gk6Omko9GCZw7DOLEl70zA6aKkiTB66JhnzzSdMcjNWOakhLgA16o4WQFFbe/s1600/image00.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix0Qf8DfqYCQPfgcWKL3Szu2VvVLOqUV1s0Zp6SX6d9b7UyqsoD17ZQ9LHMOA2J8GV8afW7m437nIsEXT4Gk6Omko9GCZw7DOLEl70zA6aKkiTB66JhnzzSdMcjNWOakhLgA16o4WQFFbe/s320/image00.png" /></a></div><p><a href="http://www.thefabulous.co/">Fabulous</a> 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.</p><br /><br /><p>Users started taking advantage of App Invites within the app to share their experience with their friends and family. <b>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</b> 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.</p><br /><br /><b><p>Additionally, users that were acquired via App Invites versus other channels were found to be twice as likely to stay with the app.</p></b><br /><br /><p>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!”</p><br /><br /><p>You can view the full case study from Fabulous <a href="https://developers.google.com/app-invites/case-studies/Fabulous.pdf?utm_campaign=app invites_discussion_fabulous_012616&utm_source=anddev&utm_medium=blog">here</a>.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_T1hkYESMClFyI5wKyBrG5qDJTnsv9w2z8NPfiePbgZuZGYeMQ-dxVnnsTrki4osoLBo_-D8BaOs3Umoi1UFdNRjcvRcTMFMwv-_pUIREK2PCeDhTixBrnZoukD_Lt4AuFAe6HGB9BENH/s1600/image01.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_T1hkYESMClFyI5wKyBrG5qDJTnsv9w2z8NPfiePbgZuZGYeMQ-dxVnnsTrki4osoLBo_-D8BaOs3Umoi1UFdNRjcvRcTMFMwv-_pUIREK2PCeDhTixBrnZoukD_Lt4AuFAe6HGB9BENH/s320/image01.png" /></a></div><p><b><a href="http://www.yummly.com/">Yummly</a></b>, 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.</p><br /><br /><p><b>With App invites, they found that installation rates were about 60 percent higher compared to other sharing channels.</b> 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.</p><br /><br /><p>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.”</p><br /><br /><p>You can view the full case study from Yummly <a href="https://developers.google.com/app-invites/case-studies/Yummly.pdf?utm_campaign=app invites_discussion_fabulous_012616&utm_source=anddev&utm_medium=blog">here</a>.</p><br /><br /><p>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.</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-36862064467061956202016-01-25T09:24:00.000-08:002016-02-07T05:13:22.709-08:00New features to better understand player behavior with Player Analytics<i><p>Posted by Lily Sheringham, Developer Marketing at Google Play</p></i><br /><br /><p>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 <a href="https://play.google.com/apps/publish/?#BusinessDriversPlace:gt=1059826392430">sample game</a> in the Google Play Developer Console, which we produced with help from <a href="https://play.google.com/store/apps/developer?id=Auxbrain+Inc&hl=en_GB">Auxbrain</a>, developer of <a href="https://play.google.com/store/apps/details?id=com.auxbrain.zh2&hl=en_GB">Zombie Highway 2</a>. The <a href="https://play.google.com/apps/publish/?#BusinessDriversPlace:gt=1059826392430">sample game</a> 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 <a href="https://support.google.com/googleplay/android-developer/answer/6112435"><i>Google Play Developer account</i></a> in order to access the <i>sample game.<a href="https://play.google.com/apps/publish/?#BusinessDriversPlace:gt=1059826392430"></a></i></p><br /><b><br /><h3>Use predictive analytics to engage players before they might churn</h3></b><br /><br /><p>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.</p><br /><b><br /><h3>Create charts in the new funnels report to quickly visualize sequences of events</h3></b><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwxvVUbgSJQ-QyDtR6Rzadt-RaYDIA1xwRrzvj6-5tXifPQ-GqnqfEyuUGhZeTN9IS4Fd7ReUZUf8np9NvTDnS3QzoWup59BFP0o6njYpLsToH0d27w6q8nJtGAw737MqxCx7SR4317tnc/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwxvVUbgSJQ-QyDtR6Rzadt-RaYDIA1xwRrzvj6-5tXifPQ-GqnqfEyuUGhZeTN9IS4Fd7ReUZUf8np9NvTDnS3QzoWup59BFP0o6njYpLsToH0d27w6q8nJtGAw737MqxCx7SR4317tnc/s640/image00.png" /></a></div><br /><b><br /><h3>Measure and compare the effect of changes and cumulative values by new users with cohort’s report</h3></b><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iAv4pqGX4b3F9I0oMVPL6gIIGTtMNafPQ-8nlH6FxZLcv6gB7vXFnhavGIn-BkDt6ivA7pdrzMbQgwV8KiuhJ9AVTRuKib5KIEKOM3ogtsT79VOQgwlNjTDvQs_T2L253fSvZk_5ehHR/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1iAv4pqGX4b3F9I0oMVPL6gIIGTtMNafPQ-8nlH6FxZLcv6gB7vXFnhavGIn-BkDt6ivA7pdrzMbQgwV8KiuhJ9AVTRuKib5KIEKOM3ogtsT79VOQgwlNjTDvQs_T2L253fSvZk_5ehHR/s640/image01.png" /></a></div><br /><b><h3>Updated C++, iOS SDKs and Unity plug-in to support Player Stats API</h3></b><br /><br /><p><br />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. <br /><br />Be sure to check out the <a href="https://play.google.com/apps/publish/?#BusinessDriversPlace:gt=1059826392430">sample game</a> and <a href="https://developers.google.com/games/services/?utm_campaign=play services_discussion_analytics_012516&utm_source=anddev&utm_medium=blog">learn more about Play Games Services.</a> You can also get <a href="http://android-developers.blogspot.co.uk/2015/11/developer-tips-for-success-with-player.html">top tips from game developer Auxbrain to help you find success with Google Play game services.</a></p><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-83099841289592166452016-01-23T11:27:00.000-08:002016-02-07T05:13:22.784-08:00Play Games Permissions are changing in 2016<i><p>Posted by Wolff Dobson, Developer Advocate</p></i><br /><br /><p>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:</p><br /><br /><ul><br /> <li>Players are prompted to sign-in once per account, rather than once per game</li><br /> <li>Players no longer need their account upgraded to Google+ to use Play Games services</li><br /> <li>Once players have signed-in for the first time, they will no longer need to sign in to any future games; they will be automatically signed in</li><br /> <i><li>Note: Players can turn off auto-sign-in through the Play Games App’s settings</li></i><br /></ul> <br /><br />Advantages:<br /><br /><ul><br /> <li>Once a user signs in for first time, new games will generally be able to sign in without any user interaction</li><br /> <i><li>There is no consent screen required for signing in on any particular game. Sign-in will be automatic to each new game.</li></i><br /></ul><br /><br /><p>In order to respect user’s privacy and avoid revealing their real name, we also have to change the way player IDs work.</p><br /><br /><ul><br /> <li><i>For existing players: </i> Games will continue to get their Google+ ID (also called “player ID” in previous documentation) when they sign in.</li><br /> <i><li><i>For new players:</i> Games will get a new player ID which is not the same as the previous IDs we’ve used.</li></i><br /></ul><br /><br /><h3>Potential issues</h3><br /><br /><p>Most games should see no interruption or change in service. There are a handful of cases, however, where some change is required.</p><br /><br /><p>Below are some issues, along with potential solutions.</p><br /><br /><p>These are:</p><br /><OL><br /><b><LI>Asking for the Google+ scope unnecessarily</b><br /><UL><br /><LI>Issue: Your users will get unnecessary, potentially disturbing pop-up consent windows<br /><LI>Solution: Don’t request any additional scopes unless you absolutely need them<br /></UL><br /><b><LI>Using the Play Games player ID for other Google APIs that are not games</b><br /><UL><br /><LI>Issue: You will not get valid data back from these other endpoints.<br /><LI>Solution: Don’t use player ID for other Google APIs.<br /></UL> <br /><b><LI>Using mobile/client access tokens on the server</b> <br /><UL><br /><LI>Issue: Your access token may not contain the information you’re looking for<br /><UL><br /><LI>...and this is not recommended in the first place.<br /></UL><br /><LI>Solution: Use the new GetServerAuthCode API instead.<br /></UL><br /></OL><br /><br /><p>Let’s cover each of these issues in detail.</p><br /><br /><h3>Issue: Asking for unnecessary scopes</h3><br /><p>Early versions of our samples and documentation created a <font face=Monaco >GoogleApiClient</font> as follows:</p><br /><br /><pre style="font-family:roboto;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> // Don’t do it this way! <br /> GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this) <br /> .addApi(Games.API) <br /> .addScope(Plus.SCOPE_PLUS_LOGIN) // The bad part <br /> .build(); <br /> // Don’t do it this way! <br /></code></pre><br /><br /><p>In this case, the developer is specifically requesting the <font face=Monaco>plus.login</font> scope. <b>If you ask for <font face=Monaco >plus.login</font>, your users will get a consent dialog.</b></p><br /><br /><h3>Solution: Ask only for the scopes you need</h3><br /><p>Remove any unneeded scopes from your <font face=Monaco>GoogleApiClient</font> construction along with any APIs you no longer use.</p><br /><pre style="font-family:roboto;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> // This way you won’t get a consent screen <br /> GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this) <br /> .addApi(Games.API) <br /> .build(); <br /> // This way you won’t get a consent screen <br /></code></pre><br /><br /><h3>For Google+ users</h3><br /><p>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).</p><br /><br /><p>To require Google+ accounts to use your game, change your Games.API declaration to the following:</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> .addApi(Games.API, new GamesOptions.Builder() <br /> .setRequireGooglePlus(true).build()) <br /></code></pre><br /><br /><p>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.</p><br /><br /><h3>Issue: Using the Player ID as another ID</h3><br /><p>If you call the Games.getCurrentPlayerId() API, the value returned here is the identifier that Games uses for this player.</p><br /><br /><p>Traditionally, this value could be passed into other APIs such as <font face=Monaco>Plus.PeopleApi.load.</font> In the new model, this is no longer the case. <b>Player IDs are ONLY valid for use with Games APIs.</b></p><br /><br /><h3>Solution - Don’t mix IDs</h3><br /><p>The Games APIs (those accessed from <font face=Monaco>com.google.android.gms.games)</font> all use the Player ID, and as long as you use only those, they are guaranteed to work with the new IDs.</p><br /><br /><h3>Issue: Using mobile/client access tokens on the server</h3><br /><p>A common pattern we’ve seen is:</p><br /><ul><br /> <li>Use GoogleAuthUtil to obtain an access token</li><br /> <li>Send this token to a server</li><br /> <li>On the server, call Google to verify the authenticity. This is most commonly done by calling <a href="https://www.googleapis.com/oauth2/v1/tokeninfo">https://www.googleapis.com/oauth2/v1/tokeninfo</a> and looking at the response</li><br /></ul> <br /><br /><p>This is not recommended in the first place, and is even more not-recommended after the shift in scopes.</p><br /><br /><p>Reasons not to do this:</p><br /><ul><br /> <li>It requires your app to know the current account the user is using, which requires holding the GET_ACCOUNTS permission. On Android M, this will result in the user being asked to share their contacts with your app at runtime, which can be intimidating.</li><br /> <li>The <font face=Monaco>tokeninfo</font> endpoint isn’t really designed for this use case - it’s primarily designed as a debugging tool, not as a production API. This means that you may be rate limited in the future if you call this API.</li><br /> <li>The user_id returned by token info may no longer be present with the new model. And even if it <b>is</b> present, the value won’t be the same as the new player ID. (See problem 2 above) </li><br /> <li>The token could expire at any time (access token expiration times are not a guarantee).</li><br /> <li>Using client tokens on the server require extra validation checks to make sure the token is not granted to a different application.</li><br /></ul> <br /><br /><h3>Solution: Use the new <font face=Monaco>GetServerAuthCode</font> flow</h3><br /><br /><p>Fortunately, the solution is known, and is basically the same as our server-<a href="https://developers.google.com/identity/sign-in/web/server-side-flow?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog">side auth recommendations for web.</a></p><br /><br /><span id="docs-internal-guid-71dc0b7f-6502-f808-d778-48094ca525ae"><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: decimal; font-size: 13; font-family: Roboto; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"</span><br /><br /><span style="font-size: 13; vertical-align: baseline; white-space: pre-wrap;">Upgrade to the latest version of Google Play Services SDK - at least 8.4.87.</span></p></li><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Create a server client ID if you don’t already have one</span></p></li><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Go to the Google Developer Console, and select your project</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">From the left nav, select API Manager, then select Credentials</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Select “New Credentials” and choose “OAuth Client ID”</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Select “Web Application” and name it something useful for your application</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">The client id for this web application is now your server client id.</span></p></li></ol><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">In your game, connect your GoogleApiClient as normal.</span></p></li><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Once connected, call the following API:</span></p></li><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; font-family: 'Courier New'; vertical-align: baseline; white-space: pre-wrap;">Games.getGamesServerAuthCode(googleApiClient, “your_server_client_id”)</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">If you were using GoogleAuthUtil before, you were probably calling this on a background thread - in which case the code looks like this:</span></p></li></ol></ol></span><br /><br><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> // Good way <br /> { <br /> GetServerAuthCodeResult result = <br /> Games.getGamesServerAuthCode(gac, clientId).await(); <br /> if (result.isSuccess()) { <br /> String authCode = result.getCode(); <br /> // Send code to server. <br /> } <br /> } <br /> // Good way <br /></code></pre><br /><br><br><ol style="margin-top:0pt;margin-bottom:0pt;" start="5"><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Send the auth code to your server, exactly the same as before.</span></p></li><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">On your server, make an RPC to </span><a href="https://www.googleapis.com/oauth2/v4/token" style="text-decoration:none;"><span style="font-size: 13px; color: rgb(17, 85, 204); text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.googleapis.com/oauth2/v4/token</span></a><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;"> to exchange the auth code for an access token, probably using a </span><a href="https://developers.google.com/discovery/libraries?hl=en?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog" style="text-decoration:none;"><span style="font-size: 13px; color: rgb(17, 85, 204); text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Google Apis Client Library</span></a><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">. </span></p></li><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">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.</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">See more details here: </span><a href="https://developers.google.com/identity/protocols/OAuth2WebServer?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog#handlingresponse" style="text-decoration:none;"><span style="font-size: 13px; color: rgb(17, 85, 204); text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://developers.google.com/identity/protocols/OAuth2WebServer?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog#handlingresponse</span></a></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">No, really: You should use a </span><a href="https://developers.google.com/discovery/libraries?hl=en?utm_campaign=play games_discussion_permissions_012316&utm_source=anddev&utm_medium=blog" style="text-decoration:none;"><span style="font-size: 13px; color: rgb(17, 85, 204); text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Google Apis Client Library</span></a><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;"> to make this process easier.</span></p></li></ol><li dir="ltr" style="list-style-type: decimal; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Once you have the access token, you can now call </span><span style="font-size: 13px; font-family: 'Courier New'; vertical-align: baseline; white-space: pre-wrap;">www.googleapis.com/games/v1/applications/<app_id>/verify/</span><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;"> using that access token.</span></p></li><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">Pass the auth token in a header as follows:</span></p></li><ol style="margin-top:0pt;margin-bottom:0pt;"><li dir="ltr" style="list-style-type: lower-roman; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">“Authorization: OAuth <access_token>”</span></p></li></ol><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">The response value will contain the player ID for the user. This is the correct player ID to use for this user.</span></p></li><li dir="ltr" style="list-style-type: lower-alpha; font-size: 13px; font-family: Arial; vertical-align: baseline;"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 13px; vertical-align: baseline; white-space: pre-wrap;">This access token can be used to make additional server-to-server calls as needed.</span></p></li></ol></ol><span style="font-size: 13px; font-family: Arial; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">Note:</span><span style="font-size: 13px; font-family: Arial; vertical-align: baseline; white-space: pre-wrap;"> This API will only return a 200 if the access token was actually issued to your web app.</span></span></span><br /><br><br /><br><br /><h3>In summary</h3><br /><p>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.</p><br /><br /><p>If you are:</p><br /><br /><ul><br /> <li>Requesting Google+ scopes without using them, it’s a good idea to stop using them from here out.</li><br /> <li>Sending client access tokens to your server, we strongly suggest you use <font face=Monaco>getGamesServerAuthCode()</font> instead.</li><br /></ul> <br /><br /><p>Thanks, and keep making awesome games!</p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-77898657278939726662016-01-20T10:19:00.000-08:002016-02-07T05:13:22.781-08:00Android Developer Story: Music app developer DJIT builds higher quality experiences and a successful businesses on Android<i><p>Posted by Lily Sheringham, Google Play team</p></i><br /><br /><p>Paris-based <a href="https://play.google.com/store/apps/dev?id=6775629480928024144">DJiT</a> is the creator of <a href="https://play.google.com/store/apps/details?id=com.edjing.edjingdjturntable">edjing</a>, 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.</p><br /><br /><p>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.</p><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/e7t3svG9PTk" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><br /><p>Find out more about <a href="http://googlesamples.github.io/android-audio-high-performance/">building great audio apps</a> and how to <a href="https://developer.android.com/distribute/googleplay/guide.html?utm_campaign=android_series_djit_012016&utm_source=anddev&utm_medium=blog">find success on Google Play</a>.</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-19594981638745393132016-01-15T17:46:00.000-08:002016-02-07T05:13:22.702-08:00Create promo codes for your apps and in-app products in the Google Play Developer Console<i><p>Posted by Yoshi Tamura, Product Manager, Google Play</p></i><br /><br /><p><br />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 <a href="http://android-developers.blogspot.com/2015/07/iterate-faster-on-google-play-with.html">improved beta testing</a> features help you gather more feedback and fix issues. <a href="http://android-developers.blogspot.com/2015/10/learn-top-tips-from-kongregate-to.html">Store Listing Experiments</a> let you run A/B tests on your app’s Play Store listing. <a href="http://android-developers.blogspot.com/2015/10/google-play-developer-console.html">Universal App Campaigns</a> and the <a href="https://support.google.com/googleplay/android-developer/answer/6263332">User Acquisition</a> performance report help you grow your audience and better understand your marketing.</p><br /><br /><p>Starting today, you can now generate and distribute <a href="https://support.google.com/googleplay/android-developer/answer/6321495"><b>promo codes</b></a> 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.<br /></p><br /><br /><h3>How to use promo codes</h3><br /><OL TYPE=1><br /><LI>Choose your app in the Developer Console.<br /><LI>Under the Promotions tab choose <b>Add new promotion</b>.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvifjXY8sWX0aGsJHvtEURIbS-_VfhhQ8vZeqPg50lUYFaQuAYEpiny32J4Ru96JcglItzUJ5ql0wqYb_gfI4Qk7nzq4YAmmKzI9FJhPRvP4VjUivDx1MMtpBLzylN3i8rw24JpkJCkTL/s1600/Dev+Cosnole+Blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvifjXY8sWX0aGsJHvtEURIbS-_VfhhQ8vZeqPg50lUYFaQuAYEpiny32J4Ru96JcglItzUJ5ql0wqYb_gfI4Qk7nzq4YAmmKzI9FJhPRvP4VjUivDx1MMtpBLzylN3i8rw24JpkJCkTL/s640/Dev+Cosnole+Blog.png" /></a></div><br /><LI>Review and accept the additional terms of service if you haven’t run a promotion before.<br /><LI>Choose from the <a href="https://support.google.com/googleplay/android-developer/answer/6321495">options available</a>, then generate and download your promo codes.<br /><LI>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.<br /><LI>Users can redeem your promo codes in a number of ways, including:<br /></OL><br /><OL TYPE=a><br /><LI>From Google Play, using the Redeem menu option.<br /><LI>From your app. They’ll be directed to the Play checkout flow before being redirected back to your app.<br /><LI>By following a link that embeds the promo code (see tips below).<br /></OL><br /><br /><p>For more details about running a promotion for your app or game, <a href="https://support.google.com/googleplay/android-developer/answer/6321495">read this article on the Google Play Developer Help Center</a>.</p><br /><br /><h3>Tips for making the most of promo codes</h3><br /><br /><p>Some things to keep in mind when running a successful promotion:</p><br /><br /><ul><br /> <li>There’s a limit of 500 promo codes per app every quarter.</li><br /> <li>You can embed your code in a URL so that users don’t have to enter it themselves (for example, if you’re sending your codes in an email). You can use the URL: https://play.google.com/store?code={CODE} (where {CODE} is a generated promo code).</li><br /> <li>To use promo codes for in-app products, you should <a href="http://developer.android.com/google/play/billing/billing_promotions.html?utm_campaign=play games_discussion_promocodes_011516&utm_source=anddev&utm_medium=blog">implement In-app Promotions</a> in your app. Note that promo codes can’t be used for subscriptions.</li><br /> <li>Review and adhere to the <a href="https://play.google.com/about/promo-code-developer-terms.html">Promotional Code Terms Of Service.</a></li><br /></ul> <br /><br /><p>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, <a href="https://play.google.com/store/books/details?id=O2a5CgAAQBAJ">“The Secrets to App Success on Google Play”.</a></p><br /><center><div class="separator" style="clear: center; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaSh4RRvsqaZN43ZmLwv7hzwycKZY9BuTugslbhokfk7-ek0_Ket2nFmkkt3k6tBnvK-Ldvj5sRdO5y7XY_9T6roqkNNPMDiW8gLiVuCBBCUI-BGjMPVQpTBzSkJVicg1tS4cJBsXF_ek/s1600/image01.png" imageanchor="1" style="margin-center: 1em; margin-center: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaSh4RRvsqaZN43ZmLwv7hzwycKZY9BuTugslbhokfk7-ek0_Ket2nFmkkt3k6tBnvK-Ldvj5sRdO5y7XY_9T6roqkNNPMDiW8gLiVuCBBCUI-BGjMPVQpTBzSkJVicg1tS4cJBsXF_ek/s200/image01.png" /></a></div></center>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-76443182542695168132016-01-14T10:00:00.000-08:002016-02-07T05:13:22.778-08:00Using Google Sign-In with your server<i><p>Posted by Laurence Moroney, Developer Advocate</p></i><br /><br /><p>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 <a href="http://android-developers.blogspot.com/2015/11/improvements-to-sign-in-with-google.html">part 1</a>, we spoke about the user experience improvements that are available to you. In <a href="http://android-developers.blogspot.com/2015/12/api-updates-for-sign-in-with-google.html">part 2</a>, we then took a deeper dive into the client-side changes to the Google Sign-In APIs that make coding a lot simpler.</p><br /><br /><p><br />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.</p><br /><br /><h3>Using Credentials on your server</h3><br /><br /><p>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.</p><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAa6EPZL9Zo4zjAZdmei7LeIMcOD7lwoS3jaSwwFdzlNAuq41EV4vwzIpFrLnMWZ3ozhTqJjOKB-2_mlBYZUfIIsU0wy3cmCPZLjWrrtfUawdOKAzHl0-t6WARfGyaruk2XPrNxJLhezrd/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAa6EPZL9Zo4zjAZdmei7LeIMcOD7lwoS3jaSwwFdzlNAuq41EV4vwzIpFrLnMWZ3ozhTqJjOKB-2_mlBYZUfIIsU0wy3cmCPZLjWrrtfUawdOKAzHl0-t6WARfGyaruk2XPrNxJLhezrd/s640/image00.png" /></a></div><br /><b><i><p><center>Figure 1. A third party could spoof your server with a fake email</p></center></i></b><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg76_LH6aXwGmMXX-fy5qNob5k3grnDwQ4aUFsvoHzkspzi5YbJGs6UaQF4TfTzSUmPeDU7XYtdk_4XhiDlHUWT2kSZ9i5qzl9ull2NzfNa4C4UJSMQ5C5XSlRfZlGBsmYb9TJb4GvZWG86/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg76_LH6aXwGmMXX-fy5qNob5k3grnDwQ4aUFsvoHzkspzi5YbJGs6UaQF4TfTzSUmPeDU7XYtdk_4XhiDlHUWT2kSZ9i5qzl9ull2NzfNa4C4UJSMQ5C5XSlRfZlGBsmYb9TJb4GvZWG86/s640/image01.png" /></a></div><br /><b><i><p><center>Figure 2. Third Party Fake Tokens will be rejected</p></center><b></b></i></b><br /><br /><p><br />Let’s take a look at the steps for doing this:<br /></p><br /><br /><p><b>Step 1:</b> Your Android app gets an ID token (*) after signing in with Google. There’s a great sample that demonstrates this <a href="https://github.com/lmoroney/google-services/tree/master/android/signin">here</a>. To do this, the requestIdToken method is called when creating the GoogleSignInOptions object.</p><br /><br><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) <br /> .requestIdToken(getString(R.string.server_client_id)) <br /> .requestEmail() <br /> .build(); <br /></code></pre><br /><br /><P>This requires you to get a client ID for your server. Details on how to obtain this are available <a href="https://developers.google.com/identity/sign-in/android/start?utm_campaign=android_discussion_googlesignin_011415&utm_source=anddev&utm_medium=blog">here</a> (see Step 4).</P><br /><br /><P>Once your Android app has the token, it can POST it <b>over HTTPS</b> to your server, which will then try to validate it.</P><br /><br /><p>(*) An ID token is JSON Web Token, as defined by <a href="https://tools.ietf.org/html/rfc7519">RFC7519</a>. These are an open, industry standard method for representing claims securely between two parties.</p><br /><br /><p><b>Step 2:</b> Your Server receives the token from your Android client. It should then validate the token with methods that are provided in the <a href="https://developers.google.com/identity/sign-in/android/backend-auth?utm_campaign=android_discussion_googlesignin_011415&utm_source=anddev&utm_medium=blog#using-a-google-api-client-library">Google API Client</a> libraries, in particular, verifying that it was issued by Google and that the intended audience is your server. </p><br /><br /><p>Your server can use the <a href="https://developers.google.com/api-client-library/java/google-api-java-client/reference/1.19.1/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier?utm_campaign=android_discussion_googlesignin_011415&utm_source=anddev&utm_medium=blog">GoogleIdTokenVerifier</a> 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 <a href="https://raw.githubusercontent.com/lmoroney/serverauth/master/LmauthtestServlet.java">example</a> 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.</p><br /><br><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory) <br /> // Here is where the audience is set -- checking that it really is your server <br /> // based on your Server’s Client ID <br /> .setAudience(Arrays.asList(ENTER_YOUR_SERVER_CLIENT_ID_HERE)) <br /> // Here is where we verify that Google issued the token <br /> .setIssuer("https://accounts.google.com").build(); <br /> GoogleIdToken idToken = verifier.verify(idTokenString); <br /> if (idToken != null) { <br /> Payload payload = idToken.getPayload(); <br /> String userId = payload.getSubject(); <br /> // You can also access the following properties of the payload in order <br /> // for other attributes of the user. Note that these fields are only <br /> // available if the user has granted the 'profile' and 'email' OAuth <br /> // scopes when requested. Even when requested, some fields may be null. <br /> // String email = payload.getEmail(); <br /> // boolean emailVerified = Boolean.valueOf(payload.getEmailVerified()); <br /> // String name = (String) payload.get("name"); <br /> // String pictureUrl = (String) payload.get("picture"); <br /> // String locale = (String) payload.get("locale"); <br /> // String familyName = (String) payload.get("family_name"); <br /> // String givenName = (String) payload.get("given_name"); <br /></code></pre><br /><p>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.</p><br /><br /><p>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.</p><br /><br /><p>You can learn more about authentication technologies from Google at the <a href="https://developers.google.com/identity/">Google Identity Platform developers</a> site.</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-70825621510004048992016-01-13T09:23:00.000-08:002016-02-07T05:13:22.768-08:00Spatial audio comes to the Cardboard SDK<i><p>Originally posted on <a href="http://googledevelopers.blogspot.com/2016/01/spatial-audio-comes-to-cardboard-sdk.html">Google Developers Blog</a><p></i><br /><br /><p><i>Posted by Nathan Martz, Product Manager, Google Cardboard</p></i><br /><br /><p>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.</p><br /><br /><h3>Sound the way you hear it</h3><br /><br /><p>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:</p><br /><br /><ul><br /> <li>The SDK combines the physiology of a listener’s head with the positions of virtual sound sources to determine what users hear. For example: sounds that come from the right will reach a user’s left ear with a slight delay, and with fewer high frequency elements (which are normally dampened by the skull).</li><br /> <li>The SDK lets you specify the size and material of your virtual environment, both of which contribute to the quality of a given sound. So you can make a conversation in a tight spaceship sound very different than one in a large, underground (and still virtual) cave.</li><br /></ul> <br /><br /><h3>Optimized for today’s smartphones</h3><br /><br /><p>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:</p><br /><br /><ul><br /> <li>The SDK is optimized for mobile CPUs (e.g. SIMD instructions) and actually computes the audio in real-time on a separate thread, so most of the processing takes place outside of the primary CPU.</li><br /> <li>The SDK allows you to control the fidelity of each sound. As a result, you can allocate more processing power to critical sounds, while de-emphasizing others.</li><br /></ul><br /><br /><h3>Simple, native integrations</h3><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-qLYkKlcnaO4x8CAF6UZKaSLbNQ-Ndto7cx6guaBDJkzPar9M_8oeZHhtJayM2jBRFWdH5xe9VEPiS5fbaMuYw83RruVLu79ZukT6PhmPNnuh3MwS2qi40Tkqzr8eYzyabIKz9vW5POY/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-qLYkKlcnaO4x8CAF6UZKaSLbNQ-Ndto7cx6guaBDJkzPar9M_8oeZHhtJayM2jBRFWdH5xe9VEPiS5fbaMuYw83RruVLu79ZukT6PhmPNnuh3MwS2qi40Tkqzr8eYzyabIKz9vW5POY/s640/image00.png" /></a></div><br /><i><p><center>Experience spatial audio in our sample app for developers</p></center></i><br /><br /><p>Check out our <a href="https://github.com/googlesamples/cardboard-unity/blob/master/Samples/SpatialAudio/AudioSpaces.apk?raw=true">Android sample app</a> (for developer reference only), browse the <a href="https://developers.google.com/cardboard/unity/guide?utm_campaign=cardboard_discussion_spatialaudio_011316&utm_source=anddev&utm_medium=blog#spatial_audio_for_vr">documentation</a> 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!</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-58067333484100503222016-01-07T18:32:00.000-08:002016-02-07T05:13:22.745-08:00Get your app featured on the first smartphone with Project Tango from Lenovo <p><i>Originally posted on <a href="http://googledevelopers.blogspot.com/2016/01/get-your-app-featured-on-first.html">Google Developers Blog</a></p></i><br /><br /><p><i>Posted by Johnny Lee, Technical Project Lead, Project Tango</p></i><br /><br /><p>Today, at CES, Lenovo announced the development of the first consumer-ready smartphone with <a href="https://www.google.com/atap/project-tango/">Project Tango</a>. 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. </p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEChSL_zGvuTPSshz8zwJop8bzTd1N3AOagJ-wmKkdHMJ_qLy1AiwYqcnLL31jjAQ1CHDB8Q2gjwV9SIK0eH9XZPhQ315XG96qhbfiw_YhYonAtWvHJlD-_KTrphZzRbKcILDHkPhyphenhyphenQkI/s1600/image00.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEChSL_zGvuTPSshz8zwJop8bzTd1N3AOagJ-wmKkdHMJ_qLy1AiwYqcnLL31jjAQ1CHDB8Q2gjwV9SIK0eH9XZPhQ315XG96qhbfiw_YhYonAtWvHJlD-_KTrphZzRbKcILDHkPhyphenhyphenQkI/s640/image00.jpg" /></a></div><br /><center><p>*Renderings only. Not the official Lenovo device.</p></center><br /><br /><p>To support the continued growth of the ecosystem, we’re also <a href="http://g.co/ProjectTango/AppIncubator">inviting</a> 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 <b>February 15, 2016.</b></p><br /><br /><p>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:</p><br /><ul><br /> <li>Project schedule including milestones for development –– we’ll reach out to the selected developers by March 15, 2016</li><br /> <li>Visual mockups of your idea including concept art</li><br /> <li>Smartphone app screenshots and videos, such as captured app footage</li><br /> <li>Appropriate narrative including storyboards, etc.</li><br /> <li>Breakdown of your team and its members</li><br /> <li>One pager introducing your past app portfolio and your company profile</li><br /></ul> <br /><br /><p>For some inspiration, Lowe's Home Improvement teamed with developer <a href="http://www.elementalsweb.com/">Elementals Web</a> 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. </p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW0UwPAD8kWLwcqNjGmIYFAaDsj6ho-kz8dOHaP4I2LXPfe7Sf1af4y1ND6vYKda7KPiYwICIsdlIt9plLMxXMrp8NsqKUvwkwRmSZiD1svSj6MOMyiCpEv7MdXnseQe8nd9dldvpBn0Y/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW0UwPAD8kWLwcqNjGmIYFAaDsj6ho-kz8dOHaP4I2LXPfe7Sf1af4y1ND6vYKda7KPiYwICIsdlIt9plLMxXMrp8NsqKUvwkwRmSZiD1svSj6MOMyiCpEv7MdXnseQe8nd9dldvpBn0Y/s640/image01.png" /></a></div><br /><br /><p>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.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio-kPpQafhk6VZ0uxOw8lEP_WRHDQH0WKg9EU8LB2PukV9LwpOEHtAQp_n4f9yKp0vuw1mwJcxFHZ0xK6GFFqJ7Qbfoq3b4lgczooaY3rMwxA7Z8CTgw7ZK55pRyYo9HpqetKRonjQQPo/s1600/image02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio-kPpQafhk6VZ0uxOw8lEP_WRHDQH0WKg9EU8LB2PukV9LwpOEHtAQp_n4f9yKp0vuw1mwJcxFHZ0xK6GFFqJ7Qbfoq3b4lgczooaY3rMwxA7Z8CTgw7ZK55pRyYo9HpqetKRonjQQPo/s640/image02.png" /></a></div><br /><br /><p>There are also some amazing <a href="https://play.google.com/store/apps/collection/promotion_3001310_project_tango_featured">featured apps</a> for Project Tango on Google Play. You can pick up your own Project Tango Tablet Development Kit <a href="https://store.google.com/product/project_tango_tablet_development_kit">here</a> to brainstorm new fun and immersive experiences that use the space around you. <a href="http://g.co/ProjectTango/AppIncubator">Apply now!</a></p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-72484901795579540632015-12-30T12:20:00.000-08:002016-02-07T05:13:22.775-08:00Get ready for Javascript “Promises” with Google and Udacity<p><i>Sarah Clark, Program Manager, Google Developer Training</i></p><br /><br /><p>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?</p><br /><br /><p>Javascript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promises</a> are a new tool that simplifies asynchronous code, converting a tangle of callbacks and event handlers into simple, straightforward code such as: <code>fetch(url).then(decodeJSON).then(addToPage)...</code></p><br /><br /><p>Promises are used by many new web standards, including <a href="http://www.w3.org/TR/service-workers/">Service Worker</a>, the <a href="https://fetch.spec.whatwg.org/">Fetch API</a>, <a href="https://dvcs.w3.org/hg/quota/raw-file/tip/Overview.html#idl-def-StorageQuota">Quota Management</a>, <a href="http://dev.w3.org/csswg/css-font-loading/#font-face-set-ready">Font Load Events</a>,<a href="http://webaudio.github.io/web-midi-api/#widl-Navigator-requestMIDIAccess-Promise-MIDIOptions-options">Web MIDI</a>, and <a href="https://github.com/whatwg/streams#basereadablestream">Streams</a>.</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7_HoK_I9wH5w-wKGsWj0jKNAkvZ55Nl91zK9nAzlzxTlDg4H9MnF6tTDSz7Ki0ymtcqr_6_5llFmGb8PtmT4yOBEb_5dbfiBxQTEY0Rt8_7X6kmjmDeZ9tw6wzns-l_docitkwaOfXnS/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7_HoK_I9wH5w-wKGsWj0jKNAkvZ55Nl91zK9nAzlzxTlDg4H9MnF6tTDSz7Ki0ymtcqr_6_5llFmGb8PtmT4yOBEb_5dbfiBxQTEY0Rt8_7X6kmjmDeZ9tw6wzns-l_docitkwaOfXnS/s400/image00.png" /></a></div><br /><br /><p>We’ve just opened up a online course on <a href="https://www.udacity.com/course/javascript-promises--ud898">Promises</a>, 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!</p><br /><br /><p>This short course is a prerequisite for most of the <a href="https://www.udacity.com/googlewebdev">Senior Web Developer Nanodegree</a>. 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?</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-50670666283456019532015-12-18T10:05:00.000-08:002016-02-07T05:13:22.730-08:00 Google Play Services 8.4 SDK is available<p><i>Posted by Laurence Moroney, Developer Advocate</p></i><br /><br /><p>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.</p><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/-xwKQa9Tm5k" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><br /><h3>Custom Email App Invites</h3><br /><br /><p><a href="https://developers.google.com/app-invites/?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">App Invites</a> 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 <a href="https://github.com/googlesamples/google-services/tree/master/android/appinvites">here</a>.</p><br /><br /><h3>Predicting User spend and churn in games</h3><br /><br /><p>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.</p><br /><br /><br /><p>The <b>churn</b> 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.</p><br /><br /><p>Additionally, the <b>spend</b> 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.</p><br /><br /><h3>Fused Location Provider Updates</h3><br /><br /><p>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.</p><br /><br /><p>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.</p><br /><br /><h3>Maps API Improvements</h3><br /><br /><p>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 <a href="https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.OnPolygonClickListener?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">onClickListener</a> for <a href="https://developers.google.com/maps/documentation/android-api/shapes#polygon-events?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">polygons</a>, so you can easily add transparent polygons and intercept the taps directly. We’ve also added on click listeners to <a href="https://develoeprs.google.com/maps/documentation/android-api/shapes#polyline-events?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">polylines</a> and <a href="https://developers.google.com/maps/documentation/android-api/groundoverlay#overlay-events?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">ground overlays</a>.</p><br /><br /><p>Here’s how you can use a listener to detect a click on a polygon:</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> map.setOnPolygonClickListener(new GoogleMap.OnPolygonClickListener() { <br /> @Override <br /> public void onPolygonClick(Polygon polygon) { <br /> ... <br /> } <br /> }); <br /></code></pre><br /><br /><p>Info windows now also offer an <FONT FACE="Courier New"><a href="https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.OnInfoWindowCloseListener?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">OnInfoWindowCloseListener</a></FONT> and an <FONT FACE="Courier New"><a href="https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.OnInfoWindowLongClickListener?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">OnInfoWindowLongClickListener</a></FONT>. 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.</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> mMap.setOnInfoWindowCloseListener(new GoogleMap.OnInfoWindowCloseListener() {...}); <br /></code></pre><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> mMap.setOnInfoWindowLongClickListener(new GoogleMap.OnInfoWindowLongClickListener() {...}); <br /></code></pre><br /><br /><P>For more details, and an example that uses these, see the ApiDemos sample on <a href="https://github.com/googlemaps/android-samples/tree/master/ApiDemos">GitHub</a> and check out the <a href="https://github.com/googlemaps/android-samples/commits/master/ApiDemos">historical changes</a> to this sample, so you can see how the new APIs work. Also see the <a href="https://developers.google.com/maps/documentation/android-api/releases?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">Release Notes.</a></P><br /><br /><H3>Support for Aztec bar codes</h3><br /><br /><p>In <a href="http://android-developers.blogspot.com/2015/08/google-play-services-78-lets-see-whats.html">Google Play services 7.8</a>, we launched Vision APIs that supported <a href="http://android-developers.blogspot.com/2015/08/face-detection-in-google-play-services.html">face</a> and <a href="http://android-developers.blogspot.com/2015/08/barcode-detection-in-google-play.html">barcode</a> detection. One bar code format we didn’t support was <a href="https://en.wikipedia.org/wiki/Aztec_Code">Aztec bar codes</a>, so with Google Play services 8.4 we’ve now added support for these.</p><br /><br /><p>Applications using BarcodeDetector in its default configuration (no barcode format restrictions) will automatically start decoding AZTEC codes.</p><br /><br /><h3>Background Beacon Scanning</h3><br /><br /><p>With Google Play services 8.4, the <a href="https://developers.google.com/nearby/messages/overview?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">Nearby Messages API</a> now supports background scanning for <a href="https://developers.google.com/beacons/?hl=en?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">Eddystone</a>, the open beacon format from Google. With this update, your app can be woken up when a BLE beacon is sighted. Back in July, <a href="http://android-developers.blogspot.com/2015/08/google-play-services-78-lets-see-whats.html">Google Play Services 7.8</a> 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.</p><br /><br /><p><br />New methods that we’ve added include a <FONT FACE="Courier New">subscribe</FONT> method for background beacon subscriptions where BLE scans are triggered at screen-on events; an associated <FONT FACE="Courier New">unsubscribe</FONT> event; and the ability to handle intents that you get when the Nearby API calls back during a background subscription.</p><br /><br /><h3>Fitness Platform HistoryApi Improvements</h3><br /><br /><p>We now support consistent step counts across the Google Fit app, other fitness apps and Android Wear watch faces with the <FONT FACE="Courier New">HistoryApi.readDailyTotal()</FONT> method. Please see the following documentation for more detail:<br /><a href="https://developers.google.com/fit/android/history#read_daily_total_data?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">https://developers.google.com/fit/android/history#read_daily_total_data?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog</a></p><br /><br /><p>We also have a new <a href="https://developers.google.com/android/reference/com/google/android/gms/fitness/HistoryApi?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">HistoryApi</a>.updateData() method. This method allows you to update data in one API call without having to delete and insert with two calls.</p><br /><br /><h3>Place Picker Autocomplete Widget</h3><br /><br /><p>Today we are announcing the mobile autocomplete widget, the latest addition to our existing set of programmatic autocomplete features on <a href="https://developers.google.com/places/android-api/autocomplete?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">Android</a> and <a href="https://developers.google.com/places/ios-api/autocomplete?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">iOS</a>, as well as the addition of Autocomplete to our <a href="https://developers.google.com/places/android-api/placepicker?utm_campaign=play services_series_launch_121815&utm_source=anddev&utm_medium=blog">place picker</a> 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 <a href="http://googlegeodevelopers.blogspot.com/2015/12/autocomplete-widget-and-updated-place.html">this</a> blog post.</p><br /><br /><img itemprop="image" src="https://i.ytimg.com/vi/-xwKQa9Tm5k/maxresdefault.jpg" style="display:none;width:10px"><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-71778913804610563502015-12-17T13:55:00.000-08:002016-02-07T05:13:22.772-08:00The Learning Continues! New lessons for Advanced Android course<p><i>Posted by <a href="https://plus.google.com/b/108967384991768947849/+JoannaGSmith/posts">Joanna Smith</a>, Developer Advocate</i></p><br /><br /><p>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 <a href="https://www.udacity.com/course/ud855">Advanced Android App Development course</a> teaches you how to add a Place Picker to your app so that users can pick a nearby location without having to type anything.</p><br /><br /><p>The Advanced Android App Development course, built by Udacity in conjunction with Google, is a follow-up course to <a href="https://www.udacity.com/course/ud853">Developing Android apps</a>. 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.</p><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/yMmSLJaXIZw" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><br /><p>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.</p><br /><br /><p><br />After all, why build an app if you can’t get it to your users?<br /><br><br /><a href="https://www.udacity.com/course/ud855">Get started now</a>, because it's going to be awesome!</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-53170888060881279792015-12-16T15:13:00.000-08:002016-02-07T05:13:22.737-08:00Invitation: Your Ultimate 31-Course Holiday Banquet<p><i>Posted by Shanea King-Roberson, Program Manager</p></i><br /><br /><p>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?</p><br /><center><br /><a href="https://www.udacity.com/google" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMho9LkZt7oWEed1RHQuhtAVreW7fJhQILHLKBs2R07-xYHnMRav22cP1UTeZpilobbkeCkY1di1OCajrkgOq_Pm0uLbEoaXTYHW4Ud4nVf8zxvXA43O9vLOsFBZGZVty4BZbrT2pbh9jm/s400/circular+course+images+sm+%25281%2529.png" /></a><br /></center><br /><h3>Android</h3><br /><br /><p>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!</p><br /><br /><ul><br /> <li><a href="https://goo.gl/HpgjfS">Android For Beginners</a></li><br /> <li><a href="https://goo.gl/2hT7Ue">Developing Android Apps</a></li><br /> <li><a href="https://goo.gl/FDkaOs">Advanced Android</a></li><br /><li><a href="https://goo.gl/w7eO3r">Material Design for Android Developers</a></li><br /> <li><a href="https://goo.gl/VMNFme">Google Location Services on Android</a></li><br /> <li><a href="https://goo.gl/nDvPw9">Analytics & Tag Manager for Android</a></li><br /> <li><a href="https://goo.gl/DbubwX">Monetize Your Android App with Ads</a></li><br /> <li><a href="https://goo.gl/wDWaEC">Add Google Maps to your Android App</a></li><br /> <li><a href="https://goo.gl/X2BLhc">Add Google Sign-In to your Android Apps</a></li><br /><li><a href="https://goo.gl/ZE4mYQ">Android Wear Development</a></li><br /> <li><a href="https://goo.gl/kklWlR">Android TV and Google Cast Development</a></li><br /> <li><a href="https://goo.gl/fMx1f9">Android Auto Development</a></li><br /><li><a href="https://goo.gl/7wXAos">Gradle for Android and Java</a></li><br /> <li><a href="https://goo.gl/27i1M9">Android Performance</a></li><br /> <li><a href="https://goo.gl/sEUDZc">UX Design for Mobile Developers</a></li><br /></ul> <br /><br><br /><h3>Web</h3><br /><br /><p>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.</p><br /><br /><ul><br /> <li><a href="https://goo.gl/J3Vnsu">Web Tooling and Automation</a></li><br /> <li><a href="https://goo.gl/ImJ9YN">Building High Conversion Web Forms</a></li><br /> <li><a href="https://goo.gl/jS8Isz">Browser Rendering Optimization</a></li><br /><li><a href="https://goo.gl/07BoEV">Responsive Web Design Fundamentals</a></li><br /> <li><a href="https://goo.gl/rAAUVW">Responsive Images</a></li><br /> <li><a href="https://goo.gl/OMFg0H">Web Performance Optimization</a></li><br /> <li><a href="https://goo.gl/zKksmr">Mobile Web Development</a></li><br /> <li><a href="https://goo.gl/c92I5u">HTML5 Game Development</a></li><br /></ul> <br /><br><br /><h3>Cloud and Backend</h3><br /><br /><p>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.</p><br /><br /><ul><br /> <li><a href="https://goo.gl/Qi9DJ5">Firebase Essentials for Android</a></li><br /> <li><a href="https://goo.gl/N8HIZp">Developing Scalable Apps in Python</a></li><br /> <li><a href="https://goo.gl/x08iKM">Developing Scalable Apps in Java</a></li><br /></ul> <br /><br><br /><h3>Entrepreneurship</h3><br /><br /><p>Start the year with a new start up. That says it all. Take these courses to learn how to do it successfully.</p><br /><br /><ul><br /> <li><a href="https://goo.gl/0MjZgo">Product Design</a></li><br /> <li><a href="https://goo.gl/rjta3A">App Monetization</a></li><br /> <li><a href="https://goo.gl/rkS1jI">Rapid Prototyping</a></li><br /><li><a href="https://goo.gl/P7YU5D">App Marketing</a></li><br /> <li><a href="https://goo.gl/UUr4gJ">Get Your Startup Started</a></li><br /></ul> <br /><br /><p>And that’s it. 31 courses that will catapult your skills and make 2016 your best year yet! <br />Happy Holidays!</p><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-19529686917782990772015-12-14T11:34:00.000-08:002016-02-07T05:13:22.699-08:00Leveraging product flavors in Android Studio for hermetic testing<p><i>Posted by <a href="https://plus.google.com/+JoseAlcerreca">Jose Alcérreca</a>, Developer Programs Engineer and <a href="https://plus.google.com/+WojtekKalicinski">Wojtek Kaliciński</a>, Developer Advocate</p></i><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/vdasFFfXKOY" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><br /><p>During our recent talk at Android Dev Summit, we discuss the state of testing on Android on the example of a simple Notes application that we created as part of our testing <a href="https://www.code-labs.io/codelabs/android-testing/index.html#0">codelab<a href="https://youtu.be/vdasFFfXKOY?t=5m38s"></a></a>. In one section of the talk, we discuss the problem of test flakiness and introduce a simple solution for setting up a <b>hermetic testing</b> environment.</p><br /><br /><h3>Combatting flaky tests</h3><br /><br /><p>UI tests with frameworks like Espresso or UI Automator can easily get flaky if the application has external dependencies that can sometimes fail or take long to respond. In short, flaky tests are tests that are not reliable (they can pass or fail randomly) which defeats the whole purpose of having tests in the first place.</p><br /><br /><p>A common solution to this problem is hermetic testing or, in other words, making sure that your tests are isolated from dependencies. Using fake implementations or fake servers that just return predefined data is a common way of dealing with this problem. Here are some good examples:</p><br /><br /><ul><br /> <li>Network calls can be made via a fake API client or fake server that immediately returns data from files stored on disk instead of hitting the network. This bypasses the network's latency and flakiness as well as any errors originating on the real server.</li><br /> <li>Interactions with low-level framework APIs (especially those for accessing hardware, like camera or storage) can be passed through an intermediate interface. A fake implementation of this interface could return immediately, providing a reference to preloaded data, such as an image, without relying on the hardware. </li><br /> <li>Any sensors can be replaced with fakes too: GPS, microphone, accelerometer etc., giving you a chance to test on data that would be difficult to provide for the test in real life, like a preset location or a set of inputs simulating a gesture.</li><br /></ul> <br /><br /><p>Dependency Injection (DI) is a software design pattern that facilitates testing, reusing modules and making them interchangeable. DI frameworks can help you deal with the boilerplate associated with this pattern but it can take a considerable amount of time to set them up and understand how they work. Before you are ready to commit to one of those frameworks for your app, you might want to explore an easier way, especially if your project requirements are simple.</p><br /><br /><h3>Managing dependencies with product flavors</h3><br /><br /><p><a href="http://developer.android.com/tools/building/configuring-gradle.html#workBuildVariants?utm_campaign=android studio_series_feature_121415&utm_source=anddev&utm_medium=blog">Product flavors</a> is a powerful feature of Android Studio and our Android Gradle plugin that lets you swap Java classes at compile time and doesn't require additional libraries. Some typical examples of flavor dimensions are:</p><br /><br /><br /><ul><br /> <li><b>free/paid flavors</b> to generate two different APKs that will be released on your distribution channels</li><br /> <li><b>stable/experimental</b> to keep experiments in a different source set and generate beta versions quickly</li><br /></ul> <br /><br /><p>We can leverage the same mechanism to create two separate versions of our app to help with hermetic testing:</p><br /><ul><br /> <li><b>prod</b> - uses real implementation of services and components, using real data and resources</li><br /> <li><b>mock</b> - for a version that contains fake implementations of dependencies that are hard to test</li><br /></ul> <br /><br /><p>The procedure is very simple:</p><br /><OL TYPE=1><br /><LI>Create the flavors in your app/build.gradle file.<br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> android { <br /> productFlavors { <br /> mock { <br /> applicationIdSuffix = ".mock" <br /> } <br /> prod <br /> } <br /> } <br /></code></pre><br /><LI>Create two directories: app/src/prod and app/src/mock<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUYmTgz9CT76AeJaogaVlRecfNuKBpemCwe51PQ9l9PH70GPR5kFj_QTqK-o9t1f2que0121Q79Byn-2FbEszDiw9x3mxtc1kDtHvr1kPGljOdHWMwLBTrXTkfal_7WRCgU8Iwt8iPQdHy/s1600/image02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUYmTgz9CT76AeJaogaVlRecfNuKBpemCwe51PQ9l9PH70GPR5kFj_QTqK-o9t1f2que0121Q79Byn-2FbEszDiw9x3mxtc1kDtHvr1kPGljOdHWMwLBTrXTkfal_7WRCgU8Iwt8iPQdHy/s640/image02.png" /></a></div><br /><LI>Create the class that you want to use for production code in the <code>prod/java</code> folder or move it from <code>main/java.</code> Make sure the <code>main/java</code> folder does not contain this class.<br /><LI>Create the same class (with the exact same class and file name) in the mock/java folder, but providing a different (fake) implementation that will be used for tests.<br /><LI>In the <b>Build Variants</b> window in Android Studio, choose the variant that you want to install or run tests against. A variant is the combination of a flavor and a build type.<br /></OL><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_E1eR2ZIsFSlDR_kmKGc_vQ9GTcdyWqZ3IXdSy72au7702fTvISuYaGDtl3AYhpbshWYAO7pmyHRhypvmGZ8z_LeQsVFBPFAQ2IiqqwxDZtyS6DTh_UypkFXBobRoLNax7a_y021axZUb/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_E1eR2ZIsFSlDR_kmKGc_vQ9GTcdyWqZ3IXdSy72au7702fTvISuYaGDtl3AYhpbshWYAO7pmyHRhypvmGZ8z_LeQsVFBPFAQ2IiqqwxDZtyS6DTh_UypkFXBobRoLNax7a_y021axZUb/s640/image01.png" /></a></div><br /><p>Note: In gradle, the task names change when you add flavors. Instead of installDebug, you will now have to choose <code>installProdDebug</code> or <code>installMockDebug.</code></p><br /><br /><h3>Running your tests</h3><br /><br /><p>With the prod and mock flavors configured and your mock implementation in place, you can now use the following gradle tasks to choose how your tests should run:</p><br /><br /><ul><br /> <li><code>connectedMockDebugAndroidTest</code> will merge the <code>androidTest</code> and <code>androidTestMock</code> directories and run every test found in the resulting source set. As these tests are run in a hermetic way, they will be faster and less flaky. This is ideal for a pre-submit check.</li><br /> <li><code>connectedProdDebugAndroidTest</code> will use the real APIs and sensors so they might fail from time to time. If you have a Continuous Integration system, this task could be executed every night or used manually as a acceptance end-to-end test. Note that this task will run the tests in <code>androidTest</code> even if <code>androidTestProd</code> doesn't exist.</li><br /></ul><br /><br /><p>You can refer to our <a href="http://www.code-labs.io/codelabs/android-testing/index.html#0">Android Testing Codelab</a> to see how we used this method to provide different Injection class implementations, the one in <a htps://github.com/googlecodelabs/android-testing/blob/master/app/src/prod/java/com/example/android/testing/notes/Injection.java"><a href="https://github.com/googlecodelabs/android-testing/blob/master/app/src/prod/java/com/example/android/testing/notes/Injection.java">prod</a></a> providing real data and the other (<a href="https://github.com/googlecodelabs/android-testing/blob/master/app/src/mock/java/com/example/android/testing/notes/Injection.java">mock</a>) serving fake dependencies that use fake data for isolated test execution.</p><br /><br /><p>When you’re happy with your hermetic setup, you might want to give more flexibility to your build process and add even more dimensions to be able to interchange different components in your app. While the method discussed above is suitable for simple projects, for more complex situations it would be much better to invest some time to learn about and add a Dependency Injection framework to your project.</p><br /><br /><br /><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-5106477926667490992015-12-11T10:43:00.000-08:002016-02-07T05:13:22.733-08:00One tap sign-up and automatic sign-in without password entry using Smart Lock<p><i>Posted Steven Soneff, Product Manager, Google Identity</i></p><br /><br /><p><i>More than 30 percent of users signing in to the <a href="https://play.google.com/store/apps/details?id=com.netflix.mediaclient">Netflix app</a> on Android no longer have to enter a password thanks to <a href="https://developers.google.com/identity/smartlock-passwords/android/">Google’s Smart Lock for Passwords.</a> <a href="https://developers.google.com/identity/casestudies/netflix-smartlock-casestudy.pdf">Learn more</a></p></i><br /><br /><p>It’s been six months since the <a href="http://googledevelopers.blogspot.com/2015/05/introducing-google-identity-platform.html">launch of Smart Lock for Passwords</a> and we are thrilled with the impact it has made in getting users signed back in to many of their favorite apps. Million of users have been seamlessly signed in using saved accounts for over 40 major apps when going from one Android device to another or from Chrome to Android and vice versa. This first wave of developers have realized that removing the friction of sign-in increases user re-engagement, monetization opportunities, and cross-device analytics, improving the value and experience of their users.</p><br /><br /><p>The <a href="https://play.google.com/store/apps/details?id=com.nytimes.android&hl=en">New York Times</a> has seen 80 percent of their new sign-in events assisted by Smart Lock. Meanwhile, the Netflix customer support team found over a 20 percent reduction in support cases related to account recovery for their Android user base. Users strongly choose to stay signed in across their devices with over 60 percent opt-in to save sign-in info for major Smart Lock-enabled apps. And many of these developers were able to realize these gains with less than a day’s work by making only client-side changes to their app. To learn more about Smart Lock for Passwords, visit our <a href="https://developers.google.com/identity/smartlock-passwords/android/overview">developer site.</a></p><br /><br /><h3>What’s New</h3><br /><br /><p><br />With the latest release of Google Play services, we’ve made some enhancements to the Smart Lock for Passwords API to help you sign up new users or sign existing users in more quickly. Using the new <a href="https://developers.google.com/identity/smartlock-passwords/android/retrieve-hints">method to retreive sign-in "hints"</a>, your users will see a dialog with a list of email addresses that they can select in a single tap:</p><br /><br><br /><center><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Klyw_zqF7KrPlRX9CSGRoHAqHHlRofjPvl0X4Qy6uBCqE0TVqM1_rA6OZClcRgwFi25cgBDlWEVOgZty0uEphLKGuYLGWNGDjLZmH_yk72o2ZkWtf-TN4nH_PAKrNopUglhtuVxz75TK/s1600/image01.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Klyw_zqF7KrPlRX9CSGRoHAqHHlRofjPvl0X4Qy6uBCqE0TVqM1_rA6OZClcRgwFi25cgBDlWEVOgZty0uEphLKGuYLGWNGDjLZmH_yk72o2ZkWtf-TN4nH_PAKrNopUglhtuVxz75TK/s320/image01.png" /></a><br /></center><br /><br /><p>This new experience is particularly important with Android Marshmallow’s runtime permissions model. To simplify and improve the user experience, this dialog doesn’t require device permissions and includes any email addresses that the user has saved with Smart Lock, not just the accounts on the device. This means that you can improve your sign-in and sign-up flows so that most of your users never need to type their email address. Apps using this dialog have seen nearly three-quarters of users select an entry shown, improving sign-up rates.</p><br /><br /><p>Next, after the user has tapped and shared their email address, with some server-side support, a sophisticated app can fully tailor the sign-in flow. By using the email address, you can check your database to see if a user has already registered for an account. You can then intelligently render either the sign-in or sign-up screens with the user’s email address, name and profile photo pre-filled.</p><br /><br /><h3>Skipping the Password Altogether</h3><br /><br /><p>It’s possible to do even better: if the user chooses a Google account from the dialog, an OpenID Connect <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/credentials/IdToken">ID Token</a> is provided. This can save your app from having to verify email addresses for new accounts or <a href="https://developers.google.com/identity/smartlock-passwords/android/idtoken-auth">skip the password</a> altogether for returning users. ID tokens are also used by <a href="https://developers.google.com/identity/sign-in/android/">Google Sign-In</a> to authenticate in place of a password, and are a strong assertion from Google that the owner of the given email address is present. If users on your site recover their passwords by email, then an ID token from Google is giving you the same assertion that the user owns the email address and is signed in to this device with that email address. You can also consider presence of ID token in addition to the password a signal to prevent password cracking and abuse.</p><br /><br /><p>We’ve found that the majority of users on Android use the email address that’s signed in on their device as their account for third-party apps, so this means seamlessly signing in most of your returning users, or creating a new account with one tap!</p><br /><br /><h3>Code Samples and User Flow</h3><br /><br /><p>Here’s a recap of how to streamline your app’s sign-in flow:</p><br /><br><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUhuqAVFZ6xFSk_TeaDIMjZuGDjrWPzr8SzaTmLzxrkHS6_s2pwG6Pmw6w7lTlPTEKFLlnFrdcjHQI1QtdWml7njdBBBuq3cY9_dP7xsK48NZRy-uRQ_W0yBV1gCoxfbCaPUjDSRmB_jBp/s1600/image02.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUhuqAVFZ6xFSk_TeaDIMjZuGDjrWPzr8SzaTmLzxrkHS6_s2pwG6Pmw6w7lTlPTEKFLlnFrdcjHQI1QtdWml7njdBBBuq3cY9_dP7xsK48NZRy-uRQ_W0yBV1gCoxfbCaPUjDSRmB_jBp/s640/image02.png" /></a><br /><br /><p>When your app starts, <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/credentials/CredentialsApi.html#request(com.google.android.gms.common.api.GoogleApiClient,%20com.google.android.gms.auth.api.credentials.CredentialRequest)">request</a> stored Smart Lock credentials, and go straight to the user’s content when possible. Create a request for password or Google credentials, then listen for a callback with the results. Sign in immediately if stored user credentials (username / password, ID token, etc.) is available.</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> CredentialRequest request = new CredentialRequest.Builder() <br /> .setSupportsPasswordLogin(true) <br /> .setAccountTypes(IdentityProviders.GOOGLE) // you can add other identity providers, too <br /> .build(); <br /> Auth.CredentialsApi.request(mCredentialsApiClient, request).setResultCallback( <br /> new ResultCallback<CredentialRequestResult>() { <br /> public void onResult(CredentialRequestResult result) { <br /> if (result.getStatus().isSuccess()) { <br /> handleCredential(result.getCredential()) // sign in automatically! <br /></code></pre><br /><br /><P>When the user wants or needs to sign in with their email address, show the picker to help them input it. Create a request for hints, pass control to the system to display UI, and handle the result when the user selects an entry.</P><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> HintRequest hintRequest = new HintRequest.Builder() <br /> .setEmailAddressIdentifierSupported(true) <br /> .setAccountTypes(IdentityProviders.GOOGLE) <br /> .build(); <br /> PendingIntent intent = Auth.CredentialsApi.getHintPickerIntent(mCredentialsApiClient, <br /> hintRequest); <br /> startIntentSenderForResult(intent.getIntentSender(), RC_HINT, null, 0, 0, 0); <br /> ... <br /> onActivityResult(int requestCode, int resultCode, Intent data) { <br /> switch (requestCode) { <br /> case RC_HINT: <br /> if (resultCode == RESULT_OK) { <br /> Credential hint = data.getParcelableExtra(Credential.EXTRA_KEY); <br /> handleCredential(hint); <br /></code></pre><br /><br /><br /><P>The result from the hint request will contain the user’s selected identifier and an ID token if it is a Google account on the device. If you use the ID token, you must send and verify it on your server for security. Note that this token will also include a claim if the email address is verified, so you can skip any email verification step. If no token is present, or you can’t do server-side validation, just pre-fill the email field for the user.</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> handleCredential(Credential credential) { <br /> if (!credential.getIdTokens().isEmpty()) { <br /> credential.getIdTokens().get(0).getIdToken(); // send the ID token string to your server <br /> } else { <br /> // otherwise, try fill the sign-in form fields and submit if password is available <br /> mEmailField.setText(credential.getId()); <br /> mPasswordField.setText(credential.getPassword()); <br /></code></pre><br /><br /><p>On your server, after validating the ID token, use it to create an account or sign the user in without need for their password. Google provides <a href="https://developers.google.com/identity/sign-in/android/backend-auth#using-a-google-api-client-library">libraries to do token validation</a>, or you can use an open-source implementation. The ID token contains the user’s email address, and you can look it up in your database to determine whether an account needs to be created.</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory) <br /> .setIssuer("https://accounts.google.com") <br /> .setAudience(Arrays.asList(String.format("android://%s@%s", <br /> SHA512_HASH, PACKAGE_NAME))) <br /> .build(); <br /> ... <br /> GoogleIdToken idToken = verifier.verify(idTokenString); <br /> if (idToken == null) { <br /> Log.w(TAG, "ID Token Verification Failed, check the README for instructions."); <br /> return; <br /> } <br /> GoogleIdToken.Payload payload = idToken.getPayload(); <br /> Log.d(TAG, "IdToken:Email:" + payload.getEmail()); <br /> Log.d(TAG, "IdToken:EmailVerified:" + payload.getEmailVerified()); <br /> // based on the email address, determine whether you need to create account <br /> // or just sign user in <br /></code></pre><br /><br /><p>Then save the user’s email address credential “hint” in Smart Lock for automatic sign-in next time. Simply call the Credentials API <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/credentials/CredentialsApi#save(com.google.android.gms.common.api.GoogleApiClient,%20com.google.android.gms.auth.api.credentials.Credential)">save</a> method with the hint and either set the user-entered password, or set the account type if you logged the user in with an ID token.</p><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> Credential credential = new Credential.Builder(hint) <br /> // if you signed in with ID token, <br /> // set account type to the URL for your app (instead of a password field) <br /> //.setAccountType("https://yourdomain.com") <br /> .setPassword(password) <br /> .build(); <br /> Auth.CredentialsApi.save(mCredentialsApiClient, credential).setResultCallback( <br /> new ResolvingResultCallbacks<Status>(this, RC_SAVE) { <br /></code></pre><br /><br /><h3>Learn More</h3><br /><br /><p>To learn more about the basics of a Smart Lock API integration, check out our <a href="https://www.code-labs.io/codelabs/android-smart-lock/index.html#0">code lab</a> for a step-by-step guide. We’re excited to make authentication without passwords possible via Smart Lock and are looking forward to a world where not only credentials can be managed more effectively, but apps can get their users signed in and up quickly and securely without the friction of typing usernames and passwords. We’d love to hear <a href="http://j.mp/authfeedback">your feedback</a> or <a href="https://stackoverflow.com/questions/tagged/google-smartlockpasswords">questions</a>!</p><br /><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-66266415134153664202015-12-10T13:26:00.000-08:002016-02-07T05:13:22.764-08:00Android Studio 2.0 Preview: Android Emulator<div dir="ltr" style="text-align: left;" trbidi="on"></div><br /><i>Posted by, <a href="https://www.google.com/+JamalEason">Jamal Eason</a>, Product Manager, Android</i><br /><br /><div class="separator" style="clear: both; text-align: center;"><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOG3DtHZ50vWcEXtTQbucdWU1Aek8mlH8MlhKc7JdalPf8DF1pZoHRuokWHzaRFRa5nq6pLa2uvj60npZFF5NfQjEY8wvzXQneNXyrxQ6fCJtTpqUN1qWfluaKOf69b94t4lBkCRzMdhj3/s1600/logo_android_studio_512dp.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOG3DtHZ50vWcEXtTQbucdWU1Aek8mlH8MlhKc7JdalPf8DF1pZoHRuokWHzaRFRa5nq6pLa2uvj60npZFF5NfQjEY8wvzXQneNXyrxQ6fCJtTpqUN1qWfluaKOf69b94t4lBkCRzMdhj3/s160/logo_android_studio_512dp.png" /></a></div><br /><br /><p>An early preview of the new Android Emulator is now available to try out. As a part of Android Studio 2.0, the latest version of the Android Emulator can help you test your app on a wide range of screens size and configurations beyond the physical Android hardware you use to test.Moreover, using the official Android emulator enables you to test with latest Android versions. Building on this foundation, the top two benefits of new Android emulator are:</p><br /><br /><ul><br /><li><br /><b>Speed & Performance:</b> When emulating the latest Android 6.0 release (Marshmallow), we now support <a href="http://developer.android.com/training/articles/smp.html?utm_campaign=android studio_series_android_emulator_preview_121015&utm_source=anddev&utm_medium=blog">Symmetric Multi-Processing</a> and have made significant I/O improvements in both the emulator and ADB. This means you will have faster performance when you are testing your app.<br /></ul><br /></li><br /><ul><br /><li><br /><b>Usability & User Interface:</b> The new Android Emulator includes a brand new user interface to make the emulator easy to use. You no longer have to rely on command-line parameters to use the Android emulator. Common tasks and emulator features are now just a mouse click or a keyboard shortcut away. <br /></ul><br /></li><br /><p>We previewed the user interface at the <a href="https://youtu.be/xdItHEVfQ4U?t=12m49s">Android Dev Summit</a>. You can try it out today along with the new version of ADB for faster APK installation and file transfers to the emulator. Check out the video for a demonstration of the new Android Emulator.</p><br /><br><br /><center><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/fs0eira2pRY?start=1800" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><i><center>Android Dev Summit 2015: Emulator Demo</i></center><br /></center><br /><p>We are seeking early feedback to continue to deliver the experience and features that will make you more productive.</p><br /><br /><h3>Performance Improvements</h3><br /><h4 style="margin-top:1em;">CPU Performance</h4><br /><br /><p>Android Studio now uses CPU acceleration on x86 emulator system images by default. Combined with new <a href="http://developer.android.com/training/articles/smp.html?utm_campaign=android studio_series_android_emulator_preview_121015&utm_source=anddev&utm_medium=blog">Symmetric Multi-Processor</a> (SMP) support in Android 6.0 Marshmallow system images, the Android emulators can perform even faster than many physical Android devices. Multi-core support not only makes your apps and the emulator run faster but it provides the added advantage of speeding up common developer tasks such as installing APKs. Also, with SMP you can test apps that specifically target multi-processor Android devices. </p><br /><br /><h4>Faster ADB</h4><br /><br /><p>In addition to faster CPU speeds in the emulator, there are a number of under-the-hood improvements that will make the experience faster. One of the bottlenecks in the development process that we worked on is the speed of pushing data between Android Studio and your device using ADB (<a href="http://link">Android Debug Bridge</a>). When you use Android 6.0 Marshmallow and higher system images with the new Android Emulator, you can now push files across ADB up to five times faster than a real device. This will help you if you push large APK or files during your app development cycle. </p><br /><br /><br /><h3>User Interface</h3><br /><br /><h4 style="margin-top:1em;">Toolbar</h4><br /><br /><p>The new interface exposes some of the most common emulator actions in a new toolbar and control panel instead of solely relying on command line options. For the preview, the Android Emulator toolbar enables actions, such as volume control, screen rotation, and screen-shots of the emulator window.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjVomRqTmBFHzmxAVSrv6-dTT9its4VzaAeom3bDP-V2MHczJVZPeg6gd-IsMp-dm1wBRr2PO0n8GcABr9XEpdOV3b2YyE3B7-Iiwwdb3rTDug4C15ZNe3orBprDuAcZtP2azEyPVHSmN/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqjVomRqTmBFHzmxAVSrv6-dTT9its4VzaAeom3bDP-V2MHczJVZPeg6gd-IsMp-dm1wBRr2PO0n8GcABr9XEpdOV3b2YyE3B7-Iiwwdb3rTDug4C15ZNe3orBprDuAcZtP2azEyPVHSmN/s640/image01.png" /></a></div><br /><br /><h4>Window Zooming & Scaling</h4><br /><p>Now you can resize your window simply by dragging a corner. You can also zoom and scroll to get a closer look at a portion of your screen.</p><br /><br /><center><br /><table border="1" style="background-color:#FFFFFF;border-collapse:collapse;border:1px solid #FFFFFF;color:#000000;width:60%" cellpadding="3" cellspacing="3"><br /> <tr><br /> <td><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMjUhRZR1_9liQwyu-UoWV-SxSS56LEnBcmriWq-6ZM6d0d-OA0tTCt-AGwCU4KnFryOFxejiDSKsZ74ATObrKDRdml70J6pEKH3CVuJiachla0vVsW7CypeIm8BXdeNqao38Hk2TvWfxg/s1600/image05.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMjUhRZR1_9liQwyu-UoWV-SxSS56LEnBcmriWq-6ZM6d0d-OA0tTCt-AGwCU4KnFryOFxejiDSKsZ74ATObrKDRdml70J6pEKH3CVuJiachla0vVsW7CypeIm8BXdeNqao38Hk2TvWfxg/s320/image05.gif" /></a></div></td><br /> <td><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiAjgbygKmeQObXvKb-wzMF2WgsD2jUv7VrB6zBeseuXaMVLQ18POmBEUO20p2s07gqdxmSOlu4YQ5tKON6aFqJrgtthp81nbiGWwlvd_NFPCQybj0_sA5CYZ7wlFZb1J7v_20sWEqqWPP/s1600/image04.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiAjgbygKmeQObXvKb-wzMF2WgsD2jUv7VrB6zBeseuXaMVLQ18POmBEUO20p2s07gqdxmSOlu4YQ5tKON6aFqJrgtthp81nbiGWwlvd_NFPCQybj0_sA5CYZ7wlFZb1J7v_20sWEqqWPP/s320/image04.gif" /></a></div></td><br /> </tr><br /></table><br /></center><br /><br /><center><i>Left: Zooming</i></center><center><i>Right: Window Scaling</i></center><br /><br /><br /><h4>Drag & Drop</h4><br /><p>With the new emulator, you can not only drag and drop APKs for quick installation, but you can also drag and drop any file to your emulator’s internal SD card to help in testing.</p><br /><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN9fTqzWCUUt2i4ZwHgBbRbzwWMSitJKi312K1kF3XVdMTOcphN81L9byb9v6bk7N3boVCHci24LPRJ094zuIKnQoW3O63HUjRrQ4xPndDCREwu7fLXPq4g4-uodWUcCMUAz5SrqJMM9-A/s1600/image03.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN9fTqzWCUUt2i4ZwHgBbRbzwWMSitJKi312K1kF3XVdMTOcphN81L9byb9v6bk7N3boVCHci24LPRJ094zuIKnQoW3O63HUjRrQ4xPndDCREwu7fLXPq4g4-uodWUcCMUAz5SrqJMM9-A/s320/image03.gif" /></a></div><br /><i><center>Drag and Drop Files</center></i><br /><br /><h4>Extended UI Controls</h4><br /><p>In the extended controls window, additional options help you validate and test features in your app. As shown below, you can initiate a range of emulator actions such as making a virtual call, sending a virtual SMS, or controlling the power level of the emulator. You can additionally send a single GPS location point to the emulator or play back a custom set of KML or GPX points as well. </p><br /><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQwf8XPac3Z4GCsSE6P3wbc1r7UVkI7qIG2ayimiJBxOyINLrUqpcU2z2V6c0EV9TzjElNaYzrjZVkuM-ZDJdEajRIQQ_bgWIB7pv6LLGHCio0WRS5UFOusyG_Jmh-FbtFIHhFb2DmPDY7/s1600/image07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQwf8XPac3Z4GCsSE6P3wbc1r7UVkI7qIG2ayimiJBxOyINLrUqpcU2z2V6c0EV9TzjElNaYzrjZVkuM-ZDJdEajRIQQ_bgWIB7pv6LLGHCio0WRS5UFOusyG_Jmh-FbtFIHhFb2DmPDY7/s640/image07.png" /></a></div><br /><i><center>Phone Controls</i></center><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_6bpXEbcolHwunrSwdHbkXNayw1pSdxf5KTzxaKVLxrn5nMnofIBFEGFqk7fGyCLaltQs52zL3h6us8O5OrGD28OUh_x0PF_ncNle9-S8XxfrKVrGemYT0e8AfIaEP7lv7yaPPyXKLGB/s1600/image02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit_6bpXEbcolHwunrSwdHbkXNayw1pSdxf5KTzxaKVLxrn5nMnofIBFEGFqk7fGyCLaltQs52zL3h6us8O5OrGD28OUh_x0PF_ncNle9-S8XxfrKVrGemYT0e8AfIaEP7lv7yaPPyXKLGB/s640/image02.png" /></a></div><br /><i><center>Battery Controls</i></center><br /><p>We are continuing to add more functionality and we will keep you up to date as we add more features.</p><br /><br /><h3>What's Next & Setup</h3><br /><p>This is just the beginning of developments on the Android Emulator, so expect more features such as support more APIs levels, and adding more sensors with future versions of Android Studio. The new emulator along with Android Studio are available today on the Android Studio canary channel and tools preview channel.</p><br /><br /><p><a href="http://tools.android.com/tech-docs/emulator">Click here</a> for details on how to setup the preview of the new Android Emulator.</p><br /><p>We appreciate your feedback. Connect with us, the Android Studio development team, on <a href="https://plus.google.com/communities/114791428968349268860">Google+</a>.</p><br /><br /><img style="display:none" itemprop="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiAjgbygKmeQObXvKb-wzMF2WgsD2jUv7VrB6zBeseuXaMVLQ18POmBEUO20p2s07gqdxmSOlu4YQ5tKON6aFqJrgtthp81nbiGWwlvd_NFPCQybj0_sA5CYZ7wlFZb1J7v_20sWEqqWPP/s800/image04.gif" />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-62117860678322039312015-12-09T08:42:00.000-08:002016-02-07T05:13:22.757-08:00Android Developer Story: SGN game ‘Cookie Jam’ increases user conversions with Store Listing Experiments<p><i>Posted by Lily Sheringham, Google Play team</i></p><br /><br /><p>Founded in 2010, <a href="https://play.google.com/store/apps/developer?id=SGN&hl=en_GB">SGN</a> is a Los Angeles based mobile game developer with hit titles including <a href="https://play.google.com/store/apps/details?id=air.com.sgn.cookiejam.gp&hl=en_GB">Cookie Jam</a>, Panda Pop, Juice Jam and Book of Life: Sugar Smash. They now have more than 200 employees and are one of the fastest growing cross-platform gaming developers.</p><br /><br /><p>SGN used Store Listing experiments to test multiple variants across their portfolio of games. For Cookie Jam, they saw an 8 percent increase in conversions simply by changing the background color of their app icon. They also saw increased installs following tests with the <a href="https://play.google.com/store/apps/details?id=com.sgn.pandapop.gp&hl=en_GB">Panda Pop</a> app icon and by changing the character in their Book of Life: <a href="https://play.google.com/store/apps/details?id=air.com.sgn.bookoflife.gp&hl=en_GB">Sugar Smash</a> app icon.</p><br /><br /><p>Watch Josh Yguado, Co-founder and President of SGN, and Matthew Casertano, SVP of Game Operations, talk about how using Store Listing Experiments helped SGN improve their ROI, conversion rates and gamer retention.</p><br /><br><br /><!--[Interactive video] --><iframe width="557" height="370" " frameborder="0" src="https://www.youtube.com/embed/9m6MoBM-sFI?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 80px;" allowfullscreen></iframe><br /><br><br /><p>Find out more about <a href="https://support.google.com/googleplay/android-developer/answer/6227309">how to run tests on your Store Listing</a> to increase installs and achieve success with the new guide to <a href="https://developer.android.com/distribute/googleplay/guide.html">‘Secrets to App Success on Google Play’</a>.</p><br /><br /><br /><br />Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-50227689851771369712015-12-02T13:32:00.000-08:002016-02-07T05:13:22.726-08:00API Updates for Sign-In with Google<p><i>Posted by <a href="https://plus.google.com/b/108967384991768947849/+LaurenceMoroney">Laurence Moroney</a></i></p><br /><br /><p>With the release of <a href="http://android-developers.blogspot.com/2015/11/whats-new-in-google-play-services-83.html?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">Google Play services 8.3</a>, we’ve made a lot of improvements to Sign-In with Google. In the first <a href="http://android-developers.blogspot.com/2015/11/improvements-to-sign-in-with-google.html?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">blog post</a> of this ongoing series, we discussed the user interface improvements. Today, we will look further into the changes to the API to make building apps that Sign-In with Google easier than ever before.</p><br /><br /><h3>Changes to basic sign in flow</h3><br /><p>When building apps that sign in with Google, you’ll notice that there are a lot of changes to make your code easier to understand and maintain. </p><br /><br /><p>Prior to this release, if you built an app that used Sign-In with Google, you would build one that attempted to connect to a GoogleApiClient. At this point the user was presented with an account picker and/or a permissions dialog, both of which would trigger a connection failure. You would have to handle these connection failures in order to sign in. Once the GoogleApiClient connected, then the user was considered to be signed in and the permissions could be granted. The process is documented in a <a href="https://io2015codelabs.appspot.com/codelabs/sign-in#5">CodeLab here.</a></p><br /><br /><p>Now, your code can be greatly simplified.</p><br /><br /><p>The process of signing in and connecting the GoogleApiClient are handled separately. Signing in is achieved with a <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInOptions.Builder#GoogleSignInOptions.Builder()?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">GoogleSignInOptions</a> object, on which you specify the parameters of the sign in, such as scopes that you desire. Here’s a code example:</p><br /><br /><pre style="font-family:arial;font-size:12px;border:0px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"><code style="color:#000000;word-wrap:normal;"> GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) <br /> .requestEmail() <br /> .build(); <br /></code></pre><br /><br /><p>Once you have a GoogleSignInOptions object, you can use it to configure the GoogleApiClient:</p><br /><br /><p>Here’s where your code will diverge greatly in the new API. Now, if you want to connect with a Google Account, instead of handling errors on the GoogleApiClient, you’ll instead use an intent that is initialized using the client.</p><br /><br /><pre>Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);<br />startActivityForResult(signInIntent, RC_SIGN_IN);</pre><br /><br /><p>Starting the intent will give you the account picker, and the scopes permission dialog if your GoogleSignInOptions requested anything other than basic scope. Once the user has finished interacting with the dialogs, an OnActivityResult callback will fire, and it will contain the requisite sign-in information.</p><br /><br /><style type="text/css"><br />pre.CICodeFormatter{<br /> font-family:arial;<br /> font-size:13px;<br /> width:99%;<br /> height:auto;<br /> overflow:auto;<br /> background:#f0f0f0;<br /> line-height:20px;<br /> <br /> padding:0px;<br /> color:#000000;<br /> text-align:left;<br />}<br />pre.CICodeFormatter code{<br /> color:#000000;<br /> word-wrap:normal;<br />}<br /></style><br /><pre class="CICodeFormatter" ><code class="CICodeFormatter"> @Override <br /> public void onActivityResult(int requestCode, int resultCode, Intent data) { <br /> super.onActivityResult(requestCode, resultCode, data); <br /> // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...); <br /> if (requestCode == RC_SIGN_IN) { <br /> GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data); <br /> handleSignInResult(result); <br /> } <br /> } <br /></code></pre><br /><br /><p><br />You can learn more about this code in the <a href="https://developers.google.com/identity/sign-in/android/sign-in?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">Integrating Google Sign-In quickstart,</a> or by looking at the <a href="https://github.com/googlesamples/google-services/tree/master/android/signin/app/src/main/java/com/google/samples">sample code.</a></p><br /><br /><h3>Silent Sign-In</h3><br /><p>To further reduce friction for users in a multi-device world, the API supports <a href="https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/GoogleSignInApi#silentSignIn(com.google.android.gms.common.api.GoogleApiClient)?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">silent sign in</a>. In this case, if your user has given authorization to the app on a different device, the details will follow their account, and they don’t need to re-give them on future devices that they sign into, unless they deauthorize. An existing sign-in is also cached and available synchronously on the current device is available.</p><br /><br /><p>Using it is as simple as calling the silentSignIn method on the API.</p><br /><br /><pre>OptionalPendingResult<GoogleSignInResult> opr = <br /> Auth.GoogleSignInApi.silentSignIn(mGoogleApiClient);</pre><br /><br /><p>Then, you can check the isDone() method on the pending result -- and if it returns true, the user is signed in, and you can get their status from the PendingResult. If it isn’t then you have to wait for a callback with the SignInResult</p><br /><br /><style type="text/css"><br />pre.CICodeFormatter{<br /> font-family:arial;<br /> font-size:13px;<br /> width:99%;<br /> height:auto;<br /> overflow:auto;<br /> background:#f0f0f0;<br /> line-height:20px;<br /> <br /> padding:0px;<br /> color:#000000;<br /> text-align:left;<br />}<br />pre.CICodeFormatter code{<br /> color:#000000;<br /> word-wrap:normal;<br />}<br /></style><br /><pre class="CICodeFormatter" ><code class="CICodeFormatter"> if (pendingResult.isDone()) { <br /> doStuffWith(pendingResult.get()); <br /> } else { <br /> // There's no immediate result ready, displays some progress indicator and waits for the <br /> // async callback. <br /> showProgressIndicator(); <br /> pendingResult.setResultCallback(new ResultCallback<GoogleSignInResult>() { <br /> @Override <br /> public void onResult(@NonNull GoogleSignInResult result) { <br /> updateButtonsAndStatusFromSignInResult(result); <br /> hideProgressIndicator(); <br /> } <br /> }); <br /> } <br /></code></pre><br /><br /><h3>Customizing the Sign-In Button</h3><br /><p>When building apps that Sign-In with Google, we provide a SignInButton object that has the Google branding, and which looks like this:</p><br /><br><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpJD5LXWb4mQ4olU9QqndLK2Pm79A8IGbt41uWPpW4KJ8R-xmUfSDode9xYfSRAXJJmLvmZsuZDtt5o7QjergjVsbeeI75jKJm2z7LaOquMGiFNMEYENWT60LD26REXgj6ujXArHpixqic/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpJD5LXWb4mQ4olU9QqndLK2Pm79A8IGbt41uWPpW4KJ8R-xmUfSDode9xYfSRAXJJmLvmZsuZDtt5o7QjergjVsbeeI75jKJm2z7LaOquMGiFNMEYENWT60LD26REXgj6ujXArHpixqic/s640/image00.png" /></a></div><br /><br /><p>You can customize this button with a number of properties and constants that are documented in the API <a href="https://developers.google.com/android/reference/com/google/android/gms/common/SignInButton?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">here</a>.</p><br /><br /><p>The branding guidelines are available <a href="https://developers.google.com/identity/branding-guidelines?utm_campaign=chrome_update_sign-in_with_google_120215&utm_source=anddev&utm_medium=blog">here</a>, and they include versions of the buttons in PNG, SVG, EPS and other formats in many resolutions, including all the different states of the button. These files may be used for localization of the button, and if you need to match the style of the button to your app, guidelines are provided.</p><br /><br /><p>This only deals with the Android side of your app. You’ll likely have a server back end, and you may want to use the credentials on that securely.</p><br /><br /><p>In the next blog post, we’ll discuss how to use Sign-In with Google in server-side scenarios, including how to securely pass your credentials to your own server, and how to use Google back-end services, such as Google Drive, with the permission and credentials from users.</p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-20473169302760476572015-11-23T08:00:00.000-08:002016-02-07T05:13:22.705-08:00Android Studio 2.0 Preview<p><i>Posted by, <a href="https://www.google.com/+JamalEason">Jamal Eason</a>, Product Manager, Android </i></p> <br /><br /><p>One the most requested features we receive is to make app builds and deployment faster in Android Studio. Today at the <a href="https://androiddevsummit.withgoogle.com/">Android Developer Summit</a>, we’re announcing a preview of Android Studio 2.0 featuring Instant Run that will dramatically improve your development workflow. With Android Studio 2.0, we are also including a preview of a new GPU Profiler.</p><br /><br /><p>All these updates are available now in the canary release channel, so we can get your feedback. Since this initial release is a preview, you may want to <a href="http://tools.android.com/download/studio/canary">download</a> and run an additional copy of Android Studio in parallel with your current version.</p><br /><br><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/oBV2U4w89_A" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><h2>New Features in Android Studio 2.0</h2><br /><br /><h3>Instant Run: Faster Build & Deploy</h3><br /><p>Android Studio’s instant run feature allows you to to quickly see your changes running on your device or emulator.</p><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/AefJXhCxrK8" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom:1em; margin-left: 50px;" width="560"></iframe><br/><br /><p>Getting started is easy. If you create a new project with Android Studio 2.0 then your projects are already setup. If you have a pre-existing app open <b>Settings/Preferences</b>, the go to <b>Build, Execution, Deployment → Instant Run.</b> Click on <b>Enable Instant Run...</b> This will ensure you have the correct gradle plugin for your project to work with Instant Run.</p><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0etXgdPr5UGMECrFX7VlmmA_hWk-QeNDkw006D1WlIsJJPCuQdKT7RDdrG3MMfI0YmPZHDOa8ICbQYlBXOVC0wr_-PF3MG9uGT5DuWdPMA1FXkrfIK43WVlffobHUxW04dK6b18sH-XC5/s1600/image03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0etXgdPr5UGMECrFX7VlmmA_hWk-QeNDkw006D1WlIsJJPCuQdKT7RDdrG3MMfI0YmPZHDOa8ICbQYlBXOVC0wr_-PF3MG9uGT5DuWdPMA1FXkrfIK43WVlffobHUxW04dK6b18sH-XC5/s640/image03.png" /></a></div><br /><p><i><center>Enable Instant Run for Android Studio projects</center></i></p><br /><br /><p>Select <b>Run</b> as normal and Android Studio will perform normal compilation, packaging and install steps and run your app on your device or emulator. After you make edits to your source code or resources, pressing <b>Run</b> again will deploy your changes directly into the running app.</p><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1hbuZuOOYuKDBtw1Zr9cy7pYt7b0ccsyY1iZ8tnOSL1I6QceUzj8cEZ7i01tBPP1JP9xRS52OF6mM7LRWdRAd95vPtRPVnO2k3G-v4KUhQtVYg1ip5Kv124d2HvU9w2SlCU2HhRi7ULut/s1600/image05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1hbuZuOOYuKDBtw1Zr9cy7pYt7b0ccsyY1iZ8tnOSL1I6QceUzj8cEZ7i01tBPP1JP9xRS52OF6mM7LRWdRAd95vPtRPVnO2k3G-v4KUhQtVYg1ip5Kv124d2HvU9w2SlCU2HhRi7ULut/s640/image05.png" /></a></div><br /><p><i><center>New Run & Stop Actions in Android Studio for Instant Run</center></i></p><br /><p>For a more detailed guide setup and try Instant Run, click <a href="https://sites.google.com/a/android.com/tools/tech-docs/instant-run">here</a>.</p><br /><h3>GPU Profiler</h3><br /><p>Profiling your <a href="http://developer.android.com/guide/topics/graphics/opengl.html?utm_campaign=android_update_android_studio_2_112315&utm_source=anddev&utm_medium=blog">OpenGL ES</a> Android code is now even easier with the GPU Profiler in Android Studio. The tool is in early preview, but is very powerful and not only shows details about the GL State and Commands, you can record entire sessions and walk through the GL Framebuffer and Textures as your app is running OpenGL ES Code.</p><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUelvwd7F13USKPyhmbFmGDmnUhitGFjvWmp7jjMWzhi7KqhQLlQVqbZGDLzXxPpd9eKqW7YYTv7PBg6cfKeuR3NwzjPmh9nyOhkS5gScN6nV8Jx9BboLd3naDd3FXPHenbxqs1hiq7NMg/s1600/image01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUelvwd7F13USKPyhmbFmGDmnUhitGFjvWmp7jjMWzhi7KqhQLlQVqbZGDLzXxPpd9eKqW7YYTv7PBg6cfKeuR3NwzjPmh9nyOhkS5gScN6nV8Jx9BboLd3naDd3FXPHenbxqs1hiq7NMg/s640/image01.png" /></a></div><br /><p><i><center>Android Studio GPU Profiler</center></i></p><br /><p>To get started, first download the <b>GPU Debugging Tools</b> package from the Android Studio SDK Manager. <br /><a href="<br />https://sites.google.com/a/android.com/tools/tech-docs/gpu-profiler">Click here</a> for more details about the GPU Profiler tool and how to set up your Android app project for profiling.</p><br /><h3>What's Next</h3><br /><p>This is just a taste of some of the bigger updates in this latest release of Android Studio. We'll be going through the full release in more detail at the Android Developer Summit (<a href="https://androiddevsummit.withgoogle.com/stream">livestreamed on Monday and Tuesday</a>). Over the next few weeks, we'll be showing how to take advantage of even more features in Android Studio 2.0, so be sure to check back in.</p><br /><p>If you're interested in more Android deep technical content, we will be <a href="https://androiddevsummit.withgoogle.com/stream">streaming</a> over 16 hours of content from the inaugural Android Developer Summit over the next two days, and together with Codelabs, all of this content will be available online after the Summit concludes.</p><br /><p>Android Studio 2.0 is available today on the Android Studio canary channel. Let us know what you think of these new features by connecting with the Android Studio development team on <a href="https://plus.google.com/communities/114791428968349268860">Google+</a>.</p><br /><img itemprop="image" style="display:none" src="https://3.bp.blogspot.com/-vlHcu8_diMs/Vl0DbRhp3mI/AAAAAAAAEiU/gizBSxOkpHw/s600/android-studio-2.0-crop.png">Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-63775318404525123712015-11-19T10:14:00.000-08:002016-02-07T05:13:22.761-08:00Android Studio 1.5<div dir="ltr" style="text-align: left;" trbidi="on"><br /><br /><body><br /><table style="width: 100%;"><br /><tr><br /><td style="vertical-align: top;"><p><i>Posted by, <a href="https://www.google.com/+JamalEason">Jamal Eason</a>, Product Manager, Android </i></p> <br /><br />Android Studio 1.5 is now available in the stable release channel. The latest release is focused on delivering more stability, with most of the enhancements being made under the hood (along with addressing several bugs).<br /><br /> </td><br /><td style="vertical-align: top;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF54_BWR7YLNZOc8zwgCxPJuEVg7ppZxSTClyWK66V50GICHlAE_xMljS9QIsN-cO2Jm5HrVcvt8hIK_ypIF1a80K9XU9kw9GBunMaJXfN_TvwZbxFIwqlOavjXRNem-5m__j7YPrmQMXn/s1600/image01.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF54_BWR7YLNZOc8zwgCxPJuEVg7ppZxSTClyWK66V50GICHlAE_xMljS9QIsN-cO2Jm5HrVcvt8hIK_ypIF1a80K9XU9kw9GBunMaJXfN_TvwZbxFIwqlOavjXRNem-5m__j7YPrmQMXn/s130/image01.png" /></a></div><br /></td></tr><br /></table><br /></body><br /> <br /><br><br /><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/BKU-wmTAPdc" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom: 1em; margin-left: 80px;" width="560"></iframe><br /><br /><br /><p>Some of the specific bug fixes, include the ability to use short names when code-completing custom views.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisXBXtfArYChSl3b_zgDr1I1se0SocqZBuNtl3IH7BKiT2R73tOSRpmk5R_4JI7KNroLV6QObA5FaMQYLlayE_aEf8J-T2IwsaYkDQUm5_in9nApIEjPWZHlTrMaSfu9xtAE4J15-SGOVL/s1600/image03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisXBXtfArYChSl3b_zgDr1I1se0SocqZBuNtl3IH7BKiT2R73tOSRpmk5R_4JI7KNroLV6QObA5FaMQYLlayE_aEf8J-T2IwsaYkDQUm5_in9nApIEjPWZHlTrMaSfu9xtAE4J15-SGOVL/s640/image03.png" /></a></div><br /><br /><p>In addition to the stability improvements and bug fixes, we’ve added a new feature to the memory profiler. It can now assist you in detecting some of the most commonly known causes of leaked activities.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1VqZPMhxVUs9CLJEzWKeNsC8EFgvnKW_ASGWhmnyKZXWVosLSa5DTAESWRxkwIhHtQBN_FJkmj-epc7rejvpzumHIVwC-VZ8F6fF9necV6ZjXikcG4EIHg2oMo37h7ctPIPMYV1ARw_dF/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1VqZPMhxVUs9CLJEzWKeNsC8EFgvnKW_ASGWhmnyKZXWVosLSa5DTAESWRxkwIhHtQBN_FJkmj-epc7rejvpzumHIVwC-VZ8F6fF9necV6ZjXikcG4EIHg2oMo37h7ctPIPMYV1ARw_dF/s640/image00.png" /></a></div><br /><br /><p>There are also several new lint checks. Here's one below which warns you if you are attempting to override resources referenced from the manifest.</p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DYUzXekm1sCpTTRg1K1cOgu-jhKvAnFxm4lWLkZlHqnUpbvPUKU6ymKGLxJ5aoKdfqKFlI3orzEPXwNQ6o7O5iGagylezMvjJVJ-zzzLsOhFgOdaZzKgET5uH0wUeCyXhL0jG579-2mB/s1600/image02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DYUzXekm1sCpTTRg1K1cOgu-jhKvAnFxm4lWLkZlHqnUpbvPUKU6ymKGLxJ5aoKdfqKFlI3orzEPXwNQ6o7O5iGagylezMvjJVJ-zzzLsOhFgOdaZzKgET5uH0wUeCyXhL0jG579-2mB/s640/image02.png" /></a></div><br /><br /><p>If you’re already using Android Studio, you can check for updates from the navigation menu (Help → Check for Update [Windows/Linux] , Android Studio → Check for Updates [OS X]). For new users, you can learn more about Android Studio, or download the stable version from the <a href="http://developer.android.com/sdk/index.html?utm_campaign=android_launch_android_studio_1.5_111915&utm_source=anddev&utm_medium=blog">Android Studio site.</a></p><br /><br /><p>As always, we welcome your feedback on how we can help you. You can also connect with the Android developer tools team via Google+. And don’t worry about what’s in the box from the video. It’s nothing. Really. Forget I mentioned it.</p></div><br /><img itemprop="image" style="display:none" src="https://1.bp.blogspot.com/-xjXIqQujjwQ/Vl0BYJ6eDYI/AAAAAAAAEiI/EVPW95vCte0/s600/android-studio-15.png">Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-60422979754293960742015-11-19T09:05:00.000-08:002016-02-07T05:13:22.753-08:00Android Developer Story: Gifted Mom reaches more mothers across Africa with Android<p><i>Posted by Lily Sheringham, Google Play team</i></p><br /><p><a href="https://play.google.com/store/apps/details?id=com.polabs.demo&hl=en">Gifted Mom</a> is an app developed in Cameroon which provides users with basic, yet critical information about pregnancy, breastfeeding and child vaccinations. The widespread use of Android smartphones in Africa has meant that Gifted Mom has been able to reach more people at scale and improve lives.</p><br /><br /><p>Watch the creators of <a href="https://play.google.com/store/apps/details?id=com.polabs.demo&hl=en">Gifted Mom</a>, developer Alain Nteff and doctor Conrad Tankou, explain how they built their business and launched Gifted Mom on Google Play. They also talk about their plans to grow and help people in other developing countries across the continent in the next three years, in order to ultimately tackle maternal and infant mortality.</p><br /><br /><!--[Interactive video] --><iframe allowfullscreen="" frameborder="0" height="370" src="https://www.youtube.com/embed/Pms0pcyPbAM?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c" style="box-shadow: 3px 10px 18px 1px #999; display: block; margin-bottom: 1em; margin-left: 80px;" width="557"></iframe><br /><br /><p>Find out more about <a href="https://developer.android.com/training/index.html?utm_campaign=android_series_gifted_mom_android_111915&utm_source=anddev&utm_medium=blog">building apps for Android</a> and how to <a href="https://developer.android.com/distribute/?utm_campaign=android_series_gifted_mom_android_111915&utm_source=anddev&utm_medium=blog">find success on Google Play.</a></p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0tag:blogger.com,1999:blog-3030032005344744727.post-43592825590666318502015-11-18T15:13:00.000-08:002016-02-07T05:13:22.716-08:00Hungering for Game Utilities?<p><i>Posted by Alex Ames, Fun Propulsion Labs*</i></p><br /><br /><p><i>Originally <a href="http://googledevelopers.blogspot.com/2015/11/hungering-for-game-utilities.html">posted</a> to the Google Developers blog</i></p><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7aQZ43vRJwf7HSBWEtNxEbLQelcTW3LlgFjkj1f5tKaroodIVW01v_yu7JqquYjxjj99ggIGg_Sn0ULbB0gqtWRynAI0610f0ZixJHSqKUYm23dm_W9cc6Jh0CDaMHqdYk5UT_OER1TQ/s1600/image00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7aQZ43vRJwf7HSBWEtNxEbLQelcTW3LlgFjkj1f5tKaroodIVW01v_yu7JqquYjxjj99ggIGg_Sn0ULbB0gqtWRynAI0610f0ZixJHSqKUYm23dm_W9cc6Jh0CDaMHqdYk5UT_OER1TQ/s400/image00.png" /></a></div><br /><br /><p>At <a href="https://developers.google.com/games/?utm_campaign=play games_launch_zooshi_111915&utm_source=anddev&utm_medium=blog#Tools">Fun Propulsion Labs</a> we spend some of our time building sample games to help demonstrate how to make easy-to-build, performant, cross-platform games. With the growth of <a href="https://www.google.com/get/cardboard/">Google Cardboard</a>, we got to work and over many long evenings, feeding our animal hunger on sushi, we came up with <a href="https://play.google.com/store/apps/details?id=com.google.fpl.zooshi">Zooshi</a>. Zooshi is an <a href="https://github.com/google/zooshi">open source</a>, cross-platform game written in C++ which supports:</p><br /><br /><ul><li>Android, Android TV, Windows, OSX, and Linux</li><br /><li>Google Cardboard</li><br /><li>Google Play Games Services sign-in and leaderboards on Android</li><br /><li>Level customization</li></ul><br /><br /><p>Zooshi serves as a demonstration of how to build Android games using a suite of newly released and updated open source game technologies from Google:</p><br /><br /><ul><li><a href="http://google.github.io/motive">Motive</a> drives our Animation system, giving life and movement to the characters and environment. </li><br /><li><a href="http://google.github.io/corgi">CORGI</a>, the Component Oriented Reusable Game Interface, is an Entity-Component system designed to allow users to define complicated game objects as collections of modular, custom-defined behaviors.</li><br /><li><a href="http://google.github.io/flatui">FlatUI</a> is a straightforward immediate mode GUI system with a light footprint that makes building up user interfaces a breeze.</li><br /><li><a href="http://google.github.io/scene_lab">Scene Lab</a> allows designers to design levels and edit entities from right in the game without needing to use an external editor.</li><br /><li><a href="http://google.github.io/breadboard">Breadboard</a> provides an easy to use node based scripting system for editing entity behaviors that's accessible to designers without deep knowledge of programming.</li><br /><li><a href="http://google.github.io/fplbase">FPLBase</a> is a cross-platform API layer, for abstracting low-level tasks like reading input and creation of graphical contexts.</li></ul><br /><br /><p>As in our previous release, <a href="http://googledevelopers.blogspot.com/2015/05/pie-in-your-face-without-mess.html">Pie Noon</a>, we also made extensive use of <a href="http://android-developers.blogspot.com/2014/06/flatbuffers-memory-efficient.html">Flatbuffers</a>, <a href="http://google-opensource.blogspot.com/2014/11/geometry-math-library-for-c-game.html">Mathfu</a>, <a href="http://android-developers.blogspot.com/2014/11/utilities-for-cc-android-developers.html">fplutil</a>, and <a href="http://blog.chromium.org/2010/09/webp-new-image-format-for-web.html">WebP</a>.</p><br /><br /><p>You can download the game in the <a href="https://play.google.com/store/apps/details?id=com.google.fpl.zooshi">Play Store</a> and the latest open source release from our <a href="https://google.github.io/zooshi">GitHub page</a>. We invite you to learn from the code to see how you can apply these libraries and utilities in your own Android games. Take advantage of our <a href="https://groups.google.com/forum/#!forum/zooshi">discussion list</a> if you have any questions, and don’t forget to toss some sushi around while you’re at it!</p><br /><br /><p><i>* Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.</i></p>Anonymoushttp://www.blogger.com/profile/15741967073103218431noreply@blogger.com0