WELCOME TO EHOST.COM.NP

Wednesday, November 22, 2017

Google Dives Deep Into the New Google Play Services APIs

ads space

Version 11.6 of the Google Play services SDK — Google’s development kit for the Play Store — is packed to the brim with new features. In an effort to brace folks for the changes, the search giant published an article on migrating to the new APIs earlier this year. And in a new post on the Android Developers blog, it highlighted the many ways in which the SDK tweaks application behavior.

GoogleApi and Task, which replace the GoogleApiClient access pattern in the new Google Play services SDK, were designed to “reduce boilerplate, improve UX, and simplify authentication and authorization,” Google Developers Programs Engineer Sam Stern wrote in a blog post. In previous versions of the SDK, GoogleApiClient connected to Google Play’s servers only when all of the APIs were available and when the user had signed in, assuming the APIs required it. Over time, Google realized that this model had a number of pitfalls:

  • Any connection failure prevented the use of any of the requested APIs, but using multiple GoogleApiClient objects was unwieldy.

  • The concept of a “connection” was inappropriately overloaded. Connection failures could result from Google Play services authentication issues.

  • The developer had to track the connection state, because making some calls before onConnected was called resulted in a crash.

  • Making a simple API call could mean waiting for two callbacks: One to wait until the GoogleApiClient was connected, and another for the API call itself.

To alleviate a few of the issues that developers ran into, Google Play Services SDK version 11.6.0 introduces updated APIs. “Each API now has a purpose-built client object class that extends GoogleApi,” Stern explained. “Unlike with GoogleClientApi there is no performance cost to creating many client objects. Each of these client objects abstracts the connection logic, connections are automatically managed by the SDK in a way that maximizes both speed and efficiency.”

Here’s a list of them:

  • Auth – updated the Google Sign In and Credentials APIs.

  • Drive – updated the Drive and Drive Resource APIs.

  • Fitness – updated the Ble, Config, Goals, History, Recording, Sensors, and Sessions APIs.

  • Games – updated the Achievements, Events, Games, Games Metadata, Invitations, Leaderboards, Notifications, Player Stats, Players, Realtime Multiplayer, Snapshots, Turn Based Multiplayer, and Videos APIs.

  • Nearby – updated the Connections and Messages APIs.

The APIs join Awareness, Cast, Places, Location, and Wallet, and other APIs that separated from the Google Play connection process in earlier versions of the SDK. With any luck, they’ll serve as a more modular, flexible replacement of GoogleApiClient.

That’s not all. Here’s a few of benefits you can expect from the new Google Play services SDK:

  • No connection logic, calls that require a connection are queued until a connection is available. Connections are pooled when appropriate and torn down when not in use, saving battery and preventing memory leaks.

  • Sign in is completely separated from APIs that consume GoogleSignInAccount which makes it easier to use authenticated APIs throughout your app.

  • Asynchronous API calls use the new Task API rather than PendingResult, which allows for easier management and chaining.

For a more thorough breakdown of the SDK and instructions on how to implement it, head to the source link.


Source: Android Developers Blog

ads space
ADS SPACE

0 comments:

Post a Comment

Categories

Article How-to All Posts WordPress Android Web design Blogger Plugins CSS Google JQuery Plugins Programming Reviews Web Hosting Blogger Blogging Blogging Tips Tricks Web Development Facebook Git Internet Make Money Online Social Plugins Tips Tips and Tricks Tools Tutorials Windows WordPress Plugins Blogging Tips and Tricks Freebies GSM Google Analytics HTML How To's JavaScript Plugin Development S.E.O SEO SMS SmartPhone Social Media Tips amp; Tricks Top-Most Updates Webmaster Tools Whatsapp Applications Apps Blogger Basics Documentary Downloads Entertainment Gadgets Games Gmail Google AdSense Guest Post IPhone Make Money Blogging SVN Security Softwares Web Hosting Tips and Tricks Wordpress Tips Wordpress Tips and Tricks hostgator iOS Advertising Networks Advertising Technology Affiliates Antivirus Audience amp; Traffic Biography Blog post Blog post Blogger Blogger Errors Blogger Tips Blogger Tools Blogger Widget Blogosphere Bogger Widgets CSS selectors CSS symbols CSS3 Computer amp; Internet Content Writing Coupon Codes Data amp; Analytics Deleted blog Design DoubleClick for Publishers Email and newsletter marketting Email marketing Excel Tips Excel Tips and Tricks Facebook Tricks Feed Feedburner Feedburner subscribers Font Fun GitHub Giveaways Gmail primary inbox Gmail tabs Google sign-in Guides HTML amp; CSS HTML5 Infographics Inspirational Instagram Internet Marketing Internet Tips amp; Tricks Job Listings Knowledge Life Hacks Lists Make-Money Monetization amp; Conversion Monetize Navigation Online Marketing Other PHP Tutorials Passport Publishing amp; Content Quotes RSS Sidebar Smartphones Social Networking Status Tech Tech Blog Technology Telegram Themes UI / UX User Psychology amp; Research VB.Net Web Tools Web browser Widget Windows Tips Windows-10 ad viewability admin notice blogging tools bluehost cherry-pick clone cors custom scrollbar customizer dismissible notices duplicate post feed title git branch git clone gpg gpg2 hybridauth iPad icon font notice responsive wordpress theme same origin policy scrollbar signed git commit smartsvn theme customizer vcs wordpress theme wordpress themes

Blog Archive