Showing posts with label mobile. Show all posts
Showing posts with label mobile. Show all posts

Tuesday, June 14, 2011

Replacing Lightweight Web Services with Twitter Bots!

Foresight
Here is a vague idea. I'm not sure if i can even call it an idea. I always had the tendency to create lightweight information portals as usable web-based services with a very simple user interface. It just used to get things done and nothing more.

Practical Use Case
For example, let us consider a simple problem of "PNR Status Enquiry" in Indian Trains (for the uninitiated: PNR status is nothing but the current status of a waitlisted ticket in Indian Trains). First of all, such a system is really useful because the official Indian Railways websites are a bit clogged and they don't provide any alert services. Also, their websites are not so catchy and mobile compatible, and we definitely don't want to switch on the computer just to check the PNR status.

Before today, if i was asked to build such a system, i would go for an elegant google-like web page, where there is just a text box and a button for the user to enter the PNR number and click go. The resultant page will be again a simple HTML table with the ticket details (of course all of them scrapped from one of the railway websites - pretty sure that this isn't legal, although i am not aware of any laws against site scraping).

Do we really need web for this?
But this thought stuck me today. Web is a wonderful platform, at times too good to host silly and redundant stuff like this. Tomorrow i may have to build a similar system for Buses or Aeroplanes requiring me to add more and more pages with almost same functionality but different information sources. We don't need the web for such silly things. My idea is that, why not use "Twitter" as a platform for such web services. I've heard of facebook as a platform before for many applications and games (Farmville), so why not twitter as a platform too?

Twitter as a Platform
So what exactly do i mean by twitter as a platform? Let us redesign the same PNR status enquiry system using what i mean by twitter as a platform. Instead of having a web page for inputs, lets host a twitter bot, say @pnrbot. Now, whenever you need to enquire the status of a PNR number, all you have to do is post a tweet mentioning that bot, for example "@pnrbot 1234567890" (where 1234567890 is the PNR number you wish to enquire).

Now, as long as your tweets are public, the bot can read your tweet almost instantaneously thanks to the vast amount of real time APIs provided by twitter. Now the bot does the usual site scraping from the railways website for your PNR status and it posts it as a reply to your tweet. Simple isn't it? To take it a level further, the bot can also autotweet your PNR status every day until your journey date, which is not very easy in the case of a web based app. Also, since you will not be following the bot and the bot will not be following you, you will not clutter any of your friends' timeline with this tweet as it won't appear in their timeline.

If any of the input data is sensitive and not to be exposed, then the same design can be adopted by just switching the term "tweet" with "Direct Message" (although in that case, both you and the bot need to be following each other, which can be easily accomplished).

Pros of the Platform
Twitter is a part of our day to day life since the inception of mobile internet. So, you get many useful information from such bots interactively rather than opening your webpage and waiting for the page to load. Moreover, twitter is known for its notifications. If you have activated SMS alerts for @ mentions, then you don't even need to have internet to make use of such a bot. You can just send the tweet through an SMS and read the reply from the bot as SMS. Also, twitter has email notifications which may also be of good use. As mentioned in the example, you can have one input with multiple periodical outputs (like time based notifications, etc.) which is not so easy to implement in web based systems.

Developer Standpoint
So from a developer standpoint, what do we ultimately gain by choosing Twitter as a platform over Web for lightweight services? The answer is quite simple and really advantageous. For one, you need not host a web server for lightweight web services. All you need to do is run a script that will act as the bot. The script will also be really lightweight since twitter APIs does all the pushing for you (no polling). You offload majority of the user interface and load to twitter and do only the actual processing in your server.

From the implementation perspective, it'd be really great to have a good library/framework in a nice scripting language (like php or python) for building such a bot so that the possible features (like twitter API access, etc.) could be abstracted out thereby the developers actually have to write just the logic of their actual bot and nothing extra.

Closing Thoughts
I am pretty sure such bots already exists. By building more and more of interactive bots Twitter can really stand tall as a good platform not just for communication but also for instantaneous information retrieval.

P.S.: I am in the process of developing a simple such bot as a proof-of-concept. I am also highly determined to come up with a generic twitter bot library as i mentioned in the post. So as always, interested developers are welcome to carry on if you like the idea!

-Vignesh

Wednesday, December 1, 2010

Android 2.1 USB Tethering in Ubuntu

The worst part about owning an android phone is to wait for updates from your hardware vendor (HTC in my case) to provide OS updates. I am still stuck with Eclair and eagerly awaiting froyo,while the N1 counterparts are eagerly awaiting gingerbread :-P.

Wifi tethering (using the phone as a wifi hotspot) is one of the key features of froyo. Since i don't have froyo, i have to go through a tedious process to setup wifi tethering in my eclair. So, i chose the easier option of USB tethering.

Before i even connected the USB cable, i browsed through the internet and found out there are various methods available for USB tethering. There were many tutorials on how to achieve this. I read all levels of tutorials from rooting the device to installing the SDK to installing a $30 app. Atlast i found a simple app, which could do the trick.

I connected the phone (running android 2.1) and the computer (running ubuntu 10.04 netbook remix) and selected "Enable mobile internet sharing" in the phone. Thats when the miracle happened. A small pop up notification appeared in the top corner saying "Connected to wired network auto usb0". I was surprised. I had just spent half an hour surfing through tutorials to make this work. All of a sudden out of nowhere it works out of the box on just connecting the cable. To ensure i just pinged my blog and it was working like a charm!

So its windows that requires all the crappy drivers and vendor software for USB tethering. In ubuntu it automatically established a LAN (PAN may be) and set the IP, gateways and DNS and works on the go without any manual effort (except for connecting the phone and computer of course ;-))

So for all who want to tether your phone's internet connection, please do not waste your time in reading tutorials and rooting your device. Just boot into linux and connect your phone :-)

P.S.: This post is through the tethered 3g connection :-D

-Vignesh

Saturday, September 18, 2010

Swype - The next generation of text inputs !! :-)

People following me in twitter, facebook or my blog would have known that i recently joined the android community with the purchase of my htc wildfire. Ever since I bought my phone, there is this one thing that I'm madly in love with. It is supposed to be the next generation of input system for touch screens. With a simple tagline "Why type when you can swype", it is really one of the most amazing technologies I have ever seen in my life.

When I first got my phone, being the first time of using a touch phone, I was really happy about the basic touch input that is built in with android as it had a really nice auto corrector and I just needed to key in the text very very approximately. But the moment I installed and started using swype I never turned back. In this article I will be sharing an overview about what swype is, how to get swype for various smartphones and a few alternatives to swype.

What is swype ?

Swype is the most recent innovative technology for text inputs in touch screen based systems. Just like we have the T9 input system for traditional mobile phones, swype is for mobile phones with touch screens. In T9, there are either 3 or 4 characters assigned to a single numeric key and to key in text, you just have to press the correct combination of numbers associated with those particular characters and voila you have the text you wanted keyed in very easily. If there are multiple words possible for a particular combination then you choose the right word you wanted by either pressing the "*" key (in traditional nokia phones), or by pressing the down arrow (in sony ericsson and irritating motorola) or by pressing the "0" key (in the unconventional samsung phones). Once gotten used to, you will feel that T9 is the best way to key in texts in a mobile phone. It is indeed true and people even type without seeing the screen like we do in computers.



Swype is a similar technology for touch screen mobiles. In swype, instead of tapping each and every character in the qwerty virtual keypad shown in the mobile, you just have to elegantly trace through the path of the word you intend to type. Similar to T9, if there are multiple words in the path you traced, swype offers you the list of possible words for you to drag it into the input. You can be very approximate in your path trace yet swype recognizes your word almost perfectly all the times. Though it might sound simple and not very appealing at first, on using it you will realize that almost 90% of the words you type in have unique paths and hence, unlike T9, you very rarely will come across the ambiguous word choosing pop up.



Who can enjoy swyping ?


  • Android
    • Swype comes as a default input method along side touch input in many android devices.

    • If it doesn't come preloaded in your android device, then you can get the official swype beta from http://beta.swype.com. The official beta is closed now but you can download it through someone who has already registered with the beta was open (yes, it is legal to get any number of copies with a single registration! - and don't contact me as I didn't register when the beta was open).

    • If you didn't register for the official beta when it was open and don't know anyone who did, then this is the option for you. Download the apk file from some other source and install it in your device (which is what I've done in my phone). I am not posting any direct links here owing to legal reasons. It is available easily in 4shared.com. Find out the type of display your device has (VGA, QVGA, HVGA, etc.), download the appropriate version and install it.


  • Windows mobile
    • Few devices with windows mobile comes with swype preinstalled. I am not familiar about other options of getting swype for windows mobile.



  • Symbian
    • Swype has partnered with symbian and recently released a public beta for S60 5th edition based symbian phones (nokia 5800, 5230, 5233, N97, N97 Mini to name a few). You can download and install swype for symbian from Nokia Beta Labs. All the installation instructions are also briefed in that page.

    • One drawback i faced with swyping in symbian is that, most of the symbian devices have less sensitive resistive touch screens when compared to their capacitive counterparts in android devices. Although, it is convenient to swype with nails in the symbian devices which is not possible with the capacitive based android devices.




When is swyping easy ?

  • When you are just done with a call and your phone is slightly wet out of your cheeks

  • When have completely dry hands after a long rest of hands (e.g. after a sleep)


When is swyping not so easy ?

  • When you have just washed your hands and wiped it dry using a kerchief/tissue

  • When your hands are wet of course

  • If your fingers are a little bit bigger, then you may have to switch orientation every time you key in text


Alternatives to swype

Every emerging technology is never unique these days. There are always multiple implementations of a single technology and swype is no exception. Here are a few alternatives if swype that I have tried out.


  • Dasur SlideIT Keyboard

    • This is the best alternative for swype I have seen so far. I was using this before I could figure out swype installation in my device.

    • One feature that it had and swype lacks is shortcuts. You can store tiny shortcuts for frequently used lengthy words.

    • The dictionary is no where close to swype's preloaded dictionary of 60000 words. Although, many language packs are additionally available for free.

    • It is available for all major smartphone platforms (android, symbian, windows mobile and even for windows ce). It can be downloaded from the official market of your smartphone ( android market, ovi store, etc. ).

    • For more details visit here.


  • T-Swipe Pro

    • This is a swype alternative that is available only for android devices as far as i have explored.

    • It is a stable piece of software that is terribly slow in recognizing what you swipe.

    • The trial version shows you irritating pop ups asking you to register for full version which is definitely not worth upgrading to.

    • If you badly want to swipe and both swype and slide it key board doesn't work in your device ( which is a very rare case ), then this may be your final destination. I am damn sure you need the patience of handling a tortoise to use this.


To conclude, Swype is definitely one of the major breakthroughs in mobile technology and I am pretty sure that soon enough, swype will be the de facto standard for text input in touch screens. Hoping to see more and more OEM installed swype devices soon.

Note:
This article has been composed entirely in a mobile device using the following input systems:
  • This note is keyed in using the traditional touch input system for android

  • The section about SlideIT Keyboard was keyed in using SlideIT Keyboard itself

  • The section about T-Swipe Pro was keyed in using T-Swipe Pro itself

  • The rest of this article was keyed in using none other than swype itself :-)


P.S.: Thanks to AK Notepad.

-Vignesh

Thursday, September 16, 2010

SMS - Talk through mobile from facebook !! :-)

Various application layer protocols always impressed me. Especially HTTP, as my understanding about it has been pretty good. There has been one thing that i have been doing pretty good, site scrapping.

What is site scrapping? Defining it is very simple. It is the process of extracting some information from a website that has complex interface (with flash, ads, etc.) and using that information for our own purposes. Though scrapping many websites (especially government ones) may be illegal.

Here is one such application that i have developed. This application is purely a brain child of the HTTP i have understood. It provides an interface to the famous Free SMS Gateways in India 160by2 and way2sms through a facebook application. It has been one of the dead works that remained uncared for a long time. Now that i have a decent amount of online presence, i have refined it and trying to popularize it through my blog (should i call it blogvertise ?).

Using this application is simple. Register yourself at Way2SMS or at 160by2. Goto http://apps.facebook.com/smstalk. Add your account here and you are good to go. Though this application is not a big feat, it just provides a simple and clean interface (exposed as a facebook app) for the ad clustered interfaces of the famous free sms gateways in India.

Here are a few screenshots:

SMS - Talk through mobile from facebook !! :-)
SMS - Talk through mobile from facebook !! :-)
SMS - Talk through mobile from facebook !! :-)


Share your opinions/suggestions in the application's wall here or in comments.

-Vignesh

Friday, August 13, 2010

My new HTC Wildfire - Stepping into Android world !! :-)

Those who are following me in twitter/buzz might be knowing that i recently joined the Android community with the purchase of HTC Wildfire. It is one of the most recent phones from HTC released in India. As a matter of fact, i am really happy to see HTC building its base strongly in India (there are already 3 to 4 service centres in chennai alone and one in coimbatore too!). I wanted to buy an Android phone inspired by the adventures with android (nexus one) by varunkumar.

Ok, here i go with my first review of the brand new HTC Wildfire.

Specifications

  • Capacitive touch screen 240x320 QVGA

  • Android 2.1 with HTC Sense UI

  • 512 MB ROM

  • 384 MB RAM

  • microSD slot (2GB included) - expandable upto 32 GB

  • 3G upto 7.2 MBPS, Wi-Fi IEEE 802.11, GPRS, EDGE, Bluetooth v2.1

  • Internal GPS Antenna

  • 5 Megapixel Camers

  • G-Sensor, Proximity Sensor, Digital compass



Pros


  • Look and feel: The phone looks really sleek with a good amount of screen space (with both landscape and portrait orientations obviously).


  • Touchpad Input: This was something i was worrying before i bought this phone, as i have never used a touch pad based phone before. But now i know my worries were totally stupid, the capacitive touch screen in HTC Wildfire is really very good and much better than their resistive equivalents in the recent nokia phones. (N97 users, no offence, but the touchpad here is much better than N97). And yeah, life gets 100 times better with swype installed. We are really in the next generation of text inputs. Waiting to see how swype can change touch based netbooks. (For those who don't know what swype is, look here).


  • Sound Clarity: The sound clarity has been decent as far as i have experimented. (I am not an expert in playing around with the equalizer fields of a music player). To my needs, which are, hearing songs, loud ringtone, it works much more than fine.


  • Sensors: This is one feature that i never expected to be toooooo good. The sensors in the phone are realtime awesome. First is the orientation sensor which works much better than my previous mobile (n79). Even when i am lying down in a bed, the orientation sensor works perfectly. And as HTC says, another major sensor added to wildfire is, when you get a call, the phone automatically reduces the volume when you pick the phone up in your hands. Also, if you just invert the position of the phone, it stops the ringing tone. Another good sensor available is, when you are talking over phone, (with the phone close to your cheeks), the backlight automatically goes off. And it goes on at the instance you get it out of the talking position. On the whole, sensors really stand out in Wildfire


  • Camera Clarity: Again, as far as i have experimented, camera clarity has been quite good. HTC Wildfire comes with a 5 MP camera with autofocus. I will update this area after my friend bala experiments the camera features. The flash makes pictures taken at night also pretty clear.


  • Sync with Google Accounts: I would say Android is really a trademark google's approach for mobile phones as they have shown it with the amount of integration that can be done between your android phone and google account. You can sync everything from contacts and emails to even docs. Google latitude and buzz integration are pretty good too. Even with my slow speed gprs internet, i receive mails just like smses in my wildfire.


  • Context Aware Notifications: I learnt this during my schooling. When we right click somewhere in windows, we will get a pop up menu. But the contents of the menu will vary depending upon where you right click and hence it was called as a "Context Sensitive Menu". Similarly, the notifications in Android are all highly Context Aware (e.g. location information are always opened by google maps and not by the internal browser). And many helpful notifications to save battery power are also really good.


  • Friends Stream: Again this is one of the features that HTC is using in its marketing campaign for Wildfire. It is really a usefull application that connects you with your twitter, facebook and flikr friends. And yeah how can i forget to mention about the contact syncing done by wildfire. Since i had all the contacts in phone memory in my previous phone, i was planning to transfer it to my new one. Thats when i found that wildfire has already picked up many of the phone numbers of my friends from facebook and twitter. Wow! It saved atleast and hour to two of my time :-) And i don't need to update my contact book anymore, my phone does it for me.


  • Innovative Caller ID: Instead of just the boring caller name and caller photo, Wildfire shows the callers facebook status, birthday, etc. This works nicely even with my slow speed gprs connection (probably some caching is done somewhere!).


Cons


  • Battery Backup: Since the phone is almost always connected to internet (via gprs), battery power doesn't last for more than 24 hours. I feel this is okay for people like me who don't have trips often and get ample amount of time to charge it. Anyways, this definitely needs scope of improvement especially if HTC is going to market Wildfire as a business phone.


  • Heating Up: Almost all the gadgets have this problem these days. Wildfire gets heated up a bit too much while charging. Unlike my previous phone, it doesn't get heated up when using gprs/wifi extensively.



Overall, a really good Android phone to buy especially in a relatively expensive mobile phone market like India.

P.S.: Expect a few android from me apps soon ;-)

-Vignesh