Showing posts with label tablet. Show all posts
Showing posts with label tablet. Show all posts

Thursday, November 10, 2011

Holy Cow, I Wrote An App !

(Of course the title refers to Raymond Chens post about the only book he ever wrote..)


In 15 lines of code... And it's an unique one. And it does something that is probably useful to (a maximum of) 10 people in the whole world.
Last year I bought an Archos 7HT Android Tablet. It was one of the cheapest tablets then and this means it has limited capabilities. One of the limitations is that it does not have an option to switch to portrait mode. It has no tilt sensor and there is no special button or built-in option for it. So if you display a webpage it is always in landscape mode which is sometimes inconvenient. Like when I want to view the a popular site that shows when and where it will rain in the coming hours. As I live in a small country, it could fit in one screen IF displayed in portrait mode.
So I decided to look into the possibility to force the standard browser to start in portrait mode, which is (as far as I'm aware) not possible. Then I found a reference to the 'WebView' ("A View that displays web pages") component and guessed that this could be a way to solve the problem.  And it is. I just created a standard Android application, followed the instructions on the WebView reference page to place the component on the main page, and forced the view to portrait using the appropriate function (that I found on StackOverflow).. That's all. Here is the code:

package CScope.Buienradar;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.webkit.WebView;

public class BuienRadarActivity extends Activity {
    /** Called when the activity is first created. */
     WebView mWebView;
     Button myButton;
     @Override
     public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mWebView = (WebView) findViewById(R.id.webview);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.loadUrl("http://buienradar.mobi");
           setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }
    }

The blue lines are actually the only code written by me, all the rest was generated by the Eclipse 'New Project' wizard. And when you press Run or Build a complete installation package is created in the 'bin' folder of the project that can be copied to the device.  Let's face it, this is almost too simple.... So that even left me time to create a fancy icon.


(And if you by coincidence are one of these 10 people: you can download it it from here: BuienRadar,apk)

Monday, August 23, 2010

In Touch with the Tablet (or why I DO like the Archos 7 )

Two years ago I was one of the first to buy a 'small form factor computer', the EeePc 4G. Almost hard to believe nowadays with the omnipresent Netbook, it was the ultimate gadget at that time. The idea that you could have a fully functional PC with a solid state disk, a 7" screen and keyboard for only €250,- was just too exciting. However I've been struggling with the so-called 'use-case' ever since. To be honest, the keyboard is just too small and too flaky for decent typing, the screen is too small for real work and even playing YouTube videos is almost too much for it's little processor.
Today the Tablet PC is what the Netbook was then. Tablets in all shapes and sizes are already released faster than you can read their reviews and the expectation is that the real flood will start in second half of 2010. Combined with the explosion of smartphones, touch based UI's are suddenly everywhere.
Of course there is no doubt that the iPad is the ultimate touch tablet. But I have this aversion towards computers that you cannot program yourself.And I don't like paying €100,- bonus just for the name, so there is a chance I will never own one. So along comes the cheap Archos 7 Home tablet. An Android based 7" touch tablet with 2 Gig internal memory and about 10000 times the processing power required to send a rocket to the moon.. All that for just €150,-! Actually there are a bunch of (even cheaper) Chinese tablets on the market like the iRobot / aPad, but they look cheap even on the promo-movies and most reviewers admit they are probably a bit too cheap. And of course there are 100 different tablets 'to be released soon/next quarter/beginning next year'...At least Archos is a well known French company with a solid reputation for building good media players and their model is available now !.So I guessed it could never be that bad and at least you get what is specified.

And I'm not disappointed.

First: it looks great. It has got a solid 'brushed aluminium'-look on the base and a nice black edge. The formfactor is really good. It's really comfortable to hold with both hands while scrolling with your thumbs.
iPaq 3800 - Palm Vx - Back to the future of touch...
The screen is pretty good too. At 800x480 resolution is just big enough to comfortably view websites without much scrolling. The colours are bright, the image is crisp and the brightness is good enough even when it's used outside (provided it is not too sunny). And the resistive touchscreen is.. ehm.. well...OK. This touchscreen is the usually the core of all negative reviews of the '7'. But I'm used to my Palm Vx, iPaq PDA and Garmin NĂ¼vi GPS so resistive touchscreens come natural to me. It's what you're used to. And I'm sure if the iPhone was your first touch experience you'll be disappointed with the Archos.
But I am not.
Although I'm not really sure whether it is the 'touch tablet experience' itself or the device I like. I've been using it for a few weeks now and I find myself regularly checking e-mail, reading websites, e-books and even comics. When fully charged it can be on standby for two days so I can just pick it up, touch it and check the latest news, local weather or just read some Dilbert strips. And I can even program it ! Using the Android scripting layer you can write Ruby, Perl or Python scripts, right on the device. Not that I will probably ever use it to write any productive code but it's just the idea that you can do it makes me feel at ease.
Anyway, if you're looking for a reasonably priced 'first try' tablet and you're not spoiled already by any Apple product it's worth checking out.

UPDATE(27/10/2010): Much to my surprise Archos recently released a firmware upgrade for the 7 HT . And somehow they managed to really improve the touchscreen response so it is actually pretty good now !