VimeoDroid Update – 2010-09-02

In about an hour from when I post this, the video will have been encoded and available here:

http://www.vimeo.com/14660170

  • Added the ability to see contacts and their videos
  • Manage transfers
  • Sort videos
  • View video details
  • View video comments
  • Delete your own videos
  • Improve authorization process

VimeoDroid updates now has its own page

Instead of putting up new posts for every time there’s an update, I’ve created a page for it.  You can get to it from the links on the top of this page, or by going here:

http://www.makotosan.com/vimeodroid

VimeoDroid – 2010-08-19 Update

Latest update:

So it’s a little bit more work for the upload functionality than I had originally thought, but still moving along.  Here’s what I have planned for uploading, which I took the idea from the way other apps upload.

  1. Choose video/record
  2. Start upload process as a service and add an icon to the notification tray while it’s uploading.  If you pull down the notification tray, you’ll be able to view your upload(s) progress.
  3. Implement an uploader that  can track the progress.  The built in methods to POST files via HTTP using the Android API don’t support monitoring the progress.
  4. Be able to pause/resume the upload.  For example, for CDMA users, if a call comes in, the data connection is severed.  Will need to be able to resume uploading once a connection is restored.  This could even happen if a user switches from CDMA to WiFi or whatever.

I’ll search around and see if someone already wrote some code that does this for the Android.  If so, that would be great.

What I managed to accomplish today is:

  • Cache video thumbnails to external storage (SD Card), if the device has an SD card.  Android is pretty aggressive about memory conservation, so in a list (such as the list of videos), it’ll destroy the rows that are no longer visible as you scroll, and then redraw them when they are visible… which means that it has to redownload the thumbnails.  Now that it’s cached, it is much smoother.
  • Implemented the “Refresh” button functionality.
  • Begin work on the HTTP uploader that will allow me to track the progress.

Things to do in the immediate future:

  • Finish the upload functionality
  • Add search capability
  • Add additional error handling
  • Add the ability to see full information for a video, such as comments, credits, tags
    • The video information page will also have links for downloading the video in SD format, and also HD format if it’s available.

Vimeo Droid – 2010-08-18 Update

The initial load of the app was going slow because it was on a single thread, and the HTTP call to get the list of videos in your subscription was going slow. I’ve now put these on a separate thread and show a ProgressDialog to let you know that something is going on.

Did a lot of refactoring to clean up the way the XML was being parsed, although, this means nothing to the end user. The XML parsing is the most tedious part of writing this app, since there are many different methods that Vimeo provides and different messages that they return.

Added a Menu that has four options, Record from camera, Upload (from your gallery), Refresh, and Logout.

Working on implementing the upload functionality.  The Android API doesn’t natively support multi-part mime encoded messages, in other words, I had to end up using third party libraries to help with this so that I can POST a file attachment.

Will be adding Search functionality next as well so that you can press the Search button on your phone, and search videos on Vimeo.

Vimeo Droid – Vimeo Android application

So I’ve been wanting to get into mobile phone development and now that I have an Android device (HTC Evo 4G), I can now start developing and running it on my phone.

I’ve been a big fan of the video site Vimeo.com for a while and looked around for an app that would allow me to easily interface with it on my phone.  However, I have had no such luck finding such an app. I figured this would be a great way for me to get some practice and create something useful for me.

Fortunately, Vimeo has a public API that allows developers to access many features of their site.

Here’s the steps that I’ve taken so far.

  • Get authenticated
    • Vimeo relies on the OAuth protocol to authenticate requests.  This is the same protocol that many other sites use, such as Twitter.  I was able to make my life easy and use oauth-signpost . Thanks to signpost, this part was a breeze.
  • Make HTTP calls
    • Vimeo has a bunch of different methods and in order to call them, I need to make an HTTP call, and in return I can get XML, JSON, or PHP data.  I’ve chosen to use XML for the moment.
    • XML parsing – for this, I’m using the built in XML Pull Parser.  I’ve read that this will give me better performance over SAX.  I just wish there was a way I could easily deserialize XML to classes like I can in C#/.Net.  In C#, I can decorate my classes/properties with attributes that tell it what XML tag/attribute that it would match up with and easily deserialize.  In Java/Android, I have to loop through each element, check the name of the tag, and then pull the values manually.  A bit of a pain in my opinion.  If anyone knows a better way to do this without downloading a large dependency or sacrificing performance, let me know.
  • Get video url
    • This part was actually very tricky.  Vimeo doesn’t want developers to be able to access the videos directly, but instead, take the user to their mobile version of their website.  I’m sure you can see how this would be undesirable, and the whole experience of playing the video in a browser rather than using the native video player is not very nice. You can read the forum posting where people are asking about how to do this, and Vimeo responding that it can’t be done here http://www.vimeo.com/forums/topic:20132 . After some reverse engineering, I was able to figure out how to do this, but it was no easy feat and I don’t want to share the details about it on here.
  • Play video
    • So I was very excited when I got my videos to play!  However, I noticed that videos that I uploaded a long time ago (in 2008) ended up being encoded in .flv format, whereas newer videos are encoded in .mp4 format.  Currently, the native Android player doesn’t like when I try to play the .flv videos, but as long as you’re playing newer videos, it’s working fine.  Maybe there’s a way that I can get the Android player to play it.

Things to do:

  • Show thumbnails and video information
  • Make it multi threaded.
  • Handle exceptions
  • Allow recording and uploading from camera and file system
  • Possibly allow downloading of videos
  • Allow management of videos, subscriptions, contacts, etc.

Going from an iPhone to the HTC Evo 4G – Comparison of iPhone vs Evo 4G

For a long time, I’ve been a huge fan of the iPhone, even recommending it to everyone I know.  It pretty much revolutionized the smart phone, Windows Mobile was practically a joke.

I’ve also been a fan of Google and figured that if their Android OS is anything like their other products, then it should be pretty promising.

So I’ve had the chance to play around with a couple of Android devices and must say that I was pretty impressed.  I finally gave in and got the Evo 4G two days after it was launched on June 4th.  Sprint offers a 30 day guarantee, so I figured that I could just try it out and if I don’t like it then I’ll just return.  Here are the differences that I’ve found between them so far.

Feature Apple iPhone HTC Evo 4G
Video calling using the Cellular network No Yes
Able to open up common documents (Word, PDF, Excel, Powerpoint) Yes Yes
Save files to the device to view later Only images Yes
Uninstall and Refund application purchases No Yes
Exchange Support Yes Yes (but doesn’t show HTML formatted emails when using Exchange Server 2003)
Restrictions on applications Yes (unless jailbroken) No
Able to set ringtones from MP3s on the phone No Yes (And also edit ringtones)
Ability to change out system keyboard No Yes (For example, ShapeWriter keyboard)
Smooth integration with social networks No Yes (syncs up contacts from social networks)
Integration with Google voice No Yes (Can configure phone to call using Google Voice and switch Visual Voicemail to use Google Voice instead)
Quality and selection of applications This is where the iPhone currently excels, there are a lot more apps. You can find a lot of the more common apps that are on the iPhone on the Android as well, such as Pandora, Facebook, Foursquare.  With a cross platform SDK in a common language (Java), it won’t be long until we see a lot more.
Voice Dial Only with 3GS or 4 Yes
Compass Only with 3GS or 4 Yes
Multitasking Only with 3Gs or 4 after iPhone OS 4. Yes
Adobe Flash support No Yes (with some small limitations until Android OS 2.2 aka Froyo, then it’ll have full Flash support)
Replaceable battery Only with iPhone 4. Yes
Replaceable/Upgradeable memory No Yes
Internet Tethering Yes (since iPhone OS 3.0, however AT&T hides this feature) Yes
Create WiFi hotspot No (However, can be done with a jailbroken iPhone and an app such as MyWi) Yes (additional charges may be charged from carrier however)

In my opinion, both Apple and AT&T are too restrictive.  AT&T’s network can’t handle the load of all their users, so they impose a lot of restrictions, such as not allowing video chat, or disallow tethering.  Not to mention, their latest change in dataplan where you only get 2GB of data transfer.  Apple also is very restrictive about the types of apps in the App Store, such as disallowing a competiting application to their iTunes store called Grooveshark.  You also can’t have any apps that compete with their existing products, such as their web browser. On the Android, you can download the Opera browser and use that if you want (although Google’s browser is much better in my opinion).

If you’re an iPhone owner and a big fan of it, I’d recommend you open up your horizons and give the HTC Evo a try.  If you don’t like it, return it for a refund.

HP Creates a new type of computer – Labtop?

I recently had a conversation with a friend, and heard some news that HP has now created a new type of PC…. the labtop.  I have a conversation below that confirms this news.

Them :  my puter is running slow….i want to get songs DLed to my MP3

Me : Why is your computer running slow?

Them :  well i had a labtop, but HP wants $430 to fix the screen so im trying to find someone else to fix it

Me : labtop? Is that anything like a laptop?

Them : huh??

Me : You said you had a labtop.

Is that for school where you use it in a lab?

Them :  no….

I had a regular labtop…there is a crack in the screen (from what HP said) and they want $430 to fix it

Me : I’m not familiar with a labtop. Is it anything like a desktop or a laptop?

Them : what are you talking about? its a regular labtop like you see in stores

Me : I have never seen a labtop. I’ve seen laptops/notebooks, but never a labtop.

Them : ok, you are confusing me! a labop is a labtop!

*labtop

Me : Do you mean laptop?

Them : its an HP Pavillion

Me: I just did a search and HP doesn’t make any labtops, but I did see that they have laptops.

Them : how can you say they dont make any labtops when you said you see they have labtops!

Older people think differently when it comes to online shopping.

The other day, I was at my dad’s house for Easter brunch, and a conversation about shopping online had come up.  I mentioned how much I love it and primarily do my shopping online and haven’t shopped at a retail store for a while.

My stepmother had told me that she doesn’t feel comfortable shopping online and doesn’t feel that it’s secure.  She’ll only shop online if they have a customer telephone number where she can place her order.  I was really taken aback by this and explained to her the advantages of shopping online versus over the phone.

  • More secure – Shopping online on a site that has SSL enabled (starts with https://) would take thousands of computers a couple of years to try to decrypt. To see proof, visit http://www.distributed.net/rc5/ , and even donate your computer’s time to decrypt a 72-bit key.  Most stores have at least a 128-bit encryption key.
    • Telephone security – I don’t know if people realize this, but phone lines are very insecure.  Anyone can open up a telephone access box and listen in.  Hackers would create “beige boxes” to tap into phone conversations.  Also, my dad works at a telecommunications company, and I remember visiting his office as a young child and being able to listen to phone conversations.  Someone working in a Internet Service Provider office could theoretically “listen to” your packets, but this would be very hard to decipher what’s useful and what’s not, and it’ll look like garbage when it’s encrypted.
    • Credit Card security – When you place your order over the phone, your giving out your credit card information to some human on the other end that you can’t see.  Do you know what they’re doing with your credit card number? Are they writing it down somewhere? You have no idea.  When placing your order online, your card is only seen by computers and reputable stores will store your information encrypted.
    • Less Error prone – Like I said, your giving your info to a human.  There’s usually the whole process of giving out your information, they repeat it back to you, and then you verify that everything sounds right.  Who wants to deal with this?

I wonder how many people out there think this same way?

Spammers

So I have this clever system of tracking spammers.  I own a few domains (such as this one you’re on) and also setup a catch all e-mail address (ie *@mydomain.com).  Any time a site asks me to register, I’ll use their domain name as my e-mail address.  For example, I’d register as google.com@mydomain.com.  Now if I look in my inbox and notice a lot of spam sent to google.com@mydomain.com, I know what domain it came from (btw, I don’t get any spam from Google, it was just an example).

I’m going to make a list of sites that have compromised my e-mail address:

  • myhappyplanet.com
  • obama.com (this was a bit shocking to me)
  • imtoo.com

Grooveshark Saver – How to save songs from Grooveshark, simple to use Grooveshark downloader

I’ve been using a program called PandoraSaver that allowed me to save songs from Pandora to my hard drive, but I really also like the service that Grooveshark provides, but couldn’t find anything that would help me save songs from there. The latest version of PandoraSaver supported Grooveshark, but hasn’t been updated or maintained to work with the new Grooveshark site.

Now I’m not sure how legal this is, but the way I see it is that they are sending me the files to my computer where it gets stored in my browser’s cache temporarily… so is it so wrong to move it from one place on my hard drive to another where I can conveniently access it again? Also, this saves companies like Pandora and Grooveshark money since they have to pay royalties to the artists for every play… however, with that same logic, the artists will potentially lose some money, so be sure to continue supporting your favorite artists by purchasing a shiny new CD.  If I really love a song or artist, I enjoy having the physical CD with the album artwork and photos inside.

First things first, you’ll need to download and install Fiddler (http://www.fiddler2.com/fiddler2/). Fiddler is a web proxy that intercepts all traffic from your browsers. I simply wrote a plugin for Fiddler that will listen for certain requests from Grooveshark and save them.

Once you have installed Fiddler, download my plugin. Extract the files to the Scripts folder in your Fiddler2 installation folder (default is C:\Program Files\Fiddler2\Scripts for 32 bit Windows and C:\Program Files (x86)\Fiddler2\Scripts for 64 bit Windows).

Then fire up Fiddler and you should see “GrooveShark” in the menu. Click on Settings to configure your file save location and naming schema.

If you’re using Firefox, Fiddler automatically installs an extension that you’ll see in the status bar to toggle whether or not to send traffic to Fiddler.

If you’re using IE or any other browser, you don’t need to do anything. Fiddler adjusts your System’s Internet connection properties to send traffic to Fiddler.

I wrote all this in just one night so there may still be some defects. If there are, please let me know.

Update:

Found out that the PandoraSaver plugin has been updated and now works with Grooveshark. You can use that version too if you’d like: http://hak5.org/forums/index.php?showtopic=13598

WordPress Themes