JavaME / J2ME Source Code Example

August 3rd, 2007 17 Comments   Posted in J2ME / JavaME, Tips, Tricks, Guide

Those who are into JavaME / J2ME mobile programming would appreciate this website (J2ME Example Codes) which I recently discovered on the internet.

The newly created blog lists easy to follow JavaME/J2ME application/snippets source code . Source codes featured there are presented with self-explanatory comments which can help programmers identify crucial parts of the application with relative ease.

J2ME Example Codes is a must read for those who are still learning the nooks and cranny of the mobile application programming using JavaME

[tags]j2me,javame, programming, mobile[/tags]


Turn your Pocket PC PDA into iPhone with iContact

Fancy iPhone scrolling effect? Now you can have that right on your own Pocket PC with iContact and SSContact.

Both of these applications add the iPhone feeling to your Pocket PC device by providing a smooth scrollable contact list like the one in Apple iPhone. Best of all these application can be downloaded for free from FreewarePocketPC. Impress your friends, turn it into an iPhone look-alike now.

Note: Both applications support Windows Mobile 5 based Pocket PC. Processor speed of 400 Mhz or higher is recommended for a smooth scrolling effect.

[tags]pocket pc,windows mobile,wince,iphone,pda[/tags]


Howto Reset Symbian S60 Wallet Password

The wallet feature in Nokia Symbian phone is very helpful in ways you can store your credit cards and bank account details conveniently. However there are times where you might forgets the wallet password altogether and may not be able to store new data inside it.

One of the solution to that problem is to reset the phone to factory settings, but this require tons of backups (phonebook, messages,multimedia files) and this can be troublesome to most people.

However, there’s an easy way to get around this problem, all you need to do is to type this code:

*#7370925538#

this will reset the wallet password and erase all of the wallet contents. This way, you can continue to use the wallet without much hassle
[tags]symbian,s60,mobile,phone, mobile phone, nokia[/tags]


Jimm – J2ME ICQ Instant Messenger Client for mobile phone

Previously, I’ve showed free instant messenger client for mobile phone for Google-Talk (MGTalk) and Yahoo Messenger (YGO).

Now I present you yet another instant messenger client for mobile phone. Jimm is a compact ICQ client for mobile phone, it requires at least MIDP 1.0/CLDC 1.0 capable phone with raw socket supports.

Although it is small, it has all the feature that most people would expect from a 3rd party ICQ client such as :

  • Request and read the server side contact list
  • Send plain messages (type 1 and 2)
  • Receive plain messages (type 1, 2 and 4, and offline messages)
  • Send URL messages (type 4)
  • Send and receive status messages (away, n/a, etc.)
  • Receive URL messages (type 1, 2 and 4, and offline messages)
  • Send file transfer messages and send files (type 2 and direct connection)
  • Set your status (away, n/a, etc.)
  • Receive status updates (user is away, n/a, etc.)
  • Request information about other users
  • Remove users from the server side contact list
  • Add users to the server side contact list
  • Rename users on the server side contact list
  • Search for users
  • Answer authorization requests
  • Local history saving and export (Only Siemens builds)
  • Multilingual user interface

Download JIMM Mobile ICQ Messenger (J2ME)
[tags]mobile,icq,j2me,javame,java,mobile,midp,cldc[/tags]


How to sign J2ME Midlet jar

October 25th, 2006 5 Comments   Posted in J2ME / JavaME, Tips, Tricks, Guide

If you’re into commercial application development and your MIDlet access restricted api, then you should get your jar signed.

I found a nice tutorial that walks you through MIDlet signing process :

MIDlet jar signing (a tutorial) Revised

Hope it helps you in your quest.

[tags]j2me,jar,javame,mobile,security,mobile phone[/tags]


J2ME: How to optimize JAR file size

October 23rd, 2006 13 Comments   Posted in J2ME / JavaME, Tips, Tricks, Guide

Anybody who has developed mobile application using J2ME must already know that getting the smallest JAR file size is very important.

This is because the limit imposed by the mobile phone devices due to storage/memory limit on small devices. It is not unusual for you to get mobile devices with 32KB ,64KB or 256KB jar file limit.

This is where JAR file optimization is crucial for deploying your J2ME mobile application out in the wild. Here’s a few thing that you can do to reduce your JAR file size :

Optimise PNG files

PNG is a graphic format used primarily by J2ME devices, and is guaranteed to be cross-platform between mobile devices that implements J2ME.

The best part with PNG file is that its bitmap data is compressed using the deflate compression algorithm which can be easily optimised by easily obtainable tool :

Obfuscation

Obfuscation does help in chopping unecessary code, renaming long variables and classes, thus making the class files smaller. Don’t forget to Obfuscate your package files before deployment.

It does not only protect your code, but it does save a lot of valueable space.

Proguard and RetroGuard is the most common obfuscator used in J2ME application

Recompress JAR files

Finally, after going through optimizing PNG files and obfuscating, you might want to try to recompress your JAR files using a tuned JAR compressor which favors size over speed. For this purpose, I prefer using KJar, a JAR file recompressor based on Ken Silverman’s KZIP.
This final step combined with previous optimisation will greatly reduces your JAR file, personally I’ve achieve 33% space saving by reducing my resulting JAR file size from 80KB to 53KB (27KB saving !)

Please visit SupremeJ2ME website for more information about optimising your J2ME application for size.

[tags]j2me,javame,mobile,jar,java,nokia,programming,optimization[/tags]


J2ME Phone Feature Comparison

Are you interested to develop J2ME / MIDP applications? confuse of which phone support which API? Then I found a website that might help you decide that :

Club-Java, a french java user group has release their findings on various J2ME enabled phone available on the markets.

Though the list do not include the phone quirks and bugs, but I think it is sufficient enough to say that the list did give me some idea on which device that might support my MIDlet application.

visit ClubJava for more information.

[tags]java,j2me,javame,midlet,mobile apps, mobile phone,midp[/tags]

Aesthetics and features collectively increased the demand for samsung cell phones . Among cell phone categories; Samsungs locked cell phones are less common than unlocked cell phones . Samsung cell phone accessories ; from batteries to data cables and cell phone cases to large selection of headsets are easily available.


Using StringTokenizer in J2ME / JavaME applications

September 17th, 2006 12 Comments   Posted in J2ME / JavaME, Tips, Tricks, Guide

For those who worked with J2ME application, you should by now noticed that J2ME has strip down many classes from the standard java library, and this include StringTokenizer.

Why do you need StringTokenizer ?

For starters, StringTokenizer enables you to breakup delimited text and assign it separately, a text like :

99|Max Headroom|32|124, Park May Avenue,LA

can be separated to :

id : 99

Name : Max Headroom

Age : 32

Address :  124, Park May Avenue,LA

with relative ease. This delimited format is important because it is a relatively compact format to transfer data between client-server application (xmlrpc,soap are too bloated), because the simpler the format is, the faster the operating will be.

Because J2ME does not have StringTokenizer implementation, I was forced to adapt another StringTokernizer to be use in J2ME applications. For this i choose to adapt from Stephen Ostermiller java class, which can run smoothly in J2ME devices.

I've included the modified StringTokenizer class with a demo app on how to use the class in this zip file : StringTok.zip
Hope you enjoy the download, please contact me if you have any further questions.

[tags]j2me,java,javame, java class, StringTokenizer, mobile[/tags]


This blog is protected by dr Dave\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s Spam Karma 2: 174421 Spams eaten and counting...