Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

21 December 2008

Samsung + Android = Good

Looks like Samsung might be launching an Android phone next year.

I've been very happy with every piece of Samsung hardware I've owned, so this is a step in the right direction for me. Still, don't think I could live without a dedicated keyboard. A soft keyboard is on the way for the G1, we'll see what I think in a few months. But I think for anything other than SMS, it'll suck.

Looks like there's going to be an Android version of the Instinct on Sprint and the Omnia on T-Mo. There's rumors of a version of the Omnia heading to AT&T, so does that mean AT&T will have an Android-capable phone that's not running Android? That'll be interesting. And we'll have a phone that's now running WinMo that's being released as Android too. So will people be able to switch over on their existing phones?

The Omnia site lists an "Etiquette Mode"... hmm... I know some people who could really use that.

15 December 2008

Hello Android

... or not.

Trying to get going on Android Development, and everything's going fine. But I'm not able to get to my coveted "Hello Android" due to this message:
"Connection Failure when starting to monitor device 'emulator-5554' : device (emulator-5554) request rejected: device offline"
So my emulator is offline. Hmm. It's a file in a directory, seems unlikely that it would be offline. Impossible really. Well the emulator did fire up once, so it can't be too broken. But my first impressions of Eclipse are quite good, it's a darn nice app for being free.

I thought this part of the tutorial was pretty funny (in reference to installing a driver file for the G1, on Windows this is the standard "Found New Device" wizard):
If you're developing on Mac OS X, it just works. Skip this step.
Vs.
If you're developing on Ubuntu Linux, you need to add a rules file:
Login as root and create this file:
/etc/udev/rules.d/50-android.rules.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
Now execute:
chmod a+rx /etc/udev/rules.d/50-android.rules
I guess that's the Mac gestalt in action. Wonder what it's called on Linux? It's a sort of gestalt that's for sure. Shudder. Would watching someone type that in would give me schadenfreude? Look at all the big German words getting tossed around. Yes I had to look up the spelling. No I'm not putting in any umlauts.

Now compare the Android version of Hello World to the iPhone version:

Android:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
iPhone:
- (void) applicationDidFinishLaunching: (id) unused
{
UIWindow *window;
struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
rect.origin.x = rect.origin.y = 0.0f;

window = [[UIWindow alloc] initWithContentRect: rect];
mainView = [[UIView alloc] initWithFrame: rect];
textView = [[UITextView alloc]
initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
[textView setEditable:YES];
[textView setTextSize:14];

[window orderFront: self];
[window makeKey: self];
[window _setHidden: NO];
[window setContentView: mainView];
[mainView addSubview:textView];

[textView setText:@"Hello World"];
}

Wow, just looking at the iPhone version makes my carpal tunnel flare up. Coming from a C# background, the Android version is a cakewalk. I'll reserve my "learn weird code" miles for F#.

Hello Android will have to wait, not sure what the deal is with that emulator. Google search was no help there.