Two New Sony-Ericsson Walkman Phones
May 30, 2006
I’ve said before how big a fan I am of Sony-Ericsson mobile phones — my primary phone is an s710a — and it’s a shame how proprietary formats have crippled many of the recent Walkman efforts. Even so, these two new Walkman phone releases are slick. These are more examples of the convergence of a number of portable gadgets into one mobile device, and I’m very much looking forward to when the phone / camera / music player distinction becomes blurred to the point of obliteration.

Read more about the phones and their specs at Sony-Ericsson Developer World.
J2ME Polish 1.3: ScreenInfo class
May 24, 2006
IMPORTANT UPDATE Nov. 23, 2006: The below approach will almost surely fail on your implementations. After this post was written, I learned that the package I was experimenting in had been significantly altered by a colleague to make ScreenInfo work as intended. I don’t recall the specifics of the approach, but will post them if I can find them. If anyone has had any success with an undecorated ScreenInfo, please share.
I’ve been working with the J2ME Polish 1.3 beta over the past week and a half. I had several goals when I began this mini-project, one of the primary goals being to exercise some of the new features in the 1.3 release.In several areas in my sample application, I’ve spawned background threads to do some processing, and I wanted to provide the user with some visual feedback of the processing status. I also wanted to avoid the traditional gauge-based approach, so as to keep these events relegated to the background. GUI programming using MIDP is painful, but J2ME Polish makes a task like this very short work with the new ScreenInfo class.
A word of warning: depending on which beta release I use, and in which screen I use this class, I have varying degrees of success, and I’m at a loss to explain why I can get it to work in some areas, but not in others. Based on what I see on the discussion boards, there are a good number of other problem areas in the beta release, which is to be expected. I wouldn’t let it discourage you from trying out this product.
To use ScreenInfo, first add the corresponding variable declaration to your build.xml file:
<variable name=”polish.ScreenInfo.enable” value=”true” />
Setting this preprocessing variable enables this element for your entire application, but you can use various static methods of the ScreenInfo class to set its visibility and change its appearance (image and/or text). For example, I might choose to display an idle indicator, which changes to an hourglass during background operations; or I may choose to display a connection icon when I’ve established a connection to an external resource, and hide it when the connection is released.
Remember to import the ScreenInfo class:
import de.enough.polish.ui.ScreenInfo;
Image image = null;
try {
image = Image.createImage(”/clock.png”);
} catch (IOException ex) {
//#debug
System.out.println(ex);
}
ScreenInfo.setImage(image);
//w is defined as the screen width in my class
ScreenInfo.setPosition(w-10, 10);
ScreenInfo.setVisible(true);
You can also style this element in polish.css by using the “screeninfo” predefined style:
screeninfo {
font-style: plain;
font-size: small;
font-color: primaryDarkColor;
}
From painful to painfully simple in just a few short steps.
Tags: J2ME, Java ME, J2ME Polish, mobile software, mobile development
Atari Flashback 2
May 22, 2006
Old school Atari system, loaded with 20 classic games like Pong, Pitfall, Missile Command, and Asteroids, along with 20 newer titles. All available for under $30! Many of these re-releases suffer from poor controllers, but these appear to be replicas of the originals.

You can buy it online from Atari, or head to your local Best Buy, Walmart, Target, or Kmart to pick it up.
J2ME Polish 1.3: InitializerSplashScreen
May 16, 2006
J2ME Polish contains a neat splash screen convenience feature in version 1.3, currently in beta. Implementing the ApplicationInitializer interface, and calling the InitializerSplashScreen with the appropriate arguments is all you need to do to create your splash screen.
Polish then creates a background thread, calls your initialization code in that thread, and creates and displays your splash screen. You can specify a canvas background color, a splash screen image, message text, and message color. If you choose to include message text, when your initialization code returns, the message is displayed to the user, and a new displayable is served after a click, similar to the popular interaction mode in many mobile games. A null message text will indicate to Polish that the next displayable should immediately be shown to the user.
Import the Polish splash package:
import de.enough.polish.ui.splash.*;
Use preprocessing to determine if ApplicationInitializer is defined in build.xml. You do not want to define the preprocessing variable in build.xml and implement the interface.
public class AmazonController extends MIDlet
//#if !polish.classes.ApplicationInitializer:defined
implements ApplicationInitializer, CommandListener {
//#else
implements CommandListener {
//#endif
You will place all of your initialization code in the initApp() method, rather than in the constructor or in startApp(). Your initApp() method must return a Displayable (the screen to be displayed when the thread completes its business).
public Displayable initApp() {
mainMenu = new MainMenu(this);
/** @todo add your initialization code */
return mainMenu;
}
In startApp(), call InitializerSplashScreen with the appropriate arguments: Displayable screenToShowOnLoad, Image splashImage, int backgroundColor, String messageToDisplayAfterLoad, ApplicationInitializer midletImplementingInitializerInterface).
try {
Image splashImage = Image.createImage(”/splash.png”);
InitializerSplashScreen splashScreen = new InitializerSplashScreen(display, splashImage, 0xFFFFFF, null, 0×359AA8, this);
display.setCurrent(splashScreen);
} catch (IOException e) {
//#debug error
System.out.println(”Unable to load splash image.” + e);
}
Pretty slick. Nothing earth shattering, but just another way that J2ME Polish can save you some time developing mobile applications. The best part is that, like most Polish classes, the splash screen will function on a large number of MIDP implementations without requiring any tuning on your part.
Tags: J2ME, Java ME, J2ME Polish, mobile software, mobile development
“Baffled cabbie” on BBC
May 15, 2006
If you haven’t yet seen this, check out BBC’s baffled cabbie. Apparently, this gentleman was in the lobby of Television Centre, waiting for his fare. When he heard his fare’s name called, he raised his hand, and was quickly escorted into the newsroom to comment on the Apple vs. Apple decision. The first 10 seconds of the video are priceless, as the man realizes that he’s been mistaken for someone else, and then makes a split-second decision (that you can see on his face!) to wing it through the interview.
Story and video via The Mail on Sunday: story and video.
UPDATE: according to Boing Boing, this gentleman isn’t a cabbie, but rather an IT job applicant coincidentally named “Guy” (Guy Kewney was the man who should have appeared on the BBC segment). When they called “Guy,” and mentioned an interview, he assumed he happened into a job interview. That explains the clothes.
Baby’s Hand Severed at Chocolate Factory - Yahoo! News
May 15, 2006
But the factory is not in need of an heir, so you might as well sell that Everlasting Gobstopper sample to Slugworth for 10,000 big ones.
Link: Baby’s Hand Severed at Chocolate Factory - Yahoo! News.
Project: Publish a Polish-built App on mobile.java.com
May 10, 2006
It’s time for a little side project.
Rationale behind the project
1) J2ME Polish is currently released at version 1.2.4, but version 1.3 is in beta, and it offers several new features that I’d like to exercise, namely: Palm and Blackberry support, a framed form custom item, Spritetems, a splash screen helper, and several other productivity features. What better way to exercise these than in the wild?
2) mobile.java.com has launched, and I’ve got a bee in my bonnet about getting something (anything) out there, just to see what the process is like to get something listed on their portal.
3) I need a real, customized application that can be used to test features that are being built into another J2ME/J2EE application (this is part of my full-time job in a mobile start-up).
Project Approach
I’d really like to tackle this with the minimum effort possible, so I’m going to leverage some work I did on a Bluepulse widget (Amazon OnTheGo). There are a large number of things about the widget that I would like to improve, and several of those are best addressed by a full-scale MIDP application, rather than a widget.
So I’m going to port Amazon OnTheGo to an MIDP application. I haven’t decided yet if I’m going to build this just for MIDP2 phones or also MIDP1 phones. I want to specialize enough to exercise and test Polish’s build framework, but not enough that I have to devote a lot of time to making this work on a large number of devices.
What to Expect
In theory, over the next several weeks, I’ll be able to post some insights into using the new features of J2ME Polish 1.3, some code samples, and some firsthand knowledge of adding an application to Sun’s mobile portal. Then again, in theory, there is no difference between theory and practice, but in practice, there is.
Tags: J2ME, Java ME, J2ME Polish, mobile software, mobile development, Sun
J2ME Polish, Just the Facts
May 9, 2006
I’m taking on a quick side project, which will begin in the next day or so, and I’ve decided to document a few pieces of that project. I’ll write more on that project later, but because most of those posts will make mention and use of J2ME Polish, I thought I’d introduce it today for those who aren’t familiar with it.
What is J2ME Polish?
J2ME Polish is a collection of open source tools used for creating wireless Java applications. Much of J2ME Polish is focused on MIDP applications, but recent releases also address Palm and RIM devices. The primary facets of J2ME Polish (from my perspective) are:
1) Build framework
J2ME Polish enables you to create builds targeted to certain devices or groups of devices. Using the device database and preprocessing, you can query for device capabilities and limitations, and fork your code at build time. Resource assembling enables you to conditionally include things like images or sound files targeted to certain devices.
Building for a device with a full color resolution of 240 x 320? Include large, full color icons. Building for a Motorola? Conditionally include an RMS size attribute in the JAD, and include 15 x 15 list icons. Want to display a fullscreen canvas? Query for fullscreen mode or Nokia UI support.
J2ME Polish also packages an extendable logging framework, giving you access to errors via emulators or the actual device; a localization framework; and takes care of the details of compiling, preverifying, obfuscating, and packaging your application.
2) GUI framework
J2ME Polish interlaces its UI classes with MIDP UI classes, enabling you to use traditional CSS techniques to style the interface of an MIDP application. This is a huge productivity booster. If your application must support MIDP1 devices, J2ME Polish transparently adjusts the MIDP2 to provide that support.
Some new custom items available include a SpiteItem, used to make animated menus, similar to web mouseover effects; a tabbed form; and a framed form, where a screen can be split into scrolling and non-scrolling frames.
J2ME Polish also packages a game engine, enabling you to quickly port MIDP2 games to MIDP1 phones.
3) Tools & Utilities
J2ME Polish brings ArrayLists to MIDP applications, and its TextUtil class offers functionality similar to that found in JavaScript array functions and Java’s StringTokenizer. The BitMapFont class and standalone editor enable you to create image-based fonts to use in your applications. Forget about Motorola’s 20 pixel system font!
J2ME Polish is available under both GPL and commercial licenses, depending on your project. Read more about J2ME Polish here.
Tags: J2ME, Java ME, J2ME Polish, mobile software, mobile development
3 Java certifications = 3 invitations
May 8, 2006
I guess the certification lists aren’t cross-referenced. . .

Update on Project OMEGA
May 8, 2006
Mika Lipponen posted some additional captures of Project OMEGA on his mutant blog, and it looks sharp. Form widgets, an innovative navigation mechanism, some transitions, and some interesting techniques to make use of available screen real estate.
I can’t wait to see more of this. Read more at Mika’s blog



Recent Comments