RIM on Adobe Abandoning Mobile Flash

Adobe announced today that they're stopping development of their mobile Flash player as soon as they release Flash Player 11.1 for Android and BlackBerry Playbook. Both of which are mobile devices, but don't run the mobile flash player.

Hopefully an OS update isn't required for those devices to get the new version of Flash Player, otherwise the majority of Android users are screwed. The PlayBook is currently running Flash 10.2.

A few hours later RIM posted a trademark-filled statement on their blog:

Earlier today, Adobe announced plans to stop investing in Flash® for mobile browsing, and focus more efforts on HTML5. As an Adobe source code licensee, we will continue to work on and release our own implementations, and are looking forward to including Flash 11.1 for the BlackBerry PlayBook.

The strategic direction announced by Adobe today further validates RIM’s decision to launch the BlackBerry PlayBook with a full-powered and uncompromised desktop class browser supporting both Flash and HTML5. We are pleased that Adobe will focus its efforts on next generation Flash-based apps delivered via AIR and BlackBerry AppWorld as well as the great opportunities that HTML5 presents for our developers as we discussed at DevCon Americas.

In essence they're saying:

Adobe just blindsided us with that announcement and even though we pay them an outrageous licensing fee for access to their source code, we don't have a copy of this mythical Flash 11.1 to test on the PlayBook. Luckily we support HTML 5, because we're probably going to be dicked-over by Adobe again in the near future.

I wonder how long until RIM changes direction again and begins to downplay the PlayBook's Flash support?

Bookmarklet: Scroll to the first new tweet

The Twitter web interface polls for new tweets and displays a notification when any are found. Clicking on that notification will show all of the new tweets. I've found there is a point with a relatively small number of new tweets – between 30 and 200 – where I want to skim them all, but it's a hassle to return to the position where I left off reading.

New Tweets Notification

The visual indicator for the newest tweet is very subtle and virtually unnoticeable while scrolling fast.

Newest Tweet Indicator - A slightly darker line

Solution

It's a fairly simple problem to solve with a bookmarklet – a tiny bit of javascript that is manually executed by opening a bookmark.

Right-click and bookmark the following link, or drag it to your bookmarks toolbar or menu: First New Tweet

This may not work in a feed reader. If that's the case, manually add the bookmarklet or view the original post. Internet Explorer may prompt you about adding a Favorite that is not safe; ignore that, or get a better browser.

There is a known bug (#86643) affecting some versions of Chrome that results in a bookmark that does not contain a name. Right click and Edit the bookmark to fix that.

To use the bookmarklet, open it the way you would a normal bookmark. If there are new tweets, the browser will automatically scroll to the oldest new tweet – which will be right above the last tweet visible prior to loading the newest tweets.

Read more about bookmarklets at Wikipedia.

Source Code

Unminified code, complete with a modified version of Dustin Diaz's getElementsByClass to accommodate Internet Explorer. I briefly tested this on Google Chrome 13, Firefox 4 and IE 8. This isn't meant to be pretty.

javascript:(function(){
  if( document.getElementsByClassName ) {
    var t=document.getElementsByClassName("last-new-tweet")[0];
    if(t) {
      window.scrollTo(0, t.offsetTop + t.offsetParent.offsetTop );
    }
  } else {
    var els = document.getElementsByTagName("div"), elsLen = els.length, pattern = new RegExp("(^|\\s)last-new-tweet(\\s|$)");
    for (var i = 0; i < elsLen; i++) {
      if ( pattern.test(els[i].className) ) {
       window.scrollTo(0, els[i].offsetTop + els[i].offsetParent.offsetTop );
       break;
      }
    }
  }
})();

Minified code, in case you'd like to manually create your own bookmarklet.

javascript:(function(){if(document.getElementsByClassName){var t=document.getElementsByClassName("last-new-tweet")[0];if(t){window.scrollTo(0,t.offsetTop+t.offsetParent.offsetTop);}}else{var els=document.getElementsByTagName("div"),elsLen=els.length,pattern=new RegExp("(^|\\s)last-new-tweet(\\s|$)");for(var i=0;i<elsLen;i++){if(pattern.test(els[i].className)){window.scrollTo(0,els[i].offsetTop+els[i].offsetParent.offsetTop);break;}}}})();

VUVUZELA for BlackBerry

The preferred noisemaker of the 2010 World Cup: the vuvuzela. For some reason these were distributed to fans attending World Cup matches, ruining the match for everyone watching at home.

When played by a stadium full of people the vuvuzela sounds like angry bees. I'm always up for a small project to help improve (or build) my BlackBerry development chops, and a vuvuzela app seemed like a perfect candidate. There are a slew of vuvuzela apps for the iPhone, but I only saw one other vuvuzela app for the BlackBerry, and that one only has a single vuvuzela sound.

Mine? It has 7.

I built the app with the 5.0 JDE. I tested it on a Storm2 9550 and Bold 9700 both running OS 5 and an 8820 running 4.5 and it worked on all three. If it doesn't work for some ancient OS, get a new phone.

Usage

Visit http://j.mp/cfg-vuvuzela using your BlackBerry to install the app. On newer devices the icon can be found in your Downloads folder.

Scroll and click a button to play the sound, or press the keys 1-7. You don't need to hold the ALT down; pressing W is the same as pressing 1. I haven't tested this on a SureType (Pearl) device.

Known Issues

  • Multiple audio threads – This is a J2ME limitation. I use javax.microedition.media.Player to play the audio, and you can only have one Player instance on CDMA devices and two on GSM. I read this on the BlackBerry support forums, and confirmed with a member of RIM's media development team.
  • Initial launch – the first time you launch the app on OS 5 it can take up to two minutes before the screen displays. Oddly enough it launches immediately on an old 8820 running OS 4.5. I'm looking into why this happens.
  • Volume control – I'm actually not sure where the volume setting comes from, I just play the sound and it works, and it's loud. The way the VUVUZELA should be.
  • The folks over at SistMan Software also have a vuvuzela app, and there is a conflict since both of our primary modules are named Vuvuzela (Vuvuzela.cod, etc). Until that's fixed, you can't have both apps installed. I like to think mine is better since it has more sounds, but they launched first and I'll publish a minor update with a unique module name.

Download

Download it OTA – Please link to this page, and not the .jad directly.

Passing Multiple Automator Variables to a Shell Script

Automator is incredibly powerful, but at the same time the most useless and semi-functional piece software I've ever encountered. I recently built my first Automator Workflow to watermark a PDF. I wanted to load selected PDFs from the Finder, and for each PDF create a file in the same directory with a -watermark suffix appended. file1.pdf and file2.pdf would yield file1-watermark.pdf and file2-watermark.pdf.

It took me much too long to figure out that it wasn't easy (or maybe even possible) with Automator, even though it's simple to do from the command line.

Each Automator action returns a result. That result is passed to the next item in the chain, assuming the item is accepting input. The key is to chain a series of Get Value of Variable calls together, which are passed to a shell script as $1-$n and the special $@ variable. I've written a short primer on using Arrays in Bash that may be helpful.

A crappy picture is worth at least 68 words, so here is what a sample workflow looks like:

You can download the sample workflow here.

If you want to loop through selected Finder items one-at-a-time, the best way is to use Nyhthawk Productions's excellent Dispense Items Incrementally action.


© 2007-2013, Corey Gilmore | Posts RSS Feed | Comments RSS Feed | Contact

 

The views expressed on these pages are mine alone and not those of any past or present employer. All information presented on this site was obtained lawfully and not through disclosure under the terms of an NDA.