sabato, 27 settembre 2008

Every time you want to test an application you can send to your phone via Bluetooth or USB cable but not every phone supports this type of transfer and then you have to download the J2ME midlet from a web server supporting the jad and jar mime type.

Therefore, you should have access to a web server like that but this is not always possible. To have quickly a public webserver you can then go to this website: http://www.hostj2me.com/.

You can register an account for free and you will have your administration panel to create applications and upload their files. You can decide if make your applications public or keep private.

Once you have uploaded the files, you get the midlet's download url  and also the url which you can insert in your jad file to get the install and delete notification.

Source files and a screenshot are uploadable as well.

The section "Notes", "Reporting" and "Visit log" give you the chance to keep an eye on the download statistics and the installation results.

The following image shows the admin panel for a J2ME application.

panel


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 18:36 | Permalink | commenti
categoria:tipsandtricks, j2me


lunedì, 22 settembre 2008

When you want to use the API of a J2ME optional package, you have to start to deal with the differences through the different mobile devices. The implementation of the different JVMs doesn't guarantee that the not mandatory API are supported so you can experience problems already in the installation phase.

You can only try to follow some guidelines to make this risk as small as possible and have a midlet working on a large number of devices.

A good way to do that is try to isolate the part of the code containing references to the not mandatory APIs. An interface is used to decouple the main code of the midlet from the code containing class which can be not included in the implementation of the JVM. All this code needs to be included in a class implementing this interface. The code of the midlet uses the Class.forName() and Class.forInstance() instructions to instantiate this class after the runtime check about the support of the Optional Package we would use. In this way the class using the not supported class is not loaded in the virtual machine if the JVM doesn't support them.

Interface

public interface BluetoothManager {

   public void send(Object O);
}

Class implementing the interface

public class BluetoothManagerImpl {
  
   public void send(Object o) {
      javax.bluetooth.LocalDevice ld = javax.bluetooth.LocaleDevice.getLocalDevice();
      javax.bluetooth.DiscoveryAgent = ld.getDiscoveryAgent();
      .....
}

Main code of the midlet

public class MyMidlet extends MIDlet {
   String btSupport = System.getProperty( "bluetooth.api.version" );
  
   if (btSupport == null )
       return;

  Class c = Class.forName("BluetoothManagerImpl");

  BluetoothManager btManager = (BluetoothManager )c.newInstance();

   .....
}


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 21:56 | Permalink | commenti
categoria:tipsandtricks, j2me


giovedì, 18 settembre 2008

Google announced the adding of new features to their Google Maps on Wednesday 17th. The most important is Street View coming with the same street-level imagery available on desktop. You can use the Street View feature clicking on the apposite command after a search or clicking on a map and selecting "Street View".

Another interesting feature is the introduction of the business reviews: now it is possible know in advance if visit a store worths or not.

Also the walking directions introduced recently in the desktop version are available in the mobile application.

The search speed and the accuracy of the location has been also improved. Users with J2ME phone and BlackBerry can now enjoy the new features!

 





Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 22:47 | Permalink | commenti
categoria:google, j2me


venerdì, 12 settembre 2008

Also Subbuteo can't stay far away from the digital era. It is indeed available on the portable game station Nintendo DS. The game is published by Halifax and 505 Games.

The user might use the pen and the touchscreen to move the players and kick the ball. It is possible create leagues or join some of the official leagues. It is also available an editor to change the existent teams or create new ones with their own colours and shirt. It is possible play with other users using Wifi.

The game is sold in Italy for 39,99 euros.

I can't give an impression about the videogame because I don't have a Nintendo DS but I'm pretty sure that the realism of the old Subbuteo table won't be easily reacheable.

Subbuteo Screenshot



Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 17:51 | Permalink | commenti
categoria:calcio, soccer, subbuteo


lunedì, 08 settembre 2008

The Sony-Ericsson SDK provides you a tool to perform an on-device debugging of your J2ME applications.

After the SDK installation you can go to "Start" -> "Sony Ericsson" -> "Java ME SDK for CLDC"  and check the presence of two tools: "Connection Proxy" and "Device Explorer".

First of all you have to connect your Sony-Ericsson mobile phone to your pc. Launch "Connection Proxy" and press the "Settings" icon in the buttons bar. Select the COM port where your phone is connected to and press "Ok". Press "Connect" at the right top in the Connection Proxy software window. The "Status" frame below the device image should show the "Connected" status for your device.

Conn Prox settings

Now launch the Device Explorer. It should start the synchronization with your phone. If it doesn't, start it manually clicking the "Reloading device information" in the buttons bar.
After a while in the left column you should see the list of application installed in your device. Now you can select the application you want to debug and start it.

The System.outy.print messages included in your code will be shown in the console window at the bottom of the "Device Explorer" software.

Device explorer_1

The tool can be used also to manage the application: install, delete, stop, pause, and resume it.


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 17:01 | Permalink | commenti
categoria:tipsandtricks, j2me, sony ericsson, sdk


sabato, 06 settembre 2008

DSC00427I'm sitting in the Santiago del Chile Airport waiting for the Air France flight which will take us back to Europe after a week spent in Argentina in Cordoba.

I had a really good time in Argentina, meeting really nice people and visiting nice places. I enjoyed  a lot eating, drinking and walking in Cordoba, looking at a different reality than Europe which makes you thinking about life.

Also flying over The Andes during the Cordoba to Santiago transfer has been great. It has been an experience I'll never forget.

DSC00465

DSC00434


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 16:55 | Permalink | commenti
categoria:


Blogs Directory