Friday, August 28, 2009

Tweet Hate

So often when I mention that I am a twitter user I come across haters. The most common reason for the hate is that “twitter is pointless” and “tweets are boring”. Aside from the fact that these opinions are usually second hand (the worst kind of opinions) they are also misguided.

The reason these opinions are misguided is that they blame twitter for the banality of some of its users. Twitter is simply a new medium for communication much like the mobile phone was not so long ago, and is thus entirely incapable of being banal or interesting.

If you have to listen to a boring friend on the phone do you tell everyone that phones suck and phone users are boring? Of course you don’t, you just screen their calls and find someone more interesting to talk to. You might also consider the fact that it is possible that you are boring to listen to yourself, and you need to work on being a more interesting human being.

So my message to the haters - twitter is not boring, just you and your friends are.

Sunday, August 23, 2009

Google Latitude vs Tweetmondo

I've just been trying out Google Latitude this week on my Android phone. I have also been using the Tweetmondo layer on Layar (see Augmented Reality Phone Tweeting), so I thought I'd do a quick comparison for anyone thinking of adding location services to their social media suite.


FeatureTweetmondo/LayarLatitude
LocationDefault is "suburb" accuracy, I'm not too bothered if strangers can see what suburb I am in, and it only updates when the Tweetmondo layer is open. Locations are show on a map or augmented reality viewLocation is scarily accurate, but only available to friends I have invited to view it. Once again this only updates while the Google maps application is running. Location is only shown over google maps (no AR)
UpdatesDone in twitter after updating location on Tweetmondo layer in Layar, so have to use two separate appsDone from within latitude as "shout outs", all integrated and easy to use
Following/PrivacyJust like twitter, you are visible to anyone who's looking!Invite only, so more privacy but this makes it harder to find new friends


After creating this table I'm starting to think that the title of this post is perhaps a little innacurate. Latitude and Tweetmondo compete in slightly different niches of the social media space so this is not really a "vs" situation. I see myself using both applications. I will still use Tweetmondo to interact with people I don't know (trust?) in my immediate vicinity, but those people I get to know and trust will eventually be promoted from a tweep to a latitude friend.

Feel free to leave a comment and let me know which of these apps you use, and how much you trust your tweeps and friends.

Thursday, August 20, 2009

Augmented Reality Phone Tweeting

The augmented reality app Layar has just been released (17th August) on the global Android market. If you have an Android phone and you tweet then you will love the Tweetmondo layer. This layer takes the image from your phone and overlays an impression of recent tweets that happened close to where you are standing. For a youtube video of the app in action check out the Layar Blog, it works for me just like it shows here.

This app is great for an early release, but it can be a little confusing to get started and I couldn't find any instructions. Here is what you can do to get started.
  1. Install the Layar app on your phone
  2. Start up Layar, go to the Featured tab and hit Tweetmondo
  3. The Filter Settings dialog opens, you can probably just hit Apply
  4. Your gps icon will show in the notifications bar and you should see the output from your phone camera with a grid overlay and hopefully some bird icons representing tweeters
  5. Tap one of the tweeter bird icons then tap again on the info bar that appears at the bottom of the screen
  6. Select Privacy then you will be redirected to register your phone with Tweetmondo. Enter your Twitter credentials
  7. Now whenever the Tweetmondo layer is open on your phone your location is updated with Tweetmondo servers. By default this is not too fine-grained, for example my location shows up as something like Scarborough, Perth
  8. Now you can use your regular everyday Twitter app (I use Twidroid) to tweet and it will show up on Layar at your location.
One showstopper with the above instructions is that if you are in an area with no other Tweetmondo users you can't set up your phone to update your location through the Tweetmondo layer. When this happens you will just have to wait until you are somewhere busier and try again.

I think this is really cool for the extra level of engagement it offers to tweeters, but I'm sure just like Twitter itself this will not be everyone's cup of tea.

Friday, August 14, 2009

How to Open Gmail Attachments with Android Apps

I've just added a new feature to my Android cook book application Bites! You can now send and receive recipes as xml files attached to emails.

From the users point of view the feature works like this:
  1. The sender simply long clicks on a recipe and selects send via email in the context menu. The gmail application opens up with the recipe attached to an email, all that is left to do is enter a contact name in the to field and hit send.
  2. The receiver simply opens their gmail inbox and hits the preview button next to the recipe file attachment, then Bites opens with a dialog box asking if they want to import the recipe. That's it, couldn't be easier!

Now the technical details for those of your that are looking to include the ability to open a gmail file attachment in your own Android applications.

First up you'll need an intent filter to handle the attachment file type you are interested in opening with your activity, so to open xml files your activity needs the following in the manifest (leading underscores to allow display in blogger).

<_intent-filter>
<_action name="android.intent.action.VIEW">
<_category name="android.intent.category.DEFAULT">
<_data mimetype="text/xml">
<_/intent-filter>

Then in your activity you'll need to handle the gmail attachment intent uri which has a content:// scheme. This intent contains a uri to a gmail content provider that points to the file attachment on google servers. To read a file attachment you have to open an input stream from the content provider using the uri in the intent created by the gmail application like this:

if (getIntent().getScheme().equals("content")) {
InputStream attachment = getContentResolver().openInputStream(getIntent().getData());
...
}


In my application this input stream is an xml file, which I can then create a document object from and parse using the following:

DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(attachment);
attachment.close();
Element recipe = doc.getDocumentElement();
String strRecipe = recipe.getAttribute("name");
...

To see the full code in context take a look at the Bites source code (available under GPLv3).

If you would like to install Bites just scan the QR code below with your Android phone (you'll need to use the barcode scanner app).



Saturday, August 8, 2009

Foam Dust

After a bingle on the water the other weekend with an old guy in a floppy hat my long board was looking a tad sad. What looked like a minor crack in the gloss at first inspection turned out to be a pretty decent crunch with the foam crumbled and soft behind it for several inches.


So after cursing old guys floppy hats and crowded beaches for a few minutes I checked out the board lady's site for some sage advice, then took a trip to Bunnings and bought a new 5" rotary sander.


After grinding out all the damaged material with great enthusiasm I was left with a pretty scary looking hole. Following the board lady's advice I then filled this up with even scarier looking blocks of foam (divinycell), which I first heated in the oven so I could shape them to the hole. The chemical aroma that emanated from my oven would indicate that it would not be a good idea to cook a pie at the same time as heating up divinycell.


After applying resin, glass cloth and masking tape to hold the whole mess together I left it to dry and was left with the lumping looking result in the picture above. I then sanded this back down to the rather pleasing result show here.
After filling in a couple of little holes with some glass fibre dust mixed with resin I'm putting my feet up for the next drying phase. Look for my next post on painting this and glassing over it, hopefully to restore my longboard to like new condition.

Friday, August 7, 2009

No Gmail in Android SDK

I've been frustrated in recent days by the Android SDK not including the gmail app. The email app included with the SDK works differently to the gmail app which is what all the users will be using.

I'm trying to include a new feature in Bites where users can share recipes via email attachments. The sending part is working. The receiving part is not, and finding out why is not so easy as the gmail application is not available to debug with on the emulator.

The only option available to me so far is debugging on a physical device, which reduces me to old school debugging using the Log.d function and logcat in DDMS. This is quite tedious when compared to the step through debugging possible when using the emulator.

Google, if you are listening can we please have gmail in the SDK. I'm not bothered if it is a closed source binary, I just want to test with it.

Stay tuned for my post on how to open gmail attachments with your app (as soon as I work out how to do it).

Thursday, August 6, 2009

QR Codes for Android Market Apps

I'm really excited about QR codes at the moment! Data entry and searching are great on new smartphones but still a little slow and tedious compared to the instant gratification we are used to on a pc. So the ability to just aim my phone camera at a code and receive information or navigate to a url is very cool.
When I was checking out my application listing on AndroLib I realised that these guys are using QR codes to create Android Intents. There are just so many possibilities with this.

The QR code listed for my app Bites on AndroLib looks like this:




When I decoded this with the online zxing decoder I found it contained the string market://search?q=pname:caldwell.ben.bites which when scanned with my phone opens the market with a search result for Bites. What an easy way to get data and intents between a pc and a phone!
There are just so many creative and subversive ways to use QR codes, they have even found their way into street art.

Well done to the ZXing guys too, I use their barcode scanner app from the Android market for barcode scanning and I have to say they have done a fantastic job!

Tuesday, August 4, 2009

Testing Android Apps Without Jailbreaking Your Phone

I've been hard at work developing the next update of Bites, my cookbook app for Android phones and now I want to start testing on a physical device not just the sdk emulator.

I don't like the idea of jailbreaking my phone, it is still my main source of communication and I don't want to risk paying out the rest of a 24 month contract while having a useless bricked phone. So last night I found that I can test an app update without releasing to market. Here is what I did:
  1. Export the signed .apk as per a market release
  2. Post the .apk on my code hosting site as a testing release
  3. Navigate to the .apk using my phone browser and click to install
  4. The phone tells me it cannot install apps from outside the market then allows me to go to a settings page on which I can tick a box allowing apps from outside the market
  5. Try again and the app installs

I'm assuming this will only work with apps that have already been released to market. I tested this with an unsigned .apk and my phone would not install it, so it looks this is a neat little backdoor for honest developers.

There is a potential for security problems but only if a developer turns bad or an app signing key is liberated.

Monday, August 3, 2009

Carving & Code

Bam! My first blog post. Carving Code is going to be my online record of how I did what I did after I did it and found that it worked. The focus will be on my main passions: surfing, windsurfing and open source software, but I'm quite sure I will diverge into other topics as the mood takes me.

Currently I'm fixing a rail ding on my 9'1" longboard and updating my recipe book application for Android phones so expect a post on one of these sometime soon.