Friday, November 23, 2012

[Gd] Migrating to Google Apps just got easier

| More

Google Apps Developer Blog: Migrating to Google Apps just got easier

Ever wondered how to move your organization’s emails from a shared mailbox or a public folder when migrating to Google Apps for Business?

We’ve just launched the Google Apps Groups Migration API that provides Google Apps developers the ability to build tools that can move shared emails from any data source (typically shared mailboxes, public folders and discussion databases) to their domain’s Google Groups discussion archives. Google Groups provides a simple and easy way to ‘tag’ the migrated emails into manageable groups that can be easily accessed by users with group membership.

This new api complements existing Google Groups api’s like Google Apps Provisioning API which can be used to create new groups (to which the shared emails can then be migrated using the newly launched API) and Google Apps Groups Settings API which can be used to control access to the group. The addition of the Google Apps Groups Migration API thus makes the ‘shared folder’ experience seamless even after migration to Google Apps. To learn more and try out this new feature visit Google Developers.


Rishi Dhand profile

Rishi Dhand is a product manager working for the Google apps for business team. In addition to working on data migration features, he also works Google apps administration platform with focus on building new security and admin reporting features. In his free time, he enjoys playing squash and badminton.

URL: http://googleappsdeveloper.blogspot.com/2012/11/migrating-to-google-apps-just-got-easier.html

Tuesday, November 20, 2012

[Gd] Going, going, gone! Apps Script on tablets.

| More

Google Apps Developer Blog: Going, going, gone! Apps Script on tablets.

Anyone else get stuck with fixing their family's computer problems? Recently I had a family technical issue that was actually fun to solve and didn't involve removing malware. My family owns Rasmus Auctioneers, a global auctioneer company based in Alexandria, Virginia. The company uses Google Apps for their entire business workflow, so their documents, calendars, etc. are all connected.

We manage the shipping process on-site using a tablet. In this fast-paced environment and with limited time, we need a quick, easy solution. When an auction ends, the clients fill out a Google Form that saves their shipping and payment information to a Google Spreadsheet. This information then needs to be sent to a specific mover for processing -- but the mover doesn't need all the data, just a few important pieces. All of this needs to happen with as little human intervention as possible.

Our solution was to create an Apps Script within the spreadsheet, which means our new functionality works in the tablets used on the auction floor. The function below runs when the sheet is opened, automatically sorting the sheet to put the newest client on top. A simple dialog determines which data is important for a particular auction; the script then finds the data we need, sends it to the right person, and adds a calendar event as a reminder.

function sendData() {
// Sort the rows
var sheet = SpreadsheetApp.getActiveSheet();
sheet.sort(4);

// What row do we want?
var myValue = Browser.inputBox("What row?");

// Variables
var emailRecipients = "me@mydomain.com";
var emailSubject = "Moving data for ";
var valueToShow = "";

// Get cell values
var clientName = sheet.getRange("B" + myValue).getValue();
var movingDate = sheet.getRange("D" + myValue).getValue();
valueToShow += "Name: " +
sheet.getRange("B" + myValue).getValue() + "\r\n";
valueToShow += "Moving Date: " +
sheet.getRange("D" + myValue).getValue() + "\r\n";
valueToShow += "Size: " +
sheet.getRange("E" + myValue).getValue() + "\r\n";

// Send email
MailApp.sendEmail(emailRecipients, emailSubject + clientName,
valueToShow);

// Add to calendar
CalendarApp.createAllDayEvent("Move today! " + clientName,
new Date(movingDate));
}

Looking at the source code, we can see how we collect the data from the relevant columns, add them to a variable, and in one line send it via Gmail. Adding a reminder to our calendar also takes just one line.

Do you have a repetitive process that bugs you? Wish there was a way to automate something? You might be able to solve your problems the same way I helped out my family -- with Apps Script! Feel free to leave a comment on some ideas or suggestions for future projects.


Tom Fitzgerald profile | blog

Tom Fitzgerald is an engineer for Google at their Mountain View headquarters. While attempting to keep his HTML5 blog up to date he works on various web development side projects. Originally from Maryland he supports the Baltimore Ravens & Orioles!

URL: http://googleappsdeveloper.blogspot.com/2012/11/going-going-gone-apps-script-on-tablets.html

[Gd] Build Chrome Packaged Apps with the MediaGalleries API

| More

Chromium Blog: Build Chrome Packaged Apps with the MediaGalleries API

Many popular applications today help users consume, share, manage, and edit media content, as evidenced by the rise of web apps like Google Play Music and YouTube. For Chrome packaged app developers, the new Media Galleries API introduces a simple way for apps to access media stored on a user’s device (with the user’s permission, of course).

To use the API, you first have to determine what kind of permission your app needs to access user’s media:
  • read-only: allows media content to be read, but not modified 
  • read-write: allows media content to be read and modified 
  • add-files: allows media to be added to the galleries but prevents modifying existing media files. 
Currently, only read-only access is supported. Support for read-write and add-files will be introduced in a future release.

To retrieve media content, use getMediaFilesystems(). If this is the first time your app is accessing the user’s media libraries, the system will prompt the user to grant access:



You can also make your app explicitly ask the user to designate specific galleries. This is useful if, for example, your app is only interested in pictures. Once access is granted, your app can then retrieve a list of LocalFileSystem structures. At that point, you can use the W3C FileSystem API to access the media gallery content.



NOTE: The file system APIs will only return files that the Chrome platform natively supports, and only the asynchronous version of the FileSystem API is currently supported.

We’re eager to see what great applications you will build with the Media Galleries API and the Chrome Packaged Apps platform. To get started, clone our samples repository and look at the Media Galleries sample application. Have questions or comments? Subscribe to chromium-apps and follow us on our Google+ page!

Posted by Joe Marini, Developer Advocate
URL: http://blog.chromium.org/2012/11/build-chrome-packaged-apps-with.html

[Gd] Come see us at OW2Con and be a part of the OpenSocial EU Workshop!

| More

OpenSocial API Blog: Come see us at OW2Con and be a part of the OpenSocial EU Workshop!

We are excited to announce we will be in Paris from November 27-29, 2012 to be a part of OW2Con. OW2Con is the annual conference for the OW2 consortium, which is an open source foundation focusing on open source middleware components. OpenSocial aligns nicely with that, and as such we are excited to be one of the Platinum sponsors for the event. Mark Weitzel, president of the OpenSocial foundation, will be keynoting at the conference on the changing landscape of social business and how open source is a part of it.

In addition, we will be holding a one-day workshop on November 27th, highlighting the shift to Social Middleware components in the industry today. We'll showcase how various companies are adopting this today and how they are doing it, and will provide the opportunity for hands-on demos of the technology and learning how to begin building OpenSocial container objects and leveraging embedded experiences. Learn more about the day's schedule at http://www.ow2.org/view/OW2Con-2012/OpenSocial_Workshop.

Both events are free to be a part of, but advanced registration is requested. You can register for the events at http://www.ow2.org/view/OW2Con-2012/OpenSocial_Workshop_Register . We look forward to seeing everyone there!
URL: http://blog.opensocial.org/2012/11/come-see-us-at-ow2con-and-be-part-of.html

[Gd] Dev Update for Chrome OS

| More

Chrome Releases: Dev Update for Chrome OS

The Dev channel has been updated to 25.0.1324.1 (Platform versions 3196.3.0) for Samsung Chromebooks. This build contains a number of stability fixes.

Release highlights:

  • Fix for an issue which caused users to occasionally be unable to login until the system was rebooted.

If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report an issue...’ in the Chome menu (3 horizontal bars in the upper right corner of the browser).


Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/11/dev-update-for-chrome-os_19.html

[Gd] How It’s Made: Election Info App Part 1

| More

Google Apps Developer Blog: How It’s Made: Election Info App Part 1

In an earlier blog post, we announced the Election Info sample app. We briefly talked about how we were able to use Apps Script to easily create a comprehensive sample application that provided timely voting information. This post shows just how easy it is to use Apps Script to get information from an external API and integrate with various Google services to create a rich web application and provide a meaningful user experience.

UrlFetch

First, we use UrlFetchApp to get JSON from the Google Civic Information API and use Utilities.jsonParse to convert it to a useful javascript object.

var url =
'https://www.googleapis.com/civicinfo/us_v1/voterinfo/2000/lookup';
var address = { "address" : "1263 Pacific Ave. Kansas City KS" };

var options =
{
method : "post",
contentType : "application/json",
payload: Utilities.jsonStringify(address)
};
var responseText = UrlFetchApp.fetch(url, options).getContentText();
var response = Utilities.jsonParse(responseText);

After getting the response object, we can simply drill into it to access various data provided by the API.

Calendar Service

One of the things the response object provides us with is the election date. Using Apps Script's Calendar service, it is really easy to create an event on voting day in the user's calendar with the polling address. First, we create a Date object from the date string. We then create an all-day event on the default calendar on this date, passing along the polling address we get from the response object.

// create a Date object from the response date string 
// ("2012-11-6" --> Date object)
var [year, month, day] = response.election.electionDay.split('-');
// javascript months are zero-indexed
var electionDate = new Date(year, month-1, day);
// get the first polling location's address
var pollAddress = response.pollingLocations[0].address;

var cal = CalendarApp.getDefaultCalendar();
cal.createAllDayEvent("Go Vote!", electionDate, {location:pollAddress});

Maps Service

Using the Maps service, we can generate static maps with the user's home or polling address as shown in the following code snippet. We display these maps on the web app page, then embed them in the reminder email and bring-along document as we will show in the following sections.

var userAddress = response.normalizedInput;
var normalizedAddress = userAddress.line1 + ' ' +
userAddress.city + ', ' +
userAddress.state + ' ' +
userAddress.zip;
// normalizedAddress looks like "501 Kildaire Rd Chapel Hill, NC 27516"
var staticMapUrl = Maps.newStaticMap().setSize(600, 300)
.addMarker(normalizedAddress)
.getMapUrl();

Gmail Service

We also provide a simple method for users to email themselves all of this information. Using the Gmail service, we can send an HTML email that embeds the voting information and the static maps we generated above. The Apps Script documentation contains great tutorials such as the Maps tutorial we used to generate the directions below.

var email = Session.getActiveUser().getEmail();
var body = 'Election Date: ' + electionDate + '<br/>'
+ 'Your polling address: ' + pollAddress + '<br/>'
+ 'Polling Hours: ' + pollingHours + '<br/>'
+ '<img src="' + directions.mapUrl + '"/> <br/>'
+ 'Directions: ' + dirList;
MailApp.sendEmail(email, 'Upcoming Election Voting Information',
'Voting Info', {htmlBody: body});

Document Service

Using the Document service, we were able to easily generate a bring-along document with polling address, hours, and directions. The follow code excerpt shows how easy it is to add different elements like headers, tables, and paragraphs to a document. Apps Script also provides an extensive list of methods to programmatically control the look and presentation of the various elements.

var title = "Voting Information";
var doc = DocumentApp.create(title + " for " + homeAddress);

var reportTitle = doc.appendParagraph(title);
reportTitle.setFontFamily(DocumentApp.FontFamily.ARIAL)
.setFontSize(22).setForegroundColor('#4A86E8')
.setBold(true)
.setAlignment(DocumentApp.HorizontalAlignment.CENTER);
var header = doc.addHeader();
header.appendParagraph('Generated by the Election Info application ' +
'built on Google Apps Script')
.setAlignment(DocumentApp.HorizontalAlignment.CENTER)
.setAttributes({ITALIC : true});

var tableStyle = {};
tableStyle[DocumentApp.Attribute.PADDING_BOTTOM] = 0;
tableStyle[DocumentApp.Attribute.PADDING_TOP] = 0;
tableStyle[DocumentApp.Attribute.PADDING_LEFT] = 0;
tableStyle[DocumentApp.Attribute.PADDING_RIGHT] = 0;
var addressTable = doc.appendTable([
['Your address: ' + homeAddress],
['Your Polling Location: ' + pollAddress],
['']
]).setAttributes(tableStyle);

// add appropriately sized poll location image
addressTable.getCell(1,0).appendImage(pollImg.getBlob())
.setHeight(300).setWidth(600);

// populate last row of the table with polling hours
addressTable.getCell(2,0).clear().appendParagraph("Polling Hours: ");
addressTable.getCell(2,0).appendParagraph(
UserProperties.getProperty(Keys.POLLING_HOURS));

Here is an image which shows the generated bring-along document embedded with static map images from the Maps service.

Apps Script allowed us to easily take information from an external API and tie it into various Google services to provide a great user experience. Stay tuned for an upcoming blog post showing how we created the front end!


Kalyan Reddy profile | Stack Overflow

Kalyan is a Developer Programs Engineer on the Google Apps Script team based in NYC. He is committed to increasing developer productivity by helping them fully utilize the power of Apps Script. In his free time, he enjoys participating in the Maker community and hacking together robots.

URL: http://googleappsdeveloper.blogspot.com/2012/11/how-its-made-election-info-app-part-1.html

Monday, November 19, 2012

[Gd] A safer playground for your Linux and Chrome OS renderers

| More

Chromium Blog: A safer playground for your Linux and Chrome OS renderers

Sandboxing is a layer of security that Chrome places between attackers and their computer, aiming to isolate an attacker who has successfully exploited a vulnerability. When contained in a sandbox jail, an attacker will typically look for porous or fragile bits in the walls to throw rocks at. That is, he’ll try to gain additional privileges by taking advantage of other vulnerabilities. Our job is to make the virtual walls of the sandbox as strong and impenetrable as possible.

One juicy target for attackers is the operating system’s kernel: a large and complex code base. The latest stable version of Chrome introduces a new layer of sandboxing of Chrome renderers for the 64-bit versions of Chrome OS and Linux, based on a new kernel feature called seccomp-bpf. With seccomp-bpf we’ll install a small filter in the kernel that will quickly reject many of the rocks thrown by an attacker. A simple example: if we know that Chrome renderers don’t need a system call such as vmsplice, or a facility such as “inotify”, we can just deny them completely. We use a broker process model to keep the list of allowed system calls small.

Installing this filter in the kernel improves the security of our users. But it is just the beginning: using this new facility, we’ll continue to make the sandbox safer.

This new sandbox layer is automatically baked into the latest version of Chrome OS. On Linux, you can check by going to chrome://sandbox and look for “Seccomp-BPF sandbox Yes”. If this is not available, ask your Linux distribution to include and enable seccomp-bpf in its kernel, as Ubuntu has done since version 12.04.


As always, you can report bugs and issues here, by clicking on “New issue”.

Posted by Julien Tinnes, Software Engineer
URL: http://blog.chromium.org/2012/11/a-safer-playground-for-your-linux-and.html

[Gd] Dev Update for Chrome OS

| More

Chrome Releases: Dev Update for Chrome OS

The Dev channel has been updated to 25.0.1324.1 (Platform versions 3196.1.0 for most platforms and 3196.2.0 for Samsung Chromeboxes) for all Chrome OS devices. This build contains a number of stability fixes.

Release highlights:

  • Pepper Flash updated to releases 11.5.31.105 for new Samsung Chromebooks and 11.5.31.109 for all other platforms
Known issues:
  • Audio on some systems may be distorted when playing a single audio stream for a long period of time, or when playing audio on multiple tabs. (Issue 35464)
  • "Allow proxies for shared networks" is enabled by default. (Issue 157420)
  • New Samsung Chromebook systems may be unable to connect via ethernet in some situations. Workaround: Restart the system with the ethernet connected to the Chromebook.  (Issue 36328)
  • On the Settings tab when modifying your avatar image, or when creating a new user, the camera LED may remain illuminated for several seconds after leaving the page.

If you find new issues, please let us know by visiting our help site or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report an issue...’ in the Chome menu (3 horizontal bars in the upper right corner of the browser).


Danielle Drew
Google Chrome
URL: http://googlechromereleases.blogspot.com/2012/11/dev-update-for-chrome-os.html