Profile

Cover photo
Verified name
Ian Barber
Works at Google
Attended University of Sussex
Lives in Brentford, UK
1,364,954 views
AboutPostsPhotosReviews

Stream

Ian Barber

Shared publicly  - 
 
Reading station or some kind of of spaceport? Excellent lunch beforehand with +Lorenzo Alberton and +Ben Gray 
1
Add a comment...

Ian Barber
moderator

Discussion  - 
 
Handy tip from +Michael Stillwell 
 
A quick note on how to localize all Google+ plugins (the sign-in and +1 buttons, etc.)

If you're using the synchronous loader embed an object literal between the opening and closing <script> tags:

    <script src="https://apis.google.com/js/client:plusone.js">{ "lang": "fr" }</script>

If you're using the asynchronous loader set the ___gcfg global variable:

    <script type="text/javascript">
      window.___gcfg = {
        lang: 'fr'
      };

      (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    </script>

Here's the supported language codes:

https://developers.google.com/+/web/api/supported-languages
7
1
Zhaohan Weng's profile photo
Add a comment...
 
Great list - also a massive +1 to gradle daemon, its amazing how much difference those seconds of savings make when you're trying things out (if running tests from the command line etc).
 
Today’s #AndroidDev #Protip from +Stephan Linzner is about improving Gradle build performance.

Gradle, the new build system for Android projects, has been designed for scalability and efficiency. However, there are a few things you, as a developer, can do to significantly improve the performance of Gradle.

1. Incremental Builds. Gradle supports full incremental builds out of the box, which means that it only runs tasks that are not up to date and skips others. Gradle looks at the inputs and outputs of each task to see if any build artifacts have changed and only runs a task if necessary—this significantly increases build performance.

2. Gradle Daemon. [0] The Gradle daemon is a great way to speed up your builds, which is extremely useful when you have to build your application repeatedly. The basic idea is to fork a “daemon” process [1] which can be reused on subsequent builds, rather than launching a new JVM on every build.

The good news is that Android Studio always keeps a Gradle daemon around for you. However, if you build from the command line, you need to tell gradle that you want to use the Gradle daemon. You can use command line arguments [2] to interact with Gradle daemon, but the easiest way is to add a daemon property to your gradle.properties file:

org.gradle.daemon=true

It is also good practice to set this property in $HOME/.gradle/gradle.properties rather than putting it in project root. The reasoning behind this is that you want to avoid using the Gradle daemon on your build servers, where startup time is less important than memory consumption.

3. Parallel Project Execution. [3] Parallel execution can make a significant difference if you are building a very complex project with many sub-projects (for example, Android library projects). Gradle has an in-development Parallel Mode which enables parallel execution of sub-projects that are decoupled. “Decoupled” means that these projects do not access each other's project model. Cross project configurations are a good example of this. Any use of the allprojects {} and subprojects {} closures will result in the projects being coupled. Android Studio does not use Parallel Mode by default, but you can enable it in Preferences > Compiler > Gradle.

Again, if you are using the command line you need to explicitly tell Gradle that you want to use Parallel Mode. To enable it, add the parallel property to your gradle.properties file:

org.gradle.parallel=true

4. Disable pre-dexing on build servers. When running your build on a build server, you may always want to start with a clean build. But this means that you cannot take advantage of Gradle’s incremental nature. To improve incremental builds, the Android Gradle Plugin uses an optimization that pre-dexes all dependencies at first compilation. While this optimization makes subsequent builds faster it makes the first build slower. As this is not what you want, it makes sense to disable pre-dexing to improve performance by setting the preDexLibraries property of the Android Gradle Plugin  to false [4]:

project.android.dexOptions.preDexLibraries=false

For more details on how to disable pre-dexing only on your build server, refer to this tip from +Xavier Ducrohet  goo.gl/2G6hcj

With Android projects becoming increasingly complex and modular development practices becoming more popular, build performance is critical. Only a few seconds per build can make a big difference in productivity.

Do you have any other tips and tricks? Please let us know in the comments.

[0] Gradle Daemon - http://goo.gl/fVoeGC
[1] This process will automatically expire after 3 hours
[2] Gradle Command Line - http://goo.gl/UrDjOA
[3] Parallel Project Execution - http://goo.gl/QuAPoK
[4] Advanced Build Customization - http://goo.gl/3QiCil

#AndroidTools
6
1
Mohammad Mahmodii's profile photoShanee Nishry's profile photo
 
Ok
Add a comment...
 
The understated +Magnus Hyttsten  provides a somber review of the new features in 4.3.
 
This episode of #DevBytes is from +Magnus Hyttsten. He shares all of the latest updates on the latest release of Google Play services 4.3. This update includes new APIs as well as a number of new features to existing ones:

Analytics API (new!) - Google Analytics and Tag Manager are now part of Google Play services

Games services update - Our new Game Gifts API enables games to send virtual in-game requests to anyone in a player’s circles or through player search. 

Drive API - Change notifications, offline content, and more

Address API (new!) - Let your users provide complete addresses in a single click

For more information:
http://developer.android.com/google/play-services/index.html#newfeatures

DevBytes: Google Play Services 4.3

#AndroidDev
5
2
Ade Oshineye's profile photoBenn Sandoval's profile photo
Add a comment...

Ian Barber
moderator

Discussion  - 
 
A lot of people who implemented Google Sign-In (now, or in the past) will have used the "userinfo" API to retrieve email address or profile information. These were deprecated last month and scheduled for shutdown in September, so I wrote a small post on the (few minutes) work needed to shift to the updated scopes and endpoints. 

In particular, please take a look if you implemented Google+ Sign-In, but are still getting the email address from the userinfo endpoint - it's a really easy job to retrieve that from the plus.people.get profile response now, and avoid any issues down the road.
11
17
george oloo's profile photoJustin Grayston's profile photo
Add a comment...

Ian Barber

Shared publicly  - 
 
Very excited to see the ratification of the OIDC standard today, and the support it is getting from Google. Beautifully timed as well with the addition of support for ID tokens to the Node.js Google API client library thanks to +Matt Gaunt (https://github.com/google/google-api-nodejs-client)!
3
1
Chris Cartland's profile photoMd. Azharul Islam's profile photo
 
nice
Add a comment...
 
Very useful resource! 
 
After struggling with trying to figure out how various pieces fit together, I've done some research and put together the complete Android Activity/Fragment lifecycle chart. This has two parallel lifecycles (activities and fragments) which are organized vertically by time. Lifecycle stages will occur in the vertical order in which they're displayed, across activities and fragments. In this way, you can see how your fragments interact with your activities.

In addition to the attached image, I've also got an SVG: http://staticfree.info/~steve/complete_android_fragment_lifecycle.svg which is suitable for printing.

If this is missing lifecycle steps or is inaccurate in any way, let me know so I can update it!

#Android #androiddev  
4
3
Chris Cartland's profile photoDaoli Hsu's profile photo
Add a comment...

Ian Barber

Shared publicly  - 
 
Small update to the Google+ iOS SDK.  It address a very particular issue with how the user is redirected back to some apps.

Most applications follow Apple's recommended bundle scheme of using a reversed domain name format: "com.example.myapp". As part of the validation in Google+ Sign-In you enter this bundle ID in the Google Developers Console, and create a custom URL type matching it. However, if your bundle ID is a single word, like "myapp", then security measures prevent sign in via the web browser from redirecting back to your app (though it worked OK via the Google+ app). 

1.5.1 offers a workaround for this issue with the help of a flag useClientIDForURLScheme. This lets you register your regular bundle ID, but during sign in the dot-reversed version of the client ID will be used.

To use this you'll need to create a second custom URL scheme set to the dot-reversed client ID: "com.googleusercontent.apps.12354678-abcdefg".

Also worth noting that releasing this may have exposed a bug in the new version checking in the 1.5.0 SDK - if you're seeing crashes when using 1.5.0 in the simulator (doesn't affect devices), then try dropping in the 1.5.1 SDK and all should be good!
 
We’re pleased to announce version 1.5.1 of our iOS SDK is available from http://goo.gl/PO8U17

This release has the following changes:
- Added useClientIDForURLScheme
- Bug fixes

Everything you need to update to the latest version of the SDK is at: https://developers.google.com/+/mobile/ios/upgrading-sdk
1
Ade Oshineye's profile photo
 
This might be more discoverable as a blog post. 
Add a comment...

Ian Barber

Shared publicly  - 
 
Quick blog post on migrating off the deprecated userinfo endpoint - if you implemented any sort of Google oauth2 and retrieve profile or email address, please check to make sure you're not going to have a bad time in September!
 
A lot of people who implemented Google Sign-In (now, or in the past) will have used the "userinfo" API to retrieve email address or profile information. These were deprecated last month and scheduled for shutdown in September, so I wrote a small post on the (few minutes) work needed to shift to the updated scopes and endpoints. 

In particular, please take a look if you implemented Google+ Sign-In, but are still getting the email address from the userinfo endpoint - it's a really easy job to retrieve that from the plus.people.get profile response now, and avoid any issues down the road.
7
3
Ade Oshineye's profile photoIvo Encarnação's profile photoNacho Coloma's profile photoJonathan Beri's profile photo
 
You should probably plan for a load of pissed off developers that were not aware of this change when their systems stop working after September. I have seen it happen with the Twitter API and Yahoo login, and Google OAuth2 has much more traction. 

I understand the need to move on, though, and it still seems like the right call.
Add a comment...

Ian Barber

Shared publicly  - 
 
Always enjoy seeing projects which go way beyond what I would have even considered spending the time to do, but result in a something genuinely interesting. Today's example, which popped up on the PECL list a while back, has to be the QB extension (example in the link). 

Its an extension that allows annotating PHP code with C-types, and provides an alternate VM which takes advantage of that for those methods, resulting in significantly faster execution (as values don't get put into zvals), particular for image processing and the like, which is what it is designed to optimise. It also has a bunch pixel functions for transforming colour spaces and so on, and basic matrix functions (which I'd imagine these are also more for image-style problems rather than chunk LA stuff).

Its all on GitHub: https://github.com/chung-leong/qb including very complete documentation: https://github.com/chung-leong/qb/wiki
1
Add a comment...
Story
Tagline
Good morning, Christina
Introduction
Developer advocate for Google+, occasional speaker, and irregular writer.

Writing: 
General Tech Blog - riskcompletefailure.com
PHP Blog - phpir.com
A brief introduction to messaging: the message is the medium 

Some videos of talks: 
Education
  • University of Sussex
Work
Employment
  • Google
    Developer Advocate, 2012 - present
  • Virgin Group
    Development Manager, 2011 - 2012
  • Ibuildings
    Delivery Manager, 2007 - 2010
  • CWT
    Senior Software Developer, 2004 - 2007
  • Iconic Games
    Application Developer, 2002 - 2004
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Brentford, UK
Previously
Brighton
Nice selection of wine, great place for a drink.
Atmosphere: Very goodDecor: Very goodService: Very good
Public - a year ago
reviewed a year ago
Fantastic dim sum, and very reasonably priced. Had an excellent lunch here and would definitely go again!
Food: ExcellentDecor: Very goodService: Very good
Public - a year ago
reviewed a year ago
Probably my favourite pizza in London, always great sourdough bases and superb toppings.
Food: ExcellentDecor: Very goodService: Very good
Public - a year ago
reviewed a year ago
Amazing coffee - really enjoyed the cappuccino and the iced coffee is definitely worth trying! Might have to queue up a bit, but it doesn't take particularly long.
Food: ExcellentDecor: Very goodService: Very good
Public - a year ago
reviewed a year ago
9 reviews
Map
Map
Map
Lovely flat white!
Public - a year ago
reviewed a year ago
Wonderful food, wonderful service, and a great wine list. One of the best places I have ever eaten at, well worth a visit.
Food: ExcellentDecor: ExcellentService: Excellent
Public - a year ago
reviewed a year ago
Very nice French bistro, very nicely cooked food and excellent deserts. Found the service very good (and very French).
Food: ExcellentDecor: Very goodService: Excellent
Public - a year ago
reviewed a year ago