Favorites, yfrog and file based photo upload

I just finished up coding new features for Twim v1.12. New features in this release:

  • yfrog support
  • Favorites support
  • File based photo upload
  • Recent timeline not loaded on startup automatically (to reduce bandwidth usage)
yfrog

yfrog.com

With the latest release you can share your photos with yfrog service in addition to existing TwitPic and Twitgoo services. Now you can also send image files so your phone doesn’t have to support Media API. The file based photo upload displays a file browser so that you can select a file to be uploaded to a selected service.

Another big feature is the favorites support. You can now mark statuses as favorite. Favorite statuses are displayed in separate timeline. I’ve been using this feature to store statuses containing interesting links so that I can check them from desktop browser later on (http://twitter.com/favorites).

Twim is still free and you can download the latest binaries from here.

People have mentioned many good ideas for the future versions of Twim, like auto-refresh for recent timeline and incremental update to reduce the bandwidth usage.

New Twim with Twitgoo Support

New release of Twim is once again out of the door.

Twitgoo Service

Now you can post photos from Twim to Twitgoo

With the latest version (v1.11) you will gain the following new features:

  • Twitgoo support. Now you can take a photo and send it directly to Twitgoo service.
  • Retweet feature fills up the status update box with the selected tweet.
  • Clock is shown in the bottom of the menu screen so you know what  time it is even if you Tweet with Twim 24/7.
Photo services

Photo services

Download the latest version from Twim page here. Tweet me (@tlaukkanen) if you like the new features :)

For the next versions I have planned on implementing an option to upload existing photos from your memory card as then you will have much more higher quality photos to upload to TwitPic and Twitgoo. This is because Java MMAPI doesn’t let application to take full resolution pics within Java application for unknown reasons.

You asked for it, You got it (TwitPic)

It seems that Twitter made some changes to their API since the Twim application just started to have some trouble when parsing the date stamps for the statuses. That turned out to be a simple bug that was causing it. The bug was fixed in a second but I couldn’t make a release before I had finished implementing the TwitPic support that I had already started coding. TwitPic support was highly requested from many users so hopefully this will make you happy :)

Photo uploaded to TwitPic via Twim

Photo uploaded to TwitPic via Twim

I just uploaded the latest release files of v1.9 to the Twim page. Go ahead and download the new version. Please leave a comment if you like (or don’t like) the new feature :)

Learning the git, Mobidentica now Open Source

I’m learning to use the git, distributed version control system. It seems to be much faster then Subversion that I have used with my Google Code projects. I just created a repository on GitHub for Mobidentica project. Source code is available under the Apache License 2.0. If you like to clone the repository, use this:

git clone git://github.com/tlaukkanen/mobidentica.git

I’ll have to see if I’ll start using git with those projects that are on Google Code as it seems to be possible too: Benjamin Lynn from Google Developer Programs wrote a blog post on how to use git on Google Code projects.

Optimizing Trail Recording

I coded a prototype how we could record fewer GPS positions in Mobile Trail Explorer and therefore save some memory but still have the same level of detail of the trail. Video might explain it best. Unoptimized recording is on the left and optimized trail is on the right.

The algorithm simply checks if the current direction have changed since last recorded position. If direction isn’t changed over the tolerance value then we can replace the last position with current position. Otherwise we only append the new position to the trail.

  1. public boolean canRemovePreviousPosition(
  2.         Vector<GpsPosition> positions,
  3.         GpsPosition pos1) {
  4.  
  5.     if(positions.size()<2) {
  6.         return false;
  7.     }
  8.  
  9.     GpsPosition pos2 = positions.elementAt(
  10.             positions.size()-2 );
  11.     GpsPosition pos3 = positions.elementAt(
  12.             positions.size()-1 );
  13.  
  14.     // Calculate last angle of trail
  15.     double latDelta = pos2.lat – pos3.lat;
  16.     double lonDelta = pos2.lon – pos3.lon;
  17.     double lastAngle = Math.atan(latDelta/lonDelta);
  18.  
  19.     // Calculate current angle
  20.     double latDelta2 = pos3.lat – pos1.lat;
  21.     double lonDelta2 = pos3.lon – pos1.lon;
  22.     double currentAngle =
  23.             Math.atan(latDelta2/lonDelta2);
  24.  
  25.     // Get absolute value of direction change
  26.     double angleDelta =
  27.             Math.abs(lastAngle – currentAngle);
  28.  
  29.     // Check the tolerance (0.105 radians = 6 degrees)
  30.     if(angleDelta>0.105) {
  31.         return false;
  32.     } else {
  33.         return true;
  34.     }
  35. }