sabato, 31 gennaio 2009

FootyMad is a brand new football information service brought to you by Mobile Sports Limited. FootyMad mobile gives you the most comprehensive coverage of football available on your mobile phone, allowing you to stay in touch with the beautiful game whenever and wherever you are.

FootyMadMain features of the application are:

  • All the latest news;
  • Real-time match coverage, including goals,
    cards, half-time and full-time scores;
  • Minute by minute commentary as games unfold;
  • Results and post-match reports;
  • League tables;
The included leagues are:

  • Many from England and Scotland;
  • Italian Serie A, Dutch Eredivisie, German Bundesliga, French Ligue and Spanish Liga:
  • International teams and competitions (Champions League, Uefa Cup, World cup, National teams, ...)
The application is downlodable from here. You can send the program trought a sms to your phone


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 19:09 | Permalink | commenti
categoria:calcio, j2me, application


mercoledì, 21 gennaio 2009

Using the optional package JSR-82 (where is available of course) you can implement clients using the Bluetooth feature of your device.

Let's start discovering the devices around our phone. First of all you have to get a DiscoverAgent object from the object LocalDevice that represent your device:

LocalDevice m_locDevice = LocalDevice.getLocalDevice();
DiscoveryAgent m_discAgent = m_locDevice.getDiscoveryAgent();


After that you can call the startInquiry method:

try {
   m_discAgent.startInquiry( DiscoveryAgent.LIAC | DiscoveryAgent.GIAC, this );
}
catch ( BluetoothStateException e ) {
  e.printStackTrace();
}


in the previous piece of code, the startInquiry method has been called with two arguments:

- the first says we want to discover both devices temporarily discoverable (LIAC) and permanently discoverable (GIAC)
- the second argument is a DiscoveryListener object that will receive notification each time a device has been discovered and when the discover action has been completed.

The method called in the DiscoveryListener each time a device is discovered is

public void deviceDiscovered ( RemoteDevice remoteDevice, DeviceClass deviceClass )

The remoteDevice object contains information about the discovered device like the bluetooth address and the friendly name you can use to show it to the user.

The deviceClass object contains information about the type of device has been discovered.

The method called when the discover action is finished is (always in the class implementing the DiscoveryListener):

public void inquiryCompleted ( int i )

The argument i will be an integer saying if the action has been completed or if it has been interrupted (it's possible stop the action calling cancelInquiry( this ) in the m_discAgent instance).


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 23:17 | Permalink | commenti
categoria:tipsandtricks, j2me, jsr82


sabato, 10 gennaio 2009

When you write a desktop or a server application you can often ignore some small tips that in a mobile application can be very powerful.

Let's talk about loops. You have to avoid as much as possible operations in the loops that you can perform once out of the loop. For example:

for ( int i = 0; i < 5; i++ ) {
   int a = 10;
   int m = 5;
   int f = i + (m * a);
}

can be written like:

int a = 10;
int m = 5;

for ( int i = 0; i < 5; i++ ) {
   int f = i + (m * a);
}


avoiding five assignments.

Another good practise is avoiding call of a method in the conditional block of the loop. If you use the size of a vector as limit of your loop you have to avoid:

for ( int i = 0; i < vector.size(); i++ ) {
   int f = i + (m * a);
}


and write instead:

int limit = vector.size();
for ( int i = 0; i < limit; i++ ) {
   int f = i + (m * a);
}


The suggestions are also explained at J2ME DevCorner blog


Did you like the article? Buy me a coffee!

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


Blogs Directory