Google Plus is a native extension to use the Google+’s +1 button. It allows the developer to customize the button, changing its annotation type, size and the overall look. It’s also possible to┬ádecide where to place the button on the screen by specifying x/y coordinates.

The extension has methods to measure the button size, so the application can dynamically adjust the layout to better accommodate the button. After it has been used or is no longer useful, the button can be completely disposed. The extension is compatible with Starling framework.

Sample

// initialize the extension
var _ex:GPlus; = new GPlus();

// add a weblink to receive +1 results
_ex.initializeGPlus("http://www.myappsnippet.com/", 0)

// set the x and y position of the gPlus button
_ex.setGPlusPosition(40, 500);

// set the annotation type of the gPlus button with one of the
// following values: INLINE , BUBBLE , NONE
_ex.annotationType = GPlusEvent.INLINE;

// set the gPlus button size, SMALL , MEDIUM , STANDARD , TALL
_ex.gPlusSize = GPlusEvent.STANDARD;

// to check the gPlus button information you may use gPlusInfo method.
var obj:Object = _ex.gPlusInfo;
for (var name:String in obj) {
    // returns: x , y , width , height , annotationType , size
    trace(name + " = " + obj[name]);
}

// considering that whenever you are interacting with the gPlus button,
// a native dialogs opens, when the focus is returned to the Air app,
// you must call the refresh() so the button will show the changes.
// You simply need to listen to
// NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate);
// and then call the refresh() method:
// if (_ex){
//  _ex.refresh();
// }

// Remove the button 
_ex.removeGPlus();
Air Native Extension, Android . URL.