Saturday, October 30, 2010

iPhone: Tips for Extending Your Battery Life

After using an iPhone for a few days, you may discover that while these devices are very innovative, intuitive and fun than perhaps most other smart phones, they do not excel in battery life. Any dedicated serious iPhone user will surely need to recharge his or her iPhone almost on a daily basis.

There are ways to conserve your iPhone battery life, but many of them involve turning off services and features, which make it a choice between all of the cool things that the iPhone can do and making sure that it can retain sufficient juice to do them.

Here are some tips to help you extend your battery life:

  1. Dim the screen. Touchscreen drains the battery, so the brighter the default setting of the screen, the more it drains the battery, so reducing the brightness will conserve more of your battery. You can find it in Settings -> Brightness
  2. Cycle the battery. All Lithium-based batteries slowly loose their charging capacity over time. Let it completely discharge and then fully recharging it again.  To maintain optimal performance, you should cycle your iPhone or iTouch's battery every one or two months.
  3. Turn data push off. The iPhone 3G can be set to automatically push email and other data down to it whenever new data becomes available. Every time you access the networks, it costs you battery life, so turning off push will help to extend your battery life. When push is turned off, you will need to check your email periodically (see #4 below).
  4. Fetch email less often.  The more your iPhone needs to access the network, the more it consumes the battery. So, set your iPhone to check for new email less often (i.e. every hour or so). Or, ideally, set it to "Manual Check". You can find it in Settings -> Mail, Contacts, Calendar ->Fetch New Data.
  5. Turn Bluetooth off except when you are using it. Bluetooth wireless network is useful for users with wireless headsets or earpieces. But, transmitting data wirelessly requires juice, and leaving it on all the time can drain the battery even more. Turning off Bluetooth except when you are using it will help you conserve battery life. You can find it in Settings -> General.
  6. Turn off 3G if you are using the iPhone 3G and not downloading web content. The iPhone 3G operates on two cellular networks, EDGE and the faster 3G. Not surprisingly, using 3G requires more battery to get the faster speeds and the higher quality calls. It may be tough to go slower, but if you need more battery life, then turn off 3G and just use EDGE. You can find it in Settings -> General -> Network.
  7. WiFi is another high-speed network that the iPhone supports, which is even faster than 3G, though it is only available where there is a hotspot, not everywhere like 3G. The drawback is that if it is always enabled, it can quickly drain your battery life. Unless you are using WiFi right now, keep it disabled. Find it in Settings -> WiFi.
  8. Turn off Location Services unless you are using it right now. The built-in GPS is one of the coolest features of the iPhone 3G, which allows the phone to know where you are and gives you exact driving directions and gives that information to applications that can help you find nearby restaurants, etc. But, like any other service that requires network access, it needs battery life. If you are not using location services, then turn it off and save some battery power. You can find it in Settings -> General.
  9. Set your iPhone to 'auto-lock' sooner.  You can set your iPhone to automatically go to sleep sooner (aka Auto-Lock) after a certain amount of time. The sooner it sleeps, the less power is used to display the screen or other services. You may try setting it to 1 or 2 minutes. You can find it in Settings -> General -> Auto-Lock.  In the case of an iPad, you can put it into sleep mode when not in use by manually pressing sleep/wake button.
  10. Minimize your tasks (i.e. avoid background music) or running applications that require the phone to run for a long period of time or use up a lot of resources such as playing videos, games, browsing the web, etc. can use up a lot of battery power. If you want to conserve battery power, then limit the use of battery-intensive apps.

Tuesday, May 11, 2010

Is Mobile Advertising the next big thing?

There has been a lot of buzz among online advertising companies about mobile ads being delivered to smartphones.  Google's Chief Executive, Eric Schmidt has mentioned about Google becoming a "mobile first" company. Furthermore, Google's move with its acquisition of Admob, and Apple's recent announcement of its iAd Mobile Advertising platform demonstrates that mobile advertising continues to gain increased attention.

However, there are issues with advertising on mobile phones - the screens are too small even on today's smart phones. This makes it difficult to deliver a compelling advertising user experience to consumers. Also, when users click on the the traditional banner ads, it redirects them to a new browser window. So the user experience on the mobile phone is compromised.

Although spending on mobile advertising is growing, it is still a tiny portion of online advertising.  Up until now, mobile advertising has consisted mainly of small banner ads tucked into the corner of a mobile web page or text-message ads that often resembled spam.  According to market research firm, eMarketer, mobile advertising accounted for $416 million in spending in 2009, compared with $22.4 billion in overall online advertising.

The new Apple's iAd platform is looking to change the face and quality of advertising.  Apple's CEO believes there is a flaw of both standard online advertising and TV advertising - the combination of interaction and emotion. The key is that ads will keep users within an app, rather than redirecting users to a browser window.

When you click on an iAd advertisement, it will take up the screen using HTML5. Once it is open, you can explore the ad.  Apple demonstrated an advertisement for Toy Story 3, where it showed that you could not only get information about the movie, but you could also watch trailers, play games and do much more all within the same application from where you launched the ad.

Many technologists and analysts are putting a lot of bets on the standard HTML5 technology for enabling the creation of richer content experiences.  Furthermore, according to WSJ, several analyts are projecting a positive outlook for Apple's iAd platform as they believe that it will provide a significant source of revenue for Apple. Piper Jaffray believes that in-application advertising could reach roughly $700m by 2013, with about 70% going to ads within the iPhone platform.  But, can it really become a multi-billion dollar business ?

Tuesday, March 30, 2010

How To Take Android Screenshots on a Mac

If you have ever wondered how to take screenshots for applications running on an Android phone, you can do it for free if you have Java on your machine and have downloaded the Android SDK.

  1. Download the Android SDK
  2. On your Android phone, select Settings ->Applications -> Development
  3. Select Enable USB Debugging by placing a check box next to it
  4. Connect your Android device via USB to your Mac
  5. Run android-sdk-mac_86/tools/ddms (Dalvik Debug Monitor) (Note: it may be easier to add the tools directory in your path)
  6. Select the device in the Dalvik Debug Monitor as illustrated above
  7. Type Control + S or go to Dalvik Debug Monitor --> Device --> Screen Capture
  8. Voila!  
If you found this article useful, please retweet it.  Feel free to send me any comments.

Thursday, January 14, 2010

Web Runtime (WRT) Tools Open Source Release for Symbian Platform

This week, we are making available a preliminary version of the Web Runtime (WRT)  Tools Package under an EPL license.  As mentioned in my earlier posting on Web 2.0 Apps on Symbian, there are several million web application developers.  In fact, according to Gartner, by 2013, mobile phones will overtake PCs as the most common Web access device worldwide.

According to Gartner's PC installed base forecast, the total number of PCs in use will reach 1.78 billion units in 2013. By 2013, the combined installed base of smartphones and browser-equipped enhanced phones will exceed 1.82 billion units and will be greater than the installed base for PCs thereafter.

As the proliferation of mobile devices continues to grow at an astounding pace, there is an ever-increasing need for better mobile Web development tools. We are open sourcing the Web Runtime (WRT) Tools to provide an open eco-system to foster greater collaboration within the Symbian Tools  Developers community.



The WRT Tools package  includes a set of Web Runtime Plug-ins based on the Eclipse Plug-in Development Environment (PDE), and enables the development of WRT applications utilizing Web Technologies such as HTML, CSS, JavaScript and AJAX.

The WRT plug-in(s) provide features such as enabling the creation, editing, testing and debugging of  basic WRT applications. The WRT applications require the creation, editing and saving of JavaScript, XML and HTML files. The WRT editor plug-ins are based on the Eclipse JavaScript Developer Toolkit (JSDT). JSDT is part of the Eclipse Web Tools Platform (WTP) Project.

The WRT Plug-in allows the creation of a Web Runtime (WRT) project that contains a basic widget project (i.e. an empty project with a minimal Info.plist, html, css and JavaScript files). The Info.plist is an XML template with settings of a basic widget already defined. Similarly, an index.html file is defined with an HTML template. It is also possible to import existing WRT project(s) which include a WRT Previewer for previewing a WRT widget in a conventional desktop browser.

Note that this preliminary version of the WRT Tools package uses the WRT Previewer from an Aptana WRT project due to a pending Nokia WRT license issue, but the next release will include a fully integrated WRT Previewer. An application developer can also add additional JavaScript, HTML and XML files as necessary into the existing WRT project.

The WRT Plug-in also includes a WRT Debugger component to enable debugging of  WRT applications.  The WRT Debugger component consists of a general purpose JavaScript Debugger based on the Eclipse Platform framework and the Chrome Developer Tools Project.

It should be noted that this WRT Tools package is an incremental code drop for Eclipse internal tool developers as we are planning a subsequent release in March 2010 to introduce the WRT Tools to Web Runtime (WRT) developers.

The March 2010 release will include support for a variety of WRT project templates (i.e. WRT Twitter Widget, WRTKit project, etc) as well as support for packaging, deployment, a fully integrated WRT Previewer, and more. Furthermore, there is still planning in progress for the future WRT Tools Roadmap, and among the items under discussion is a plan to integrate with other open standards, Symbian Common Web Runtime, and to support UI Designer features.

If you are interested to know more about the WRT Tools package, please see the WRT Tools Wiki Page.  For detailed instructions for installing the WRT Tools Plug-ins, and related packages or for trying out its features, please refer to the WRT Tools Developers Guide.

If you have any questions or if you are interested in engaging or collaborating with us, please feel free to leave me a comment, or contact me at tasneems at symbian.org.  You can also follow me on Twitter for further developments.  There is also a general Tools Developers mailing list for general comments.

Friday, January 8, 2010

Ovi Maps Racing Game Lets You Speed Around Your Neighborhood

A sneak preview of the Ovi Maps Racing game (coming soon to the Ovi Store) was unveiled at the 2010 Consumer Electronics Show in Las Vegas by Nokia earlier Thursday.  

In a truly unique experience, you use the GPS in your device to find your location (or use Ovi Maps to choose any location in the world), then customize a track around your neighborhood, and finally fire up those engines! --Nokia Conversations 

As pictures are better than a thousand words, check it out below!   Enjoy!  Retweet, and/or leave me a comment.


ovi-maps-racing-5
ovi-maps-racing-5
ovi-maps-racing-5
ovi-maps-racing-5
ovi-maps-racing-5

Wednesday, January 6, 2010

Was the Google Nexus One Announcement Really About Another Google Android Phone or iPhone Killer?

Was the biggest Google announcement really about another Google Android phone or the iPhone killer as some have suggested? As expected, Google announced its Google Android Nexus One at a press conference Tuesday morning.


Nexus One is a new Google Android phone that offers software internals designed by Google and the device hardware is manufactured by HTC. According to Google's Mario Queiroz, the Nexus One is a "super phone" where the Web meets the cell phone. "It's an example of what mobile phones can do with Android" says Mario. It is indeed slim, sleek, and light-weight (4.58 oz). It offers a 1 GHz Snapdragon processor. The primary interface is a 3.7 inch AMOLED display with five customizable home screens. It runs the Android 2.1 OS and the WVGA display is capable of displaying 3G graphics.

According to Google's Senior Product Manager for the Nexus One, Erick Tseng, the feature set includes everything you'd expect from an Android phone and adds a couple of unique goodies.

The Nexus One may or may not be an iPhone killer, but it doesn't really matter as the biggest Google announcement was not really about another Google Android phone. The real news at the Google event was about its online store at http://www.google.com/phone - the news that could shake up the mobile industry as it had happened during the initial iPhone announcement.  The real news was about an online storefront offering that, if successful, could revolutionize the much reviled US carrier model - offering much faster, cheaper and more flexible services for mobile users. So what is really the significance of the Google announcement?

Well, Google confirmed that Nexus One, and all subsequent Google phones sold via the company's online store will be available unlocked for use on every participating carrier. By offering a lineup of phones that is essentially carrier-independent (with the radio compatibility caveat), Google has broken the two previously interlocked parts of the phone/plan-buying—phone selection and carrier selection—and has done so in a way that threatens one of the most important enablers of carrier lock-in.

In short, what Google announced today wasn't just the Nexus One, but the world's first carrier-independent smartphone store; the Google store is now the only smartphone store in the US where, for every phone on offer, you first pick which phone you want, and then you pick a network and a plan on that network. So you can comparison shop among networks based purely on plan price and network quality, because you already have your phone picked out.

Thursday, November 5, 2009

Build Your Own Tweets Widget for the Symbian Platform

If you are a Web developer interested in developing a social networking application such as a Twitter app that can retrieve tweets on a Series 60 Symbian phone, then here are code snippets to demonstrate how easy it is to implement it using Nokia Web Runtime using Javascript, and HTML.  If you are new to mobile Web development on Symbian, take a look at the Web Runtime Quickstart tutorial.

Now to retrieve tweets on a Series 60 Symbian phone, you can implement the index.html (see slide 11 in the presentation attached below), which will invoke init() function within main.js.  The init() function will simply instantiate the UIManager and set up the views (see slides 12 and 13). Then, if the user selects the 'Tweetz' icon, then Twitter.Update() will be invoked as listed below.  The function Twitter.Update() will simply initialize the twitter buttons including adding the separator, and will display "Loading twitter feed" as it waits for the twitter feed to download.

Twitter.prototype.Update= function(numToShow){
    this.numToShow= numToShow;
    if ( this.buttons== null ) {

       // add the separator
       var separator = new NavigationButton(null, 
                           "tweetz-icon.png","");
       separator.setEnabled(false);
       this.parentView.addControl(separator);
       // create buttons
       this.buttons= new Array();
       for( var i = 0 ; i < this.numToShow; i++ ) {
           var button = 

           new NavigationButton("twitter_button_"+i, 
                                 null ,"");
           this.parentView.addControl(button);

           this.buttons.push(button);
       }
       this.buttons[0].setText(

           "Loading twitter feed...");
    }


Next, initialize the twitter URL for getting a user's RSS feed. In this case, it is initialized to the TwitMyMobile user account. Then, you can get the RSS feed by instantiating the AJAX request. The http.open() API is passed, "GET" for retrieving the data, the second parameter is the twitter URL, and the third parameter is set to true to indicate that this is an asynchronous request. The http.onreadstatechange is set when the request state changes, then the Twitter.DoUpdate() function is invoked for parsing the returned data. The code fragment for getting the user's tweets will look as follows:



 // Twitter API for getting a user’s RSS feed 
var twitterurl= "http://twitter.com/statuses/user_timeline/TwitMyMobile.rss"; 


// Get the rss feed 
// Prepare for asynchronous download 
this.http= new Ajax(); // true means asynchronous request this.http.open("GET", twitterurl, true); 
// When the AJAX request is done, it will call self.DoUpdate() this.http.onreadystatechange= function() { self.DoUpdate(); }; 


// send the AJAX request 
this.http.send(null);


Now, the Twitter.DoUpdate() method can easily parse the data. Use the DOMParser API to parse through the response XML. If the content type is not set correctly, we get the response as text. Next, we loop through traversing the elements, creating buttons and gathering tweets. The while loop traverses through the child nodes, and retrieves the title, and publishing date for each of the tweets. The tweet image is set to tweet.png for simplicity. If we get any exceptions and get no data, then we display "Tweetz not tweeting right now" message and intialize the title and date fields accordingly.


Twitter.prototype.DoUpdate= function() {
    if (this.http.readyState== 4) {
        try {
            // Get parsed Doc 
            var xmlDoc= this.http.responseXML;
            if (xmlDoc== null)
            { // if the content type is not set  
              // correctly, we get the response 
              // as text 
              var xmlparser= new DOMParser(); 
              xmlDoc = xmlparser.parseFromString(
                       this.http.responseText, 
                       "text/xml");
              var itemElements =
                  xmlDoc.getElementsByTagName("item");
              var loopEnd =
                     Math.min(this.numToShow,
                              itemElements.length);
              // traverse elements & create buttons 
              for (var i = 0; i < loopEnd; i++) { 
                 // iterate through child nodes of 
                 // this item and gather tweets
                 var title = null; 
                 var date = null; 
                 node = itemElements[i].firstChild; 
                 while (node != null) { 
                    if (node.nodeType == 
                         Node.ELEMENT_NODE) {
                       if (node.nodeName == "title") { 
                          // item title 
                          title = getTextOfNode(node); 
                       }else if 
                         (node.nodeName== "pubDate" ||
                          node.nodeName== "dc:date") { 
                          // item publishing date 
                          date = getTextOfNode(node); 
                       } 
                 } end while  


                 node = node.nextSibling; 
             } // end for  
             this.buttons[i].setText("
                 + date + " " + title + "");
             this.buttons[i].setImage("tweet.png");
          } // end if (xmldoc== null
      } // end try
      catch (x) {
         this.buttons[0].setText(
           "Uh-Oh! Tweetz not tweeting right now.");
         for (var i = 0; i < this.numToShow; i++) {

            this.buttons[i].setText("");
            this.buttons[i].setImage(null); 
         } // end for  
      } // end catch
  } // if (this.http.readyState== 4) {} 


 For a complete listing of the code, take a look at the slides I had presented at SEE 2009 on Improving the Mobile Web Developer Experience illustrated below.  If you find this article useful, please feel free to retweet and forward me any comments.