Loading
  • Home
  • Home
  • Tech News
  • New Software
  • New game
    • Angry Birds
      • Category
      • Category
      • Category
      • Category
    • Christmas
    • Battlefield 3
    • Jagged Alliance
  • Mobile World
  • Audiovisual
  • High-en PC
  • PC components
  • Vehicle-Life
    • Forum
    • Category
    • Category
    • Category
You are here : Home »
In April, we introduced the Google Docs app for Android, a useful way to view, edit and create documents and spreadsheets on the go. Today, we're extending the availability of this app to 45 additional languages and adding a new Web Clipboard feature that makes it easy to insert photos from your Android phone into a Google document. Learn more on the Google Docs blog and update or download the app today from Android Market.





Posted by Tobias Thierer, Software Engineer
(cross-posted from the Official Google Blog)

For years, shoppers have enjoyed flipping through glossy print catalogs to be inspired, discover new trends and find great products. Today, mobile technologies can make catalog shopping more engaging, social and creative. With that in mind, we’ve created Google Catalogs—a free app for tablet devices that enables you to browse all of your favorite catalogs and interact with new layers of rich-media content.

The Google Catalogs app features digital versions of catalogs across many popular categories, including fashion and apparel, beauty, jewelry, home, kids and gifts. We’ve partnered with a variety of top brands including Anthropologie, Bare Escentuals, Bergdorf Goodman, Crate and Barrel, L.L. Bean, Lands’ End, Macy’s, Neiman Marcus, Nordstrom, Pottery Barn, Saks Fifth Avenue, Sephora, Sundance, Tea Collection, Urban Outfitters and Williams-Sonoma, just to name a few.
With Google Catalogs, you can:
  • Interact: Zoom in to see products up close, tap on tags to learn more about an item or, in some catalogs, view inspiring photo albums and videos.

  • Find products in nearby stores: When an item catches your eye, instantly find it in a store near you or tap “Buy on Website” to visit the merchant online.

  • Express your creativity: Create a collage of your favorite catalog pages and products. If you need inspiration, you can check out collages created by others.

  • Share with friends: Email a product or collage to all your shopping buddies.

  • Get instant access to new catalogs: Add catalogs to your Favorites and get notified each time a new issue arrives.

  • Discover new products and brands: Search for products within or across multiple catalogs to find exactly what you’re looking for.



To download the app on your iPad, visit the App Store. Visit www.google.com/catalogs/about/ to learn more, and stay tuned for Google Catalogs for Android tablets, coming soon! If you’re a merchant and would like to participate in Google Catalogs, tell us about your catalog by filling out this form on our website. Happy shopping!

Posted by Kinnari Jhaveri, Strategic Partner Development Manager, Google Commerce Team
In Chapter 9 of More iPhone Development, we wrote a set of classes that mimicked the behavior of GameKit's peer-to-peer connectivity, but for regular network connections (GameKit's only works with BlueTooth and local network connections). Basically, we wrote a class that lets you send and receive anything that can be packaged into an instance of NSData. Since it's relatively trivial to implement NSCoding for most classes, this means passing objects between two iOS apps (or an iOS and a Mac app) becomes pretty easy. You don't have to poll for the data, or worry about chunking out the data. You just make a method call and pass an NSData instance to send data, and then implement a delegate method for receiving data back from the other end. Life is good, right?

Hmm...

Maybe not. There's a pretty big limitation in the book's implementation. That implementation, designed for passing tiny packets of data (TicTacToe game moves), kept everything in memory. If you try to send a good size image to the other connection, likely you'd run out of memory fairly quickly.

A while back, I faced exactly that situation. For a kiosk app that MartianCraft was writing for a client, I needed to send large images shot with a DSLR camera from a Mac Cocoa program to an iPad program and also needed to send pictures taken with the iPad's camera back to the Mac Cocoa app. These images, compressed, ranged from about one to about five megs. I grabbed the OnlineSession class from More, figuring I had the network code basically done, and watched my application go down in a blaze of… well… not glory, that's for sure. Not only did the iPad run out of memory, it ran out of memory FAST… much faster than I expected. Even sending the smaller iPad camera images often caused low-memory crashes.

There were two basic problems with the OnlineSession class when you try to use it for sending larger volumes of data. First, as I said, was that it relied only on physical memory. Given that the physical limitations of the original iPad, this was problematic. But there was another, much bigger problem.

The second issue was that during the process of chunking up the data to send, the code kept making unnecessary copies of the data. Put simply, I made a n00b mistake. The mistake didn't impact the TicTacToe application because the game moves would easily fit into the send buffer, but it's a mistake I've made before and definitely should've known better.

So, what, specifically, was this mistake, you ask?

Using NSData's regular convenience constructor dataWithBytes:length: when creating the new NSData instance to store the portion of the image that won't fit into the send buffer. If you read the description of dataWithBytes:length:, it very clearly says that it makes a copy of the data you provide. So, every time a packet was sent, the code would create a new NSData instance to hold the remainder that wouldn't fit in the buffer, and it would copy all the remaining unsent data for every packet. Ouch.

So, as a simple example, if we were sending a 5 meg image, and the send buffer was set to 128k, the code would make a 4.825 meg copy after the first packet was sent, then a 4.75 meg copy after the second packet was sent, a 4.265 meg copy after the third packet, and so on. After every packet, another slightly smaller copy of the data was made. A descending progression that would eat up memory fast.

After a lot of swearing at myself, I made some modifications to the class to do two things.

First, I switched to using NSData's dataWithBytes:NoCopy:length:, which uses the provided data in place without making a copy. This kept the memory footprint a lot smaller. In some instances, because the DSLR images were so large and our app needed to send so many, I still hit memory problems. So, the second thing I did was to add filesystem caching of the outbound queue so that all the encoded objects waiting to be sent didn't have to fit in memory for the application to function properly.

The new version of the class functions exactly as the one from the book, so you should be able to just drop-in replace the OnlineSession from Chapter 9 with this one without making any changes to your application code.

You can download the new version right here.
Newer Posts Older Posts Home
  • Recent Posts
  • Comments
Advertisement

Daily Video

Mobile Life | Mobile News | Review Mobile

Blog Archive

  • ►  2012 (40)
    • ►  March (16)
    • ►  February (11)
    • ►  January (13)
  • ▼  2011 (153)
    • ►  December (10)
    • ►  November (18)
    • ►  October (34)
    • ►  September (16)
    • ▼  August (3)
      • The Google Docs app for Android now with Web Clipb...
      • Shop your favorite catalogs with Google Catalogs
      • Online Session Code for Big Objects (Plus a Warning)
    • ►  July (16)
    • ►  June (9)
    • ►  May (20)
    • ►  April (8)
    • ►  March (9)
    • ►  February (8)
    • ►  January (2)
  • ►  2010 (3)
    • ►  December (3)

Page

  • Home

Photos on Flickr

Categories

  • 128*128 (5)
  • 128*160 (7)
  • 128x128 (5)
  • 128x160 (7)
  • 176*208 (5)
  • 176*220 (8)
  • 176x208 (5)
  • 176x220 (8)
  • 240*320 (20)
  • 240x320 (20)
  • 320*240 (2)
  • 320x240 (2)
  • 352*416 (1)
  • 352x416 (1)
  • 360*640 (1)
  • 360x640 (1)
  • 3D (2)
  • android (18)
  • android market (4)
  • Animation (1)
  • App Store (3)
  • Apple (22)
  • Apple HQ (1)
  • appps (1)
  • apps (34)
  • Appsterdam (1)
  • att (1)
  • autocomplete (1)
  • Automobile (1)
  • beta labs (1)
  • BlackBerry (1)
  • Blender (2)
  • blogger (1)
  • Book project (2)
  • Cannonball 8000 (1)
  • card (2)
  • Caveman Cricket (1)
  • cfw (1)
  • CGAffineTransform (2)
  • Circus Extreme Turbo Camels (2)
  • Combat Club 3D (1)
  • Community (1)
  • conferences (10)
  • Core Animation (1)
  • cricket (1)
  • Docs (2)
  • download (20)
  • Driving (1)
  • ebook (1)
  • Exercise (1)
  • facebook (2)
  • Firmware (1)
  • Flash (1)
  • flashlite (1)
  • Flatout3D (1)
  • Football (1)
  • france (1)
  • free (20)
  • free code (1)
  • Fruit Ninja (1)
  • game (21)
  • Game development (1)
  • Game Programming (2)
  • germany (1)
  • GLKit (1)
  • gmail (1)
  • gmail for mobile (1)
  • google (5)
  • google apps for mobile (1)
  • google docs (3)
  • google earth (1)
  • google goggles (4)
  • Google I/O (1)
  • google latitude (1)
  • google local search (1)
  • google maps (2)
  • google maps for mobile (8)
  • google maps navigation (2)
  • Google Mobile Search (1)
  • google offers (2)
  • google search (3)
  • google search app (1)
  • google search by voice (1)
  • google search for mobile (5)
  • google shopper (2)
  • google sites (1)
  • google sync (1)
  • google translate (2)
  • google voice (1)
  • google wallet (3)
  • google+ (1)
  • googlenew (15)
  • Graphics Programming (1)
  • hangouts (1)
  • Harry Potter And The Deathly Hallows Part 1 (1)
  • iBooks (1)
  • image search (2)
  • inside search (1)
  • iOS (6)
  • iOS SDK (2)
  • ipad (4)
  • iphone (8)
  • iPhone 4s (2)
  • iPhone SDK (4)
  • ipod touch (1)
  • italy (1)
  • jad (20)
  • jar (20)
  • java (20)
  • Lost Planet 2 (1)
  • Lux Drops Of Beauty (1)
  • Mac App Store (1)
  • Mac OS X (1)
  • MacBook Air (1)
  • Madagascar 2 Escape To Africa (1)
  • MartianCraft (1)
  • MIsc (1)
  • mobile (23)
  • movies (1)
  • New Category (1)
  • news (30)
  • nexus (2)
  • nfc (1)
  • Nokia (30)
  • nokia software (1)
  • nokia store (1)
  • Nowhere (1)
  • Objective-C (3)
  • Ohter Blogs (1)
  • Oil (1)
  • Open Source (3)
  • OpenGL ES (10)
  • Other blogs (7)
  • ovi (1)
  • Pilgrimage (6)
  • Place Pages for mobile (1)
  • Places (1)
  • poker (1)
  • Puzzlings (1)
  • qt (12)
  • Rant (7)
  • review (1)
  • Rounders Poker (1)
  • Sample Code (4)
  • Security (5)
  • Sensible Soccer Skills (1)
  • Software Development (1)
  • Sola Rola (1)
  • Solitaire Deluxe Jamdat (1)
  • source code (1)
  • spain (1)
  • Speaking (2)
  • sport (2)
  • sprint (1)
  • Steve Jobs (2)
  • tablet (4)
  • The Difference Spot (1)
  • themes (2)
  • Tips (1)
  • Tokio Hotel The Official Mobile Game (1)
  • transit (2)
  • Treadmill Desk (2)
  • tutorials (1)
  • twitter (1)
  • ui (1)
  • uk (1)
  • voice actions (1)
  • voice search (1)
  • WWDC (12)
  • Xcode (1)
  • Xcode 4 (3)

Followers

Alexa Rank

Visitor

2010 Sangtao24 News. All rights reserved.
Designed by Sangtao24 Forum