Friday, December 31, 2010

Happy New Year 2011

Wishing you and your family a very happy and prosperous new year 2011. :)

 Happy new year 2011

-- Varun

Thursday, December 30, 2010

[How to] Change the boot screen animation on Android

Smartphones are getting smarter day-by-day with cool new features. Still the best part of any Smartphone is its support for personalization. Android allows you to personalize almost anything and everything on your device. Boot screen animation is no exception. If you are bored with the default boot screen animation on your Android device, you can change it to the one you like. Here is a short tutorial to create new animations or use your favorite video as a boot screen animation. Android boot animation is stored as a zip file (uncompressed) containing the sequence of images used for the animation and a text file containing the meta-information.

 Boot screen animation Sample desc file - desc.txt

Steps to create boot screen animation

  • Preparing the image sequence. Create the animation using multimedia software like Flash. Turn the animation into a sequence of images and name them as “boot_0001.png”, “boot_0002.png”, etc. Flash has the capability to generate image sequence for the animation. To use a video sequence as animation, extract the image sequence from the scene using tools like FFmpeg for windows.
  • Place the images in two directories – part1, part2. The sequence copied inside part1 will be played only once where the one in part2 will be played on a loop until the booting is complete. (This is the commonly used configuration and can be altered via the meta data file)
  • Preparing the meta data. Create a text file and name it as “desc.txt”. This file contains two or more lines of information.
    • First line contains three numbers - width, height and the frames per second. Ex: 480 800 32
    • All the lines except the first one will start with the letter “p” indicating that it is a part of the animation. The line contains three items – count (number of times this part is repeated), pause (number of ms to pause after the last frame of this part), and the path to the directory. Ex: p 1 0 part1. Sample description file is shown in the screenshot above.
  • Packaging & installing the animation. Now that the images and meta-info file are ready, we need to package them into a zip file named “bootanimation.zip”. Note: There must be no compression. Once the zip file is ready, push the file to /data/local/. “adb push bootanimation.zip /data/local/.”. Reboot your device to see the new animation.

-- Varun

[via @xda-developers]

Wednesday, December 29, 2010

[Tech] Insight into Google Instant Previews

Google has launched Instant Previews few days ago – a feature which adds screenshot preview of the page along with the search results. The feature does not seem to add much of value addition to search results (as they claim). Nevertheless, the implementation of the feature is rich enough to add huge value for a web developer. Google has employed some neat techniques to ensure that the performance of the search remains the same with this new feature. If you are a web developer or a person interested in learning cool things, you can continue reading rest of the post. And, if you are frustrated with the previews, you can use this script to turn off the feature.

Techniques involved in Google Instant Previews

JavaScript Compilation. Like any other Google products, Google search also uses a lot of JavaScript. JavaScript is minified and crunched using Google’s Closure Compiler. The JavaScript on the results page is loaded lazily so that it does not interfere with the page load. Also, JavaScript is cached very aggressively on the client-side.

On-demand JSONP.  The result previews are loaded only on-demand whenever the user activates it. The browser needs to make asynchronous call to Google servers to get the previews and render it on the screen. Modern browsers have a restriction on the number of concurrent requests the page can send to any host. To overcome this, Google uses a separate domain for hosting the result previews. (Ex: client1.google.com, client2.google.com). Data can be loaded in different ways using JavaScript:

  • Simple AJAX call (XmlHttpRequestXHR) to the server. XHR gives you good control and error handling becomes easy with it. However, XHR does not allow cross-domain access. Only same-origin requests are permitted (Modern browsers have started to support cross-domain access using cross-origin resource sharing). In the case of Instant Previews, the previews need to be fetched from a different sub-domain “client1.google.com”.
  • JSONP. JSONP is another technique where in the requested script returns the desired data as a JSON object wrapped in a JavaScript callback function. Error handling with JSONP is a bit harder to do than XHR but it is not subject to same-origin restrictions. Read this Wiki article to know about the implementation details of JSONP. Google uses this technique to get the result previews. Things to consider while using JSONP:
    1. If you are adding the script tag directly to the page, some of the browsers may show the page loading icon. To avoid that, wrap the DOM call to insert the script in window.setTimeout() – This will be executed in a separate context.
    2. After your requests come back and the processing is done, set the source of the script tag to null and remove the tag. This will prevent the browser from slowing down because of too many script tags. 

Data URIs. The previews shown are not just plain images streamed from the Google server. The data received from the JSONP calls is actually the image data being sent as set of data URIs. (I have used the same technique in VComment – Visual Comment Engine). Data URIs are base64 encodings of image data, that modern browsers can use to display images, instead of loading them from a server as usual. If you have noticed the previews closely, a bounding box will be added to the preview. The usage of data URIs over static images has made this highlighting easier. Data URIs are gzip-compressed to make them comparable in size to the original JPEGs. Data URIs are also aggressively cached on the client-side. 

More information about these techniques can be found here.

Note: This post was originally written in the last week of November 2010. Just realized that it was sitting on my drafts itself.  Well, better late than never. 

-- Varun

Tuesday, December 28, 2010

Start menu for Google Chrome

Most of you would have been already aware of the fact that Google has launched its Chrome web store recently. If you are using the latest versions of Chrome, you can install apps on your Chrome from the web store. Once the app is installed, you can launch it from the popular “New Tab” page of Chrome. A new section titled “Apps” has been added to the “New Tab” page. This section will show the icons of all the installed apps as Thumbnails. Clicking on the app icon will launch the app. If you have a big list of apps installed on your Chrome, it will become difficult to search for the app and launch it from here. To make it simple, Google has built an extension “App Launcher” which will act as a Windows Start Menu for Chrome.

Apps section of "New Tab" page

App Launcher for Chrome

App Launcher for Chrome is an extension built by Google for launching the apps installed on Chrome. Install the extension from here. The extension will add a browser action icon clicking on the same will show a list of installed apps. From there, you can launch an app by either clicking on it in the list, or using arrow keys to select it and then pressing enter. The search box on top of the list is quite handy. (However, you have to use only lower cases while searching. Looks like a bug). With this extension, you can launch an app from any page without having to open the “New Tab” page.

App Launcher

-- Varun

[via @labnol]

Sunday, December 26, 2010

Know about Windows Phone 7 Internals

Earlier I have posted an article titled “Intro to WebSockets” from the Chennai Geeks Techmeet-3. This is another topic discussed at the meet – Windows Phone 7 Internals. The talk was delivered by Balaji Damodaran from Thoughtworks. He gave an overview about the internals of Windows Phone 7 and some of the interesting facts about WP7. Note: This post is not properly structured. Posting the contents from the talk as it was delivered for the benefit of all.

Windows Phone 7

Windows Phone 7 (WP7) Facts

  • WP7 applications are developed using Microsoft XNA & Silverlight. Microsoft XNA is a set of tools provided by Microsoft for Xbox game development. Silverlight is a framework for building rich internet applications. WP7 supports Silverlight 3.
  • WP7 phones will have three buttons – Back, Home, Search. (Apart from Power, Volume Up / Down)
  • WP7 features a new user interface with its design language named Metro. All applications should follow Metro design and typeface.
  • WP7 phones allow customizing themes to a greater extent. Another interesting feature is its “Live Tiles”.
  • WP7 applications can use Panorama & Pivot controls. With Panorama control, your application can have multiple screens spanned across a single background. If you are an Android user, you can compare this with the home screen of your Android with wallpaper & multiple pages. Pivot control is used for creating tabbed style applications. More about these controls here.
  • WP7 does not have any local data store.(Android users can use SQLLite for storing the user data). All the user data can be stored on local files or on store it on the cloud and stream it via web service. If you want to store settings data, you can store them on the local file system.
    This is a major drawback when compared to Android.
  • Silverlight has good support of Web Services. Few notable things regarding web services are: 1. Web service calls are always asynchronous. 2. Proxy can not be generated on the fly. 3. Custom bindings are not supported. However, Silverlight’s competitor Adobe Flex offers dynamic proxy creation and custom binding.
  • Silverlight supports three modes of data Binding – One Time, One Way, Two Way. More about it here.
  • Application Bar can have a maximum of four buttons and all the buttons should follow Metro UI theme.
  • Application Lifecycle.
    • No multi-tasking. (This is quite weird as the previous versions of Windows mobile used to support multi-tasking).  If you are getting a phone call while you are using an application, your application will not run in the background. The application will be deactivated and the phone call will be activated. This process is called Tombstoning. Its the responsibility of the app developers to save the state of the application whenever the application is tombstoned.
    • Launchers & Choosers can be used to launch other applications from your application. Launcher will not return back anything from the launched app. Ex: Call. If you want to make a call from your application, use launcher. Chooser will return back a handle to the application. Ex: Camera. You can launch the camera app from your application and get back the photo taken.
    • To get a complete understanding the application lifecycle, execution model, etc, refer to this: Part1, Part2, Part3.
  • WP7 provides location services using Bing maps.
  • WP7 has support for Push Notifications.
  • To avoid the popular fragmentation problem, Microsoft has chosen to take complete control over the OS updates and the device requirements.
  • Finally, Windows Phone 7 is considered to be a competitor for Android and not iPhone. iPhone operates on a different model with single hardware. “The WP7 OS isn’t perfect but aside from the lack of apps, it’s competitive today” - AnandTech.

Impressed with the features of Windows Phone 7? What are you waiting for? Download the SDK (its free) and start playing around with it. No support for Mac dev yet.

-- Varun

Nancy Reagan Art Car Billboard

uploaded by ehoyer.Here is an art car with a giant photo of Nancy Reagan on a van totally protected from towing, wheel booting and vandalism. Its in San Francisco so I guess it needs all that, but I am not sure the purpose of it all.

Friday, December 24, 2010

The 12 Days of Christmas Art Cars

The Internet would not be complete without the the 12 days of Art Cars song to commemorate this Christmas Eve. So here is my attempt at creative art car song writing.On the first day of Christmas, my true love gave to me...A Truck with Christmas Lights. 2 Santa's Cruising3 Volvo's Glowing4 NASCARS Racing5 Snowy Hills6 Jeeps a Glowing7 Bugs-a-Crawling8 Trucks-a-Hauling9 Bikers Bicking10

Merry Christmas!!

Wishing you and your family a Merry Christmas and may this festival bring abundant joy and happiness in your life!! :-)

Merry Christmas

-- Varun

Facebook’s Analytics Tool - Insights

In the era of internet and social media, even the person running a small business is going behind Facebook to promote his / her  business. You can create a Facebook page / application to promote your business on Facebook. To make your campaign a successful one on Facebook, you may want to know who is accessing the page and the effectiveness of your engagement, etc. Facebook has built an analytics tool called “Insights” and it is live for about six months now.  Facebook Insights give an insight into some of the key performance indicators like Monthly fan size growth, The average number of likes and comments, Unlikes and attrition rate, Demographics, etc.

Facebook Insights

“Facebook Insights provides Facebook Page owners and Facebook Platform developers with metrics around their content. By understanding and analyzing trends within user growth and demographics, consumption of content, and creation of content, Page owners and Platform developers are better equipped to improve their business with Facebook.” – Facebook

 Domain Insights  Insights Dashboard - SharingInsights Dashboard - Demographics

Insights dashboard is the single source for all your Facebook analytics needs for:

  • Websites: Fully-integrated sites and those that use social plugins, or add a non-integrated domain in one easy step
  • Applications: Including canvas, mobile, device, and desktop applications
  • Facebook Pages: Including Pages created on Facebook.com and those that are part of the Open Graph protocol

Facebook has been continuously improving the dashboard with new metrics and making it easy for the admins to monitor. Apart from viewing the metrics on the Insights dashboard, you can also export the data as an excel sheet(xls) or Comma-separated file(csv). The accuracy of the count and external referrers for the page has been improved recently. Access Insights dashboard here. More information can be found here.

-- Varun

Thursday, December 23, 2010

The Making of Stellabelle Art Car - Video

Here is an art car from one of my facebook friend named Leah Stella called Stellabelle a 99 Toyota with Almost 200,000 miles on it. The outside depicts worms, lights and Dr. Suess style things and was painted using exterior house paint. Stella is a videographer, composer, graphic artist and Youtube director with a very interesting video of the making of her art car and if you like this there is

Wednesday, December 22, 2010

Intro to WebSockets

Last week I had the opportunity to meet up with some of the geeks from Chennai at the Chennai Geeks Techmeet-3. Chennai is really a happening place for technology-minded folks – Lots of tech meets, technology user groups, barcamps, etc. Having missed the first two editions of Techmeet, I desperately wanted to attend the third one. The third edition was organized at Thoughtworks on Dec 18, 2010. One of the topics for this edition was “Intro to WebSockets” by Gaurav Oberoi. He gave an overview about WebSockets, need for WebSockets and its limitations. In short, WebSockets is a HTML5 feature which lets you stream data to and from web browsers. Google Wave (now Apache Wave) uses WebSockets technology for its real-time communication layer. Attaching the slides from Gaurav’s talk on WebSockets.

-- Varun

Voice Search in Google Chrome

If you are a smart phone user, you would have definitely tried any one of the “Voice Search” applications. Voice Search provides a method  to search by speaking to your device. I use “Voice actions” on my Android quite extensively and it is very useful to me. Now, there is a Chrome extension to get the same functionality on Google Chrome browser as well. The extension is still under development and you can’t expect it to be 100% perfect.

Voice Search Chrome extension Voice Search Options

Voice Search icon on Google search box  

Voice Search Chrome extension

  • Install “Voice Search” extension by pointing your Chrome to this URL.
  • If you are using Chrome 9 or higher, you may need to explicitly enable speech input. To do so, start your Chrome instance by setting the flag “--enable-speech-input”. It will be enabled by default on Windows. If you are on Mac or Linux, you can use this flag to enable speech input.
  • Whenever you visit any of the popular services, you will find a small microphone (like the one shown in the screenshot above) in the search box. Default services: Google, Wikipedia, YouTube, Bing, Yahoo, DuckDuckGo, WolframAlpha. It also works with any website using HTML5 search boxes.
  • Click on the microphone icon and start speaking. The extension will recognize the search terms and will populate the search box. Note: The extension is still under development. So, don’t be surprised if it gives out totally irrelevant text.
  • You can enable voice search on your favorite site by adding the same from the options page.

-- Varun

Saturday, December 18, 2010

[How to] Setup a mobile version for your blogger blog

Google is taking its battle with Wordpress to the next level with the introduction of mobile optimized blogs. Undoubtedly Wordpress is the supreme full-featured blogging platform when compared to Google’s Blogger but Blogger is closing that gap by adding lots of features this year. Some of the cool features introduced this year include static pages, real-time stats, dynamic template, spam filtering, etc. The latest addition to that pack is Mobile templates (Available only in Beta). Enabling this feature will offer a mobile optimized version of your blog.

How to enable mobile templates

  • Open http://blogger.com from your browser. Go to the dashboard. It will list all your blogs.
  • A popup will appear asking you to enable Mobile templates. Click on “Turn on mobile templates”
  • Alternately, you can click on the “Settings” option of the blog and go to the tab “Email & Mobile” to enable / disable the mobile templates.
  • You can access the mobile version by pointing your mobile browser to “<blog_address>/?m=1” (Ex: http://blog.varunkumar.me/?m=1). QR code for the same will be shown as soon as you enable the mobile templates.

Blogger Mobile Template

Blogger Mobile Template

How to setup a custom sub-domain

  • After enabling the mobile template, you may want to setup a custom sub-domain to point to the mobile version. Most of the sites use m. as the sub-domain.
  • You can achieve this by setting up an URL forwarding from your domain manager. If you have bought the domain from godaddy.com, you can follow the instructions here.
  • Add sub-domain ‘m’ and forward it to your mobile blog address.
  • Now, share this mobile address with your readers.

Forwarding Sub-domain-- Varun

Tuesday, December 14, 2010

Dickens 44 Bascom Art Car Mystery

Dickens44 and Girlfriend with Bascom Art CarThis mosaic Ford Falcon art car was created by artist and former curator for the Unknown Museum Dickens 44 Bascom on facebook a mystery worth investigating.At first all I found was that Bascom 44 was born on the 44th day of 1944 at 44 minutes past 4:00 am. I am guessing that's were the "44" part of his name came from.With the help of my friend Amanda

Monday, December 13, 2010

The Vochol VW Art Car Covered in 2000 Beads

The Volkswagen Beetle with its long association with Mexico, has been used in a unique project initiated by the Museo de Arte Popular (MAP), and turned into a colorful art car represented with the art of the indigenous Huichol. “Vochol” (from the slang word for the car – Vocho – and the word “Huichol”) was created by two indigenous families over a period of seven months.This VW art car is covered

Monday, December 6, 2010

Android 2.3 GingerBread – Quick Preview

Google has recently announced the launch of its new Android Phone Nexus S along with the next version of Android which is 2.3 (code named as GingerBread). I had a quick look at the new and exciting features added in this version. There are lots of exciting things for a developer than for an end user. Not many user features have been added. Many features have been added under-the-hood to increase the performance on Android 2.3.

The first thing I want to tell you guys is that GingerBread is not the major UI refactoring (as we thought). May be the next version Android 3.0 (codenamed HoneyComb) will feature a fully revamped UI. However, there are UI refinements for simplicity and speed in GingerBread. Google’s new phone Nexus S will be the first device to get GingerBread and it will be on sales from Dec 16 in the U.S. Nexus One owners will eventually get OTA update in the next few weeks.

Highlights

  • User facing features (Check out the screenshots below)
    • UI refinements and speed.
    • Improved Android keyboard.
    • One touch Copy / Paste
    • Improved power management
    • Internet calling. Yes, its available. :)
    • Download manager
  • Developer features
    • Performance improvements for gaming
    • Gyroscope and other new sensors
    • Write native code in your Android app
    • Near Field Communication.
    • Support for new media formats – VP8 and WebM support

Apart from the above mentioned improvements, there are improvements to the platform itself. Linux Kernel has been upgraded to 2.6.35. Dalvik VM has been upgraded to support concurrent garbage collection, JIT optimizations, etc. Some of the core libraries have also been upgraded to enhance the performance. Read the complete platform highlights here.

Android 2.3 GingerBread running on an emulator Android 2.3 GingerBread running on an emulator

New icons and notification bar in GingerBread 

New icons and notification bar in GingerBread

Android KeyBoard on GingerBread & One-touch copy/paste

Android Keyboard on GingerBread and One-touch Copy/Paste

Download Manager

Download Manager

Flat buttons on GingerBread

Flat buttons on GingerBread

-- Varun

Google eBooks for Android

We know this has been coming and Google eBooks Store is finally here. The store which is currently available only in the U.S. hosts over 3 million Google eBooks. The best thing about Google eBooks is that its open and supports many devices. You can read it on the web, or your tablet, or your smartphone. Native apps for Android and Apple devices are also available. Font, font size, day/night reading mode and line spacing are all configurable. You can discover and buy the new eBooks from Google eBooks Store or from any of the partners.

Google eBooks for Android

The free application is already available in the market. If you are not finding the application in the market, you can get the .apk from here. I tried out the app and the interface is pretty neat. I have not used Kindle or any other book readers but the usability of the Google eBooks is just awesome. Google is definitely getting better on its mobile user interfaces.

Google eBooks for AndroidGoogle eBooks - Contents  Google eBooks - Chapter Google eBooks - Original copy Google eBooks Settings

-- Varun

Sunday, December 5, 2010

How to sell an Art Car by Bizarro

Comic by BizarroAnyone who has ever had an Art Car for sale will tell you that convincing someone to look past all the paint and glued objects can be tough. This Bizarro comic depicting a father attempting to get the buyer to look past all the barbies glued on his daughters 2001 Mercedes S430 sedan says it all.

Saturday, December 4, 2010

Rogaine for Cars Commercial - Hairy Art Cars are all the rage

This weird commercial of a hairy car driven by a bald man was sent in by Martin just now. Not sure what the commercial is all about but it is pretty funny seeing a car completely covered in human hair blowing in the wind. It could be a hair club for men commercial who knows, anyone? Rogaine for cars maybe?

Tesla Art Car For Sale - Tesla Motors finally gets it

Tesla Art Car - (Credit: Tesla Motors)Tesla Motors finally got in the art car game by commissioning their very own Tesla Roadster art car created by digital media pioneer Laurence Gartel, whose commercial work includes glossy magazine advertisements for Absolut vodka. The car is for sale for only $109,000, but because it features a vinyl car wrap, the buyer will have to pony up a few more bucks

Thursday, December 2, 2010

McDonald's Toy Art Car

This is exactly what you do with all those McDonald's toys that are now banned in San Fransisco. You glue them all over your Mazda art car and then you go for a joy ride through San Fransisco, for spite. No happy meal for you, I guess they are call them sad meals in SF.

Wednesday, December 1, 2010

Google Reader for Android

Google has released an official app for Google Reader for Android phones. We have been waiting for this for years and it has finally arrived. The free app supports all the basic features like subscribing to a feed, sharing, liking, starring, friends, etc. Multiple accounts are also supported by the app. The app can be downloaded from the market.

Google Reader on Android Market

Reading articles on Google Reader

Send item via third party apps

Highlights

  • Neat interface without ads. Rendering is quite good as well.
  • Multiple accounts.
  • Synced preferences.
  • Search.
  • Ease of sharing. The article can be shared via email, facebook, twitter, etc.

Lowlights

  • Articles can not be synced to your device for offline reading.

I have been using NewsRob to read my Google Reader articles on mobile. I will continue to use that till Google adds support for offline reading.

-- Varun

google-site-verification: googlea4d68ed16ed2eea6.html