Categories
Android

Overview of Open Market

Open Market is SUPER easy to use.  Start the app, pick a category, view details on an app, read comments, rate it, and download the app.  A few clicks and it’s all done.  The screenshots below are just a quick overview of how it looks

Splash Screen Store List Application Details
SpashScreen Stores - Page 1 FBook - Page 1
Terms & Conditions / Download Rating an App Reporting an App
FBook - TandC Rate and Comment Report

It’s really that simple.  But what Apps can you get?  Well, here’s a few samples:

Facebook (Communication)

FBook - Web App This app is apparently a wrapper for the Facebook iPhone site with a few tweaks.  Tabs across the top give you access to most of the common features, upload pics, check your messages, set statuses, comment on wall posts, etc.  Pretty slick, although the “Chat” tab seemed to not work so well for me.  It also has the ability to post notifications to you using the android notification bar.  So if you get a new Facebook message, you’ll get a notification and can read it right away.

Twitter – via Twitli (Communication)

Twitli Of the twitter apps in the Open Market this is one of the best.  Unfortunately Twidroid (one of the better known twitter apps for Android) is not prepared to make their app available to people who don’t have the Android Market, but Twitli is a pretty great client.  It certainly beats the client I had on my old Windows Mobile phone. Very easy to read tweets, reply, post your tweets. Even lets you take a picture and upload it.  Small, simple, and functional.

Barcode Scanner (User Contributions – Applications)

barcodescanner This is basically just Google’s ZXing application.  It’s a GREAT barcode scanner, can do all sorts of barcodes and interprets them.  This is often used by other applications to scan barcodes for them, and if you look at a lot of android app sites, you’ll see that they often put a link and a barcode next to each product so that you can quickly scan the barcode instead of having to type in a really long url to get to the app from your phone.  Currently not the flashiest application on the market, but it has some nice uses.

AndExplorer (Productivity)

For the Geek in you, there’s a file explorer – lets you copy, move, delete, edit, open, etc files on the device.

Notepad (Productivity)

A very simple notepad for keeping any quick notes you need to write down.  Its a really simple UI, but then there’s not too much required when you’re taking notes.

Shopping List (Productivity)

Shopping ListA pretty simple shopping list app. Really quick to add items to a list and mark them as purchased. Not filled with major functionality, but the font’s and buttons are easy to use one handed while pushing a shopping cart and looking for the best deal on Organic Soaps.  For a scatterbrain like myself this is a super useful application.

Quickpedia (Reference)

Quickpedia This is a pretty nifty wrapper around Wikipedia.  If you’re not keen on loading up the browser then this might be the best app for you.  It’s “News” tab is a neat view of current news.  The “Nearby” tab is especially interesting, giving you a list of articles about things that are in your current location.  I imagine this could be particularly useful if you’re travelling overseas (or even locally) and want to find out more about a tourist attraction or historical site.

Categories
Android

Leaf’s Open Market – My Wishlist

I know I’m supposed to blog about my application but I’ve had some fun with the Leaf Open Market.  I know it’s getting some bad press from some quarters but its not been too bad to me.  They’re facing a hard battle to get some of the developers to support them, but they have a great vision and are making some progress.  This is hopefully going to be a more technical review of the market, with a practical look at it going up tomorrow some time.

I emailed Leaf this weekend and got some info from them.  Apparently some phones initially went out without the Open Market on them, but they’re getting sms’ed by their contract providers to be shown how to install it.  If you don’t have it on your phone, you can go to http://www.leaf.co.za/openmarket.  I’ve setup http://tr.im/nX6E to redirect there in case you’re not keen to type out that whole URL on your phone.

I’ve read their press releases and they basically say something along the lines of:

The phones are awesome (true) but a powerful phone is only as powerful as the apps that are on it.  While they come with a load of great apps, more is always better and because of the “open source” nature of the OS and development tools there are LOADS of great apps.  What we need in SA is a market for them, and this is basically what Open Market is about.

So my questions are “Does it live up to all that?”, “Is that all that’s needed in a market?” and “Do I think that this will be enough to convince developers to put their apps on here?”.

My Requirements for a software market.

1. Easy to use

This goes without saying – but it should be quick to load, and unobtrusive.  Needs searching abilities, and good categorisation.  Data going into the app needs to be standardised. (ie. if you allow people to specify what version of the OS an app runs on then keep the possible entries limited – not “Cupcake”, “1.5”, “1.5.0”, and “Newest version”).  It should display the download sizes of the apps.  Needs previews, ratings, comments and decent descriptions.

2. Highlights new apps

If I’m going to visit it every few weeks, a summary of the most recent apps would be essential.  Otherwise I won’t know what the new stuff is and I’ll have a hard time finding the latest apps.

3. Automates updating older apps (and hence displays version numbers easily)

I know a number of developers who would hate to have to build an Auto updater for their apps, so having this built in would be sweet.  It appears that a number of the devs who have put apps on the Android Market rely on this ability and are loathe to build something like this themselves

4. Does not restrict who can buy what

Seriously – why should someone in the UK see one app while someone in SA not?  To be truly a simple solution for a developer it needs to provide an easy single place to distribute your application to as many people as possible.  Providing roadblocks to that purpose is only going to make developers less likely to use the system, which in turn means less applications for your users

5. Provides user feedback on Apps

Ratings, comments, sharing apps with friends – all provides a social interaction.  Extending this beyond the marketplace application is only going to improve your rating.  Let people outside your device access a list of apps for download from your site.  Let them link, and comment, and rate.

6. Provides users some kind of guarantee/trial system for apps

I’m not keen to spend R100 on an app only to have it be a piece of junk.  Trials or 7 day money back guarantee’s are essential.

7. Allows for Paid and Free apps

Some people might code for love, but most of use need some kind of reward at the end of the day.  You need to have a mix of both.

8. Keeps a history of previously bought apps so you can re-download apps again

If I spend R100 on an app and I have to reformat my phone, or get it replaced, I certainly want to be able to access the application again without having to pay.

9. Allows outside apps to link to apps in the installer

Especially with Android where apps can share Intents, it makes a LOT of sense to allow me to link to an app that has intents that I require directly from my App.  If I can create a standard url, then its even better.  I could then link to the app from a standard web page, and have the app market show more info about the application before the user chooses to purchase or install it.

10. Provides user and developer accounts

Without this, there’s no real way for much of the other requirements to be met, but this gives me ways to know who’s saying what about my app, gives me some assurance that if I upload an application, only I can update it.  It allows usage information like “how popular is my app” and it allows users to see what they’ve downloaded and provide the ability to re-download apps that they’ve downloaded/purchased in the past.

Summary

I’m going to quote a bit of the slightly paraphrased response from Leaf to my questions:

[We’re releasing] Phase 1 of the website today. http://www.openmarket.co.za/. This will be the key point of internet interaction, we will over the next [while] release several new features, [hopefully this will include]: Contributor registration, Contributor management console, blogs, forums and then billing.

It seems like leaf’s got most of the main points under control. I’ll go through them quickly again with comments:

Easy to Use So far so good, easy installation, simple to find apps.  But when there’s version numbers of “dunno” and some apps don’t have file sizes, its not ideal.
Highlighting New apps There’s no feature like this right now.
Automates updating older apps Doesn’t do this right now
Does not restrict who can buy what As far as I’ve seen its Vodacom only right now, so its not an ideal start, but these are early days still.
Provides user feedback on Apps Sorted
Provides users some kind of guarantee/trial system for apps No paid apps yet, so not yet
Allows for Paid and Free apps Will be done soon
Keeps a history of previously bought apps so you can re-download apps again No paid apps yet, so not yet
Allows outside apps to link to apps in the installer Busy chatting to them about this
Provides user and developer accounts They’re doing it for Developers/Contributors, so makes sense for them to do it for users too.

On the whole that’s a pretty awesome system.  Looks like we’ll be in for a pretty good ride with Android in SA.

Hopefully with a bit of luck the last “red” items there will be sorted out and I’ll be a happy camper. Right now they’re doing pretty darned well as a first major app store that I know of that’s been built by a local company.  I’m seriously hoping for good things from this.

Categories
Uncategorized

How to take Android Screenshots

For those of you wondering how I made the super awesome screenshots in the previous post.  It’s really easy.  Apparently there’s a $3 app that does something similar, but you can do it all for free if you have Java on your machine and have downloaded the Android SDK.  I got the steps to do this from “Taking screenshots on an Android-based phone”.

I’m going to quote a fair bit of their instructions, and make one or two modifications as necessary:

Step 1: Enable USB Debugging
On your Android phone (in this case, the G1), go to Settings, then Applications, and then Development. Check the checkbox for "USB debugging."

Then

Step 2: Download the Android SDK
Download the SDK for your platform here. Google also has some great installation documentation if you get lost. You will need to make sure you have a current copy of the JDK.

They then go on to say that you’ll need Eclipse to carry on, but you shouldn’t.  All the functionality is contained in the SDK.  I’m working on Windows XP, so your mileage may vary on other OS’s.

Go ahead and plugin your Android handset into a USB port on your computer, if it is not plugged in already.

Step 3: Run DDMS
After configuring Eclipse or whatever IDE you use to work with Android, you need to open up the DDMS application from within the "tools" folder in the Android SDK’s main folder.
After DDMS launches, select your handset from the menu on the left (it should be the only device listed). You might see an error message, but the debug tool should be loaded. Then, click CTRL-S on your keyboard. This will bring up the "Device Screen Capture" interface. From here, a static image is captured from what is appearing on your handset. You can save the image (nicely defaulted as PNG) and then refresh to your heart’s content to grab updated or different screenshots from your phone.

That should be it… Easy and quick screenshots.  Just remember, if you choose to make the SD card accessible to your PC by doing the following, then you won’t be able to use it on your phone for your demo’s:

01 - Mount SD Card via USB But if you don’t do that, then the phone should operate like normal.

Categories
Uncategorized

HTC Magic’s keyboard

02 - Default KeyboardI have the plain HTC Magic (i.e. not the “with Google” version), and have been learning how to type with it.  My first complaint was that the keyboard in portrait mode, the standard QWERTY keyboard became a little small to work with.  Especially if you have slightly wider fingers or not too accurate hand-eye-coordination.  So one of my first missions was to investigate the alternative keyboards.

From my initial reading, I’d not seen much that gave me great hope for any better keyboards in portrait mode.  One of the guys in our offices recently got a Samsung Omnia and was showing how he’d swapped to an “XT9” keyboard in portrait, and I wished that Android had been clever enough to do the same.  With little hope I clicked on the little “cog” and went through the following steps:

03 - Keyboard Settings 04 - Touch Input Settings 05 - Touch Input Settings - Keyboard Types selected
Click the “Setup” cog< /td> Touch Input Settings Click Keyboard Types
06 - Touch Input Settings - Keyboard Types 07 - Touch Input Settings - Compact QWERTY 08 - Compact QWERTY
Keyboard Types List Click “Compact QWERTY” Enter Text

The result is a slightly fatter keyed QWERTY keyboard.  It’s not one I’m used to using so this didn’t quite work out too well for me.  Looking at the other option in the list of keyboard types (“Phone Keypad”) I just assumed it would be a quick way to enter numbers.  Boy was I wrong.  I followed the same steps as above, and chose “Phone Keypad” and came back to my browser and found this:

09 - Phone Keypad I now had a phone keypad just like the physical pad I used to have on my old iMate SP3.  The little “XT9”/”ABC” button on the left swaps between T9 predictive text and standard multiple-push ABC style entry.  To make things even cooler, if I tilt the phone on it’s side, it doesn’t stick with this keyboard but rather swaps to the standard QWERTY layout again because there is now enough space to use bigger keys, as follows:

10 - Landscape Keyboard

Now I can have the best of both worlds.  Of course my fingers still sometimes make mistakes, but that’s where the clever “auto correct” type feature kicks in and saves the day.  For example, if I’m typing an SMS and I want to start with “Hello” but by mistake I miss the “h” and press “g” to start with, the following happens:

11 - AutoCorrectIt actually lists alternative words that use keys near to the ones that I pressed, and selects the one it thinks is the most likely correction.  If I press “space”, it will automatically choose the word highlighted in green.  This is really useful and, as Leo Laporte said in an episode of TWIT (referring to the iPhone’s auto-correct feature) “as long as you trust in Steve, it will all work out” (slightly paraphrased). 

There are times when it’s not so great, as in the first time I typed in “Er” where it helpfully substituted the word “We”.  I didn’t realise that it thought I’d made a spelling mistake, so I happily sent off a rather cryptic sentence via Google Talk.  But that’s where Android have been really smart.  If I type in a word that the phone doesn’t recognise, I just have to tap on the word in the list of suggestions and it adds it to it’s dictionary and will use the new word in future.

I think the reason that the “T9” style keyboard is called “XT9” is because they’ve extended the standard “T9” to allow for similar mis-pressed keys.  So that the same ability that the landscape keyboard has to recover gracefully from my badly pressed keys extends to the “T9” keyboard too.

By mistake I also found out that doing a “long press” on a key gives you an “options” menu as follows:

09 - Phone Keypad - long touch     12 - Standard QWERTY - Long Press

For people who have to write Afrikaans stuff often, the ability to write é or ö at will could be great in the standard keyboard and when using the “ABC” mode of the “Phone Keypad”, it can be a nice time saver sometimes.

Categories
Uncategorized

HTC Magic – Part 1 – Unboxing and initial impressions

I’m going to do this in a few parts:

  1. Unboxing and initial impressions
  2. My first app for the HTC Magic
  3. Any updates to the impressions after my Vodacom sim card starts working
  4. Review after a week

On Friday morning I finally got the call that the phone had arrived at Vodashop Rivonia, unfortunately my HTC TyTn has a *really* bad camera so the pics from the shop didn’t come out too well.  The process signup was pretty smooth, although it took almost an hour to get completed.  (The shop didn’t have the HTC Magic on various lists and they all needed to get updated, and then the manager needed to do some approval but he’d popped out)

The phone came with a full battery charge (possibly because Vodacom updated the ROMs on the phones before selling them) which was great – no need to charge it before you can play with it.   Since I’m porting form MTN to Vodacom, I need to wait for the port to complete before I can actually make calls on the phone, so I’ll be writing another post to give any updated impressions of the phone once I can use it to make calls and such.

IMG_0739 I’ve had 2 other HTC phones and this packaging was probably one of the cooler ones that I can remember.  Nice and compact, and easy to open.  Relatively minimal clutter on the packaging.

 

 

Once you take off the outer shell, you see the phone, covered by a plastic film that says IMG_0742“Important – to prevent damage, do not apply excessive pressure to the screen or device case. Please remove the device from your pants pocket before sitting down.  For more details, see the Quick Start Guide.”  Now I’m assuming that this must not be present on the phones sold in the UK for two reasons.  Firstly, UK people would have to wonder why anyone would keep their phone in their underwear, and might be wondering about the logic in placing a pocket in one’s underwear.  Secondly, its assuming that everyone who uses this phone wears trousers and not skirts/dresses which is semi-sexist.  Sorry ladies/gents, you can’t use this phone if you’re wearing a dress!

Underneath the cardboard that the phone is resting on, is the rest of the contents of the box which looks like this:
IMG_0747
Going from left to right and top to bottom, those are: Charger, Accessories booklet, Corded earphones, HTC Care booklet, Warranty Statement, USB Cable, Quick Start Guide, Battery (below the guide), slim “leather” case, phone, and the cover with the warning described above.

What you’ll notice, if you compare this list of goodies with the list of goodies that Vodafone UK customers get, you’ll see that we’re missing the USB to Headphone jack converter cable.  HTC (in their usual style) don’t give you a Headphone jack to plug into on the phone so you have to use their USB headphones.   Vodafone UK clearly saw this downfall and rectified it by including a USB to Headphone jack converter cable, while Vodacom decided not to do that.

While I’m happily bashing Vodacom and praising Vodafone, my initial look at the Vodafone offering showed that they get the “with Google” branded phones which means that they’re missing a few apps that the Vodacom guys do get.  You can see the spec’s of the two phones here:  HTC Magic “with google” vs HTC Magic (not “with google”) .  From what I can see on the spec sheets here’s the bonuses of getting the one that is NOT branded “with google”:

288mb RAM instead of 198mb, “A2DP for wireless stereo headsets”, HTC Sync (for syncronising data with your PC), Microsoft® Exchange Server synchronization

[HTC Magic Comparison]

BUT there is more that they don’t tell you…the phones not branded “with google “ get:

  1. “HTC Mail” which besides being their Exchange integration, also does POP3 and IMAP mail
  2. PDF Viewer – for viewing PDF’s
  3. Quick Office – for viewing MS Office documents

So on the whole Vodacom are getting us a better deal than the Vodafone guys.  I’d be really impressed if there were no downsides, but there is just one (even though it’s not Vodacom’s fault).  The HTC Magic’s sold by Vodafone include Android Market which is where most of the great Android applications can be found.  It’s like selling the iPhone without the App Store, or a car without some place to “pimp it out”.  As far as I’ve been able to tell, most of this is under Google’s control, so there’s not much that Vodacom or Leaf can do.

What they have done is to create their own “Open Market” which is a great idea except that it doesn’t yet have many apps.  And as luck would have it, as I start trying to list some now their application starts off hanging (causing Android to try to close it as a non-responsive application) and then tells me that my device has not been given access to the Open Market and that I should contact my provider.

If you want to get apps I’ve found a few ways of getting them:

  1. Go to Cyrket (pronounced like Circuit), there you can find the app, then do a google search and hope that the developer has provided a direct download.  If not, PLEASE take the time to email the developer and ask them to make it available elsewhere.  I’ve found 3 or 4 developers who have been more than happy to send me a direct link to their software.
  2. Android Freeware (http://www.androidfreeware.net/)   I am not linking directly to it because their apps just seemed dodgy, like the “Facebook” app which really is just a shortcut to launching http://m.facebook.com
  3. Google – Just google for: Android Weather download, or Android Geocaching download.  It takes a while, but its been one of the best ways for me to get some nice apps.

If you’re a geek, you can take a look at http://code.google.com, then search for Android apps, download the source, open it in Eclipse, build the project, and then transfer the resulting .apk to your phone.  That’s how I got ZXing – the Barcode scanner – on my phone.  I’m not sure of the legalities of posting a link to the apk, so I won’t do it just yet.  I’ve also got a really basic Solitaire app too.  Some of the projects even link directly to their own APK, like GeoBeagle (A GeoCaching application for Android)

On the whole I’m really happy with the phone even though the lack of applications is slightly frustrating.  Apparently it took 6-8 months before Australia got the Android Market, and even then they only got access to the free apps so hopefully this will be fixed in time.  But until then we’re at the mercy of Leaf, Handango, Handmark, Mobihand, and the developers of applications.   If I think about the trade off – Android Market vs all the benefits of the non “with google” phone, I think we’re better off without the Market for now.

Categories
Uncategorized

Captcha’s in ASP.Net

I recently started getting some spam from my “contact us” page on my site.  I’d set it up “cleverly” so that it doesn’t try to send the mail to/from the addresses entered into the form since I’d seen online contact forms being used for “evil”.  Unfortunately I’d not taking into account the possibility that someone might use the form to send me spam.

Since I’d completely ignored that fact, I had not bothered to do any kind of captcha or other check to see that there it was a human that was sending the mails.  To be honest, part of the reason was that I’d imagined that making a Captcha work well would require WAY too much effort and I just wasn’t up to the task at the time.

Now that I was getting spam, I needed to make a plan and make one quickly before I was swamped by the mail.  Fortunately I remembered reading about ReCaptcha.  Basically they’re scanning books and words that are partly recognised get used in their captcha images.  Then when people enter the values for the captcha’s they’re helping ReCaptcha improve their OCR quality.

I headed on over to their site and was AMAZED at how many plugins and code “modules” they’d built.  Just take a look at the ReCaptcha Resources – When it comes to languages they have PHP, ASP.Net, Classic ASP, Python, Perl, Ruby, Java, JSP, and Coldfusion support.  And they have plugins for WordPress, MediaWiki, phpBB, Movable Type, Drupal, Symfony, Typo3, NucleusCMS, vBulletin, and Joomla.  That’s excluding the fact that they have an API that you could interact with directly.

On to the ASP.Net.  It’s REALLY easy.  You reference their DLL, then register a tag for their control on the page you want it to be placed on as follows:

<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

Then you sign up for an API Key, and place the Captcha control in place as follows:

<recaptcha:RecaptchaControl
  ID="recaptcha"
  runat="server"
  PublicKey=""           
  PrivateKey=""
  />

Then finally you just put in a bit of code on the submission of the form that checks:

if (Page.Valid())

If it’s not valid, then the user entered the wrong captcha.

Three simple steps, and super quick to implement… Now my Contact page has a Captcha on it :)  I love it when things just work, and work simply.

Categories
Development General

Java Dates from a n00b point of view

After spotting that seemingly 90% of the methods on the Date class were deprecated, I started getting worried.  Then when new Date().getYear() started giving me odd numbers like 109 instead of 2009.  I started thinking “Wow! Those Sun developers must have been on some strong drugs when they designed this language!”

So a bit more googling and some “WTF?!?!!?”’s later I found out that the Date class returns the time since January 1, 1970.  So of course .getYear() returns the number of years since then.  Well, not exactly.  Because there are only 39 years since 1 Jan 1970 and today.  So how the heck did getYear() return 109?  I didn’t bother to go any further than that – clearly the Sun developers were on drugs that should never have been invented, and I didn’t want to even think about starting to try and understand what was going on in their twisted little minds at that point in time.

BUT, I found out that they have a GregorianCalendar class which can help you out in most situations, even if it’s a little obtuse in how you use it.

The following code:

Calendar cal = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMinute, mSecond);

Gives you a calendar object based on the input you gave it.  Now of course I get a Date object from a database so I want to do new GregorianCalendar(mDate).  But again, that would be asking too much, so instead of that simple instantiation I have to do:

Calendar cal = GregorianCalendar.getInstance();
cal.setTime(creationDate);

Why, on earth did they call it setTime?  I mean, I’m setting a date and time.  I’m not just working with Time here folks! Surely the method should be named something a little better like .setDateTime() or .setDate()?

But wait… it gets better.  You know the Date class had a getYear() method, right? Remember? It’s the one that requires large amounts of hallucinogens to understand or use!  Well, naturally you’d expect that the Calendar class would have a getYear() that makes sense.

That’s where you’d be wrong!  Since they started with the obscure requirement of doing .GetInstance() followed by .setTime(mDate), they clearly hadn’t quite yet gotten off their high when they made the get() method.  Here’s how you use it:

Calendar cal = GregorianCalendar.getInstance();
cal.setTime(creationDate);
mYear = cal.get(GregorianCalendar.YEAR);
mMonth = cal.get(GregorianCalendar.MONTH);
mDay = cal.get(GregorianCalendar.DAY_OF_MONTH);

Yup, that’s right… why make it as simple as cal.getYear() when you can make it cal.get(GregorianCalendar.YEAR)?  Perhaps someone over at Sun had some stock in a company that provides treatment for RSI’s, so that by making us type out loads more letters they hoped to make more of us suffer not only the pain of using their language, but also of repetitive stress injuries.

BIG DISCLAIMER:

From my brief work with Java previously, I know that the designers were NOT on any drugs and in fact they probably had very good reason for designing the classes the way that they did. It’s just not immediately obvious to the new user, and that’s mainly what I’m ranting about here.  So, to all the Java fanboys out there who are preparing to unleash their full fury on me for my sacrilegious comments about their language – please take a moment and laugh before you post. 🙂

Categories
Uncategorized

Vodacom, HTC Magic, and bad communication

HTCMagic_small I’m one of *those* geeks!  Yes, the ones who want the latest technology and become all obsessive about getting it.  The ones who make the lives of those around them miserable when waiting because they keep saying “When I get my X I’ll do Y” or “I just read that there’s now an awesome app for device X”.

Back in the day (4, or so years ago) I was a Vodacom customer, but I swapped to MTN to get the iMate SP3.  I then stuck with MTN at my next upgrade to get the HTC TyTn.  So when it came time for my upgrade this year, I looked around and found nothing really cool in South Africa.  But there was hope for the iPhone and with the possibility of one of our networks releasing an Android based phone.

Last month MTN released the HTC Dream, and there were rumours that Vodacom were going to release the HTC Magic.  Last week (on around the 12th of May) a number of local news sources reported that Vodacom was indeed going to be launching the HTC Magic and while most of them just repeated a press release, a few offered extra info like MyBroadband’s “Vodacom to launch Google G2 phone”.  They mentioned that it would be available next week (aka from the 18th of May).

Long story short, I spent over 3 hrs waiting on hold to speak to someone from Vodacom Direct only to find out that they knew nothing about the phone.  Neither did any of the 4 Vodashop’s that I tried to contact.  Everyone kept saying “It will be out mid June” despite the fact that there had been the press release and articles and even despite the fact that a Vodacom brochure outside each of the Vodashop’s had an ad for the phone saying “Launching May 2009”.

I was ready to write a really peeved post about how terrible Vodacom’s communications were (Did you know? They even got the phone number for Vodacom Direct wrong in their press release!) until a Vodacom representative (vodacom3g) replied to a post on the MyBroadband forums saying:

They are in the warehouse but we’re busy updating the firmware. (Otherwise you all bitch and moan again! )
So speak to your local shop (they all order their own stock). I’d venture it should be in the shops in the next few days.

[Link to post]

Soon after that they responded to a few other questions.  Suddenly I knew why there was a delay (although it didn’t explain why the various channels I’d tried earlier hadn’t known) and I was happy with the reason.

Hopefully the phones will have started shipping out to my local Vodashop in the next day or two and I’ll finally get my hands on one of these babies within the next week.

Categories
Development General

Android, Eclipse and Java – First Experiences

After bitching about the lack of good tutorials last time, I found that I’d actually been looking at Android 1.1 tutorials and trying to run them on Android 1.5.

Now that 1.5 is out (well, it was released quite a while ago, but I’ve only recently started using it in earnest) I’ve re-read the tutorials and some of the introductory info on the Android Developer’s Guide. In my exploring I’ve hit MANY “Force Close” dialogs.  Unfortunately they never seem to say anything about WHY the app is being forced to close.ForceClose

The first few times I’ve just popped Eclipse into debug mode in an attempt to figure out what’s wrong.  Unfortunately it doesn’t seem to help much.The exceptions that end up being thrown seem really vague and not entirely related to the issue at hand.  So without any further blabbing, here are my top three reasons for getting a “Force Close” in my Android development:

1. Putting the call to setContentView at the end of the onCreate method instead of the start.

Initially I thought I’d be clever and first setup all my event handlers, and data binding and stuff.  But after some really confusing exceptions I realised that unless I call setContentView at the top of my onCreate, I won’t have access to any of the “objects” on my form.

2. Having an abstact class instead of a concrete class for my Activity

I’m not entirely sure how Eclipse and I came to this point, but somehow when adding this class I must have ticked a box that I hadn’t ticked before and suddenly the class was abstract.  No idea how or why this happened, and I certainly didn’t notice it at the time.

Of course I’d expect the exception to say something about “You cannot create an instance of an abstract class.” or something  meaningful like that.  But no, it seemed that this was not to be.

3. Not adding the Activity to the AndroidManifest.xml

This happened at the same time as the issue in point two so I’m not too sure if the two issues together just made the cause of the problem really hard to find.   Maybe I’m just too used to Visual Studio protecting me from myself, but this seemed a little silly.  I created a class that extends Activity.  Now I still need to go and add that info to the AndroidManifest.xml file?  I

People might think that I’ve been overly coddled by VS.Net, and that this is simply how normal development works.  If I used a Wizard to credit an Invoice, I’d expect to have a credit note created at the end, ready to send on to the client.  I wouldn’t expect to have to then go and specify the Client, and add the information for the line items, and then add up the totals manually and then finally to add on the VAT before I could send it.

There are a few nice wizards to get things started, but they often seem to only go half way. If I use a wizard, I expect the wizard to do the whole job.  So when I add an Activity to an Android app, I’d expect it to create the class AND enter the information into the AndroidManifest.xml file for me. Actually, in this case there is really no Wizard in the SDK toolkit to add the Activity – and that’s another gripe – there are wizards to create an Android XML file which is relatively easy to do.  But something like creating a new Activity requires a bunch of manual steps.  So where’s the consistency?

Anyway – enough whining.  Soon I’ll face the anger of a mob of Java developers. 😉

Categories
Uncategorized

Beauty and the Beast

In the past few weeks I’ve been playing around with Silverlight, WCF, ADO.Net Entities, and more recently some Java based in Eclipse and the Android SDK.

The Microsoft Side

Starting with Silverlight, I have had some frustrations with how “klunky” the interaction with designing UI’s is. Silly things like adding a tooltip with a number of controls on it  to an item, and using databinding to specify the text on the tooltip just doesn’t work.  If I used the Tooltip.Text=”{DataBinding Name}” attribute, it worked fine.  But if I tried to create a composite control to display in the tooltip, the databinding just didn’t work.  Googling didn’t help.

Additionally,it seems that when databinding does not quite work correctly when viewing a silverlight aplication, the entire silverlight canvas would just go “white”.  This happened not only on my sample applications written and run both on my laptop and on my PC at work, AND when using demo applications written by very respectable .Net component creators and authors.

Entities were just as frustrating.  Creating Entities from views ended up with entities that had a primary key containing EVERY single column from the view.  Trying to remove all the non-key columns using the UI required a right click and then un-ticking an option on EACH column.  There was no clear way to select all of the columns and just do it once.  Worse than that, after doing that extremely manual process, there were endless problems getting the entity model to “compile” without errors.  Eventually I had to edit the model in notepad to correct the numerous errors.

On my PC at work, when viewing the model, the entities would randomly disappear.  The only way to bring them back was to zoom in once, and zoom back out.  After doing that, the designer would display without any further errors.

I’ve heard many people praise Visual Studio.Net and especially 2008 as being incredibly stable and reliable. But from seeing these few, yet irritating, issues I can see that the starting points of their software is not always great. But given that Silverlight 2.0has been released for a while, it seems that even some of their released products are not above reproach.

One thing that I do admire though, is that the tutorials, video’s, documentation and samples available to get me started in using these technologies was really great.  There’s plenty of bloggers and resources out there to help anyone get started.  With VS.Net 2008 Express has helped make this possible. My laptop at home was using the Express editions, while my PC at work has a licensed copy the full edition. Both were able to work really well with all the new technologies.

The Java/Android/Eclipse Side

I got interested in Android a little while ago (issues with Windows Mobile mainly, and the inability to write apps for my phone if I bought an iPhone).  Android 1.5’s SDK was recently released, and so I downloaded it, and looked at their site and got some tutorial information. 

The installation instructions pointed to Eclipse and a plugin to enable integration with the Android SDK. That work all happened pretty easily. One of the first things I noticed was that the SDK documentation and surrounding pages had very few links to community sites.  Microsoft’s was teaming with links.

Then came time to run through the official Android “Notepad” tutorial.  There was a sample project to download and a bunch of steps.  The steps weren’t really logical, the code sample contained a LOT of errors that needed correcting, and I spent a LOT of time trying to figure out what I was supposed to be doing instead of actually understanding what the code was about.

As a new developer to Android, this could easily have put me off. If I was new to Java and had not recently played with XAML, it would most definitely have.  Perhaps I didn’t have the right starting points for getting to know Android, but starting at Android.com, should have given them to me.  Silverlight’s main site (Silverlight.net) had links to loads of great resources, but I didn’t find any real alternatives on Android’s site.

What did impress me, however, was how well the Eclipse IDE worked.  It had some impressive refactoring, and intellisense abilities.  And where Microsoft “borrowed” features from Java, Android had “borrowed” from Silverlight.  Their UI design is very much similar to XAML, and the UI editor in Eclipse was pretty fully fledged.

A few of the small things that I had seen as “new features” being implemented in VS 2010, were already working in Eclipse,and I really liked some of the ability to infer creation of fields and properties on a class.

When I last used Java, there were no real IDE’s worth using (please bear in mind that this was about 9 years ago, so no flames please)  I haven’t really visited the Java world since then, so this was quite a pleasant surprise.