Friday Apr 18, 2008

LAB-6400 Create Your Own Mobile Game

I impressed. My LAB-6400 Create Your Own Mobile Game is full already. No empty seats for late-coming attendees. Maybe you can sit on floor if you really want to join.

This will be BYOL (Bring Your Own Laptop) session and if you don't need a table and chair then you are welcome. I'm curios how we will handle it. I'm prepared to lot of questions and problem about the configuration of your laptop. If you will show up at the hands-on lab and you'd like to help us then prepare your machine.

You will need following software installed: If you don't plan to connect the application to webservice then the NetBeans Mobility 6.0.1 distribution is enough. If you plan to connect the mobile application to server backend then you need the Mobility End to End module that is available either on Update Center or is part of the ALL distribution.

The result of the lab will be a game application with name "Lost Duke". There is a flow diagram of the application bellow.

Tuesday Apr 01, 2008

Support for iPhone in NetBeans Mobility

It seems that the NetBeans Mobility team wanted to give me a birthday present. I run today's build and I found out that there is support for the iPhone. That's really cool. It works out of the box. Just install the latest NetBeans Mobility build. When you are creating new MIDP Application then choose "iPhone SDK April Edition" as emulator platform.




The game that is running in the emulator is the game that I'm preparing for our JavaOne's hands-on lab session. It's name is "Lost Duke".

Friday Feb 22, 2008

NetBeans Mobility 6.1 on Mac (Leopard)

NetBeans Mobility 6.1 provides better support for Mac. The Mac is still unsupported platform - means we are not testing it. However the work with the NetBeans Mobility and MPowerPlayer should be easier. When you have the NetBeans Mobility 6.1 (a build after 2/21) then you can add the mpowerplayer emulator as any other Java ME emulator. You don't have to bother with setting up the Custom Emulator Platform. I tried it yesterday with a simple project.

UPDATE: there is NO INSTALLER for Mac that includes the Mobility. You can install whatever version of NB without Mobility to your Mac then you can download the Mobility functionality from Update Center with Tools > Plugins manager (look for Mobility category in Available tab).

Adding the MPowerPlayer platform

Step 1


Step 2


Step 3




MPowerPlayer emulator platform in Java Platform manager




Create new Mobility project with MPowerPlayer platform



Project properties with MpowerPlayer platform



Running sample project in MPowerPlayer emulator

Friday Dec 28, 2007

Where Duke meets with Red Bulls and Jameson

It is relax time. Therefore it is time for some pictures. These are pictures from Sun's office of the Mobility team at Chodov Park business center. You can see that we changed the enviroment to fit our needs. We have lot of empty Red Bull cans here (thanks to Jirka who drunk it every day). We have empty Jameson bottles (thanks to Jameson party at the Chodov Park area). We have army of Dukes (thanks to users that didn't pick them up somewhere sometimes). We have also collection of snow balls (thanks to Fabiola).


Fabi's snow balls collection


Army of Dukes


Jamesons


Red Bull cans


Friday Dec 21, 2007

Java Mobile & Embedded Developer Days

There will be a conference in Santa Clara focused on Java ME developers. Its name is Java Mobile & Embedded Developer Days. It is organized by mobileandembedded.org community. Lot of great presentations, lot of "big" names will be there.
They accepted our talk with name Building slick applications with SVG and advanced graphics. It still not sure that I'll appear at the conference. The main reason is always the same - money. However the presentation will be delivered anyway. It will be about development of applications using SVG graphics and JSR 226 with NetBeans Mobility. I hope that we will show some features and hints that you don't know yet.

Thursday Nov 15, 2007

[TIP] Sample MIDlet for Mobile Client to WS

NetBeans Mobility Pack provides you a wizard for creating of stubs to connect to a webservice from mobile client. The stubs are generated according the J2ME Web Services Specification - JSR 172. Therefore the client will run only on devices with support for JSR172.



In previous versions of the IDE - 5.0, 5.5, 5.5.1 - the wizard generated even a sample MIDlet that provided a basic usage of the stub. It just took the parameters and showed the return values from the web service. There was lot of restrictions and problems with the sample MIDlet. Therefore the development team decided to drop the feature in NetBeans Mobility 6.0.

The usage of the generated stubs is really easy. IMO, the sample MIDlet might be nice for demo purposes however for the real work it's easier to create the MIDlet from scratch. I'll try to briefly show how to use the generated stubs in visual MIDlet. The sample mobile application is attach. I attached also the web project with the web service.

When you want to use the Java ME Web Service Client wizard you need to have the NetBeans Mobility IDE installed. The wizard isn't part of the standard mobility distribution however you can get it from update center. Look at my post "Where is the End2End functionality of Mobility Pack".
The Java ME Web Service Client wizard generates the stubs for you. You just have to point it to the WSDL file of the web service. You can either provide URL or browse for a wsdl on your hard drive. The wizrd parses and validates the WSDL file. When the web service is WS-I compliant and follows up the JSR 172 restrictions you are able to generate the stubs into a mobile project in the IDE.

When you have the stubs then you just use then in your application. It's very easy. In my case there is only one method public String sayHello(final String name) provided by the web service class HelloWS. The generated stubs class HelloWSService_Stub provides method public String sayHello(String name). Therefore the usage in your mobile application could be
HelloWSService stub = new HelloWSService_Stub(); //create the stub
String result = stub.sayHello("Lukas"); //call the WS method
Look at the attached mobile project how to build up visual MIDlet with Mobile Visual Designer of Mobility Pack. It show the usage of the WaitScreen, Task, and other components provided by the NetBeans Mobility IDE 6.0.

Tuesday Nov 06, 2007

[TIP] WTK 2.5.1 and Debian

There were a few reports about Mobility Pack problems on Debian linux distribution. The mobility project didn't preverify during the build of project. You can following message in output window
preverify:
Created dir: /home/user/MyHello/build/preverified
Preverifying 6 file(s) into /home/user/MyHello/build/preverified directory.
/home/user/.netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/preverify1.1: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by /home/user/.netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/preverify1.1)
/home/user/MyHello/nbproject/build-impl.xml:269: Preverification failed with error code 1.
BUILD FAILED (total time: 1 second)

This problem happens with the Wireless Toolkit 2.5.1 that is bundled with NetBeans Mobility Pack 5.5.1. It was reported by some users. We couldn't fixed it in Mobility Pack itself because it is problem of the WTK emulator platform. Therefore we reported it to the WTK team. It should be fixed in the WTK version 2.5.2. Unfortunatelly, I'm not able to verify the fix in the WTK because I don't have any machine with Debian.

Debian users should install the WTK 2.5.2 or they can use the latest builds of NetBeans Mobility pack 6.0 that is bundled with WTK 2.5.2

Wednesday Oct 31, 2007

Geertjan throws down gauntlet to Java ME

It is long time ago when the most productive NetBeans blogger Geertjan promised to look at Mobility Pack. he finally found a time! Here is the result - Dilbert viewer tutorial for NetBeans 6.0. He was so surprised about the Mobility Pack functionality that he decided to throw down the gauntlet to other IDEs. I'm looking forward if anybody will pick it up...

Thursday Oct 25, 2007

Where is the End2End functionality of Mobility Pack?

The NetBeans distribution matrix has changed from three distributions - Basic, Standard, Full - to NetBeans for - Web & Java EE, Mobility, Java SE, Ruby, C/C++, All.

I do think that it is step in the right direction. You get right tool for right thing. The Mobility Pack lost the End2End functionality because of this change. To be honest the functionality isn't lost but you have to do some steps to get it back. It isn't part of the Mobility distro anymore as result of issue 113199. When you download the All distribution then you get all functionality (including End to End), of course.

Problem Description
There is End to End functionality in Mobility Pack. The End2End provides wizards for generation of Java ME Web Service (JSR 172) Client and a Mobile Client to Web Application wizard(see more details). Both of these wizards require the Web project or Web Services functionality BUT these are not part of the Java ME distro.

Problem Solution
  • Download the Java ME distribution - it contains the Mobility Pack + Wireless Toolkit emulator
  • Install it
  • Go to Tools > Plugins. Install Mobility End to End from Available Plugins
  • The End to End functionality is back in IDE

Tuesday Sep 18, 2007

[TIP] User Code in Component Properties

When you are creating an application in Mobility Pack Visual Designer you probably use the Properties to change texts and other properties of the components used in your midlet. The Properties window is opened by default in right bottom corner of the Visual Designer. The Properties window shows the properties of selected component either in Flow/Screen Designer view or in Inspector/Navigator.


When the property name is in bold then the property doesn't have the default value. It means that you (or the IDE) changed it. The same approach is used by the Properties window in Matisse GUI Designer.
Look at the String, Timeout, Title, Instance Name properties at the picture on right side.

You can change Title of component, you can change the text shown etc. There are two ways how to do it.
The first one is to use a string that you write to the appropriate property of the component - e.g. .

The other option is to open Property editor(PE) of a property by click on the three dots button. In the PE you can use your User Code to assign the value to the property.



Property Editor in 5.5.1



Property Editor in 6.0
The generated code for the user code value of the property from the pictures above will look like
    public Alert getAlert() {
        if (alert == null) {
            // write pre-init user code here
            alert = new Alert("My Little Alert", LocalizationSupport.getMessage("licenseincorrect"), null, null);
            alert.setTimeout(Alert.FOREVER);
            // write post-init user code here
        }
        return alert;
    }
About

This is the main channel to share news, tips and other stuff related to my work. Sometimes you can find even personal stuff. Enjoy your reading...

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
news
Blogroll

No bookmarks in folder

OldNews
MyTrash
NavBar
NetBeans
LinksToBeExpanded