Software Archive
Read-only legacy content
17061 Discussions

Java and J2ME Tips and Tricks

Quoc-Thai_L_Intel
1,912 Views
I found a tutorial website for Java and J2ME. Here is the site: http://forums.java.net/jive/index.jspa.
If you have any coding tips and tricks, please share them here.

Cheers,
-Thai

0 Kudos
25 Replies
Christopher_K_
Beginner
1,510 Views
Can anybody whose travelled down this under-development road before me kindly share whether or notone needs to target MID-spec Java apps at a Java ME CLDC/MIDP profile or simply import the Intel SDK classes like the SDK Samples do? Thank you for any advice.

CCK
0 Kudos
Christopher_K_
Beginner
1,510 Views
Quoting - southsidesmoka
Can anybody whose travelled down this under-development road before me kindly share whether or notone needs to target MID-spec Java apps at a Java ME CLDC/MIDP profile or simply import the Intel SDK classes like the SDK Samples do? Thank you for any advice.

CCK


I am going to answer my own question; in the event it is asked again by another individual searching for knowledge, the knowledge will be there. The Intel Mobile SDK 1.3 supports Java ME, SE and EE runtime environments. I find a best practice is to target the JVM installed on the device(s) for which you are developing, i.e. most smart-phones implement Java ME, so you would target your application at an appropriate Java ME Profile and import the Intel Mobile SDK classes. A Mobile Internet Device, on the other hand, is typically going to have a full Java implementation via Java SE or possibly even Java EE, so one would not need to target the application at any Profile (Profiles are only available in Java ME, anyway). So, a developer need only import the required Intel Mobile SDK classes in the case of developing applications for devices with a Standard or Enterprise Java Virtual Machine installed. I hope others find this useful.

CCK

0 Kudos
Tom_Si__司江平___Intel_
1,510 Views
Quoting - kremsoft
Hey

I'm a java developer for a large software outsourcing firm. We have been getting more and more requests for mobile apps using J2ME. I have played around a little before and it doesn't seem so different, just a smaller API.

Can anyone recommend some good books or courses to make the jump?

Cheers

Kris

i like "Core J2ME Technology", wishing it could help u 8 )
0 Kudos
slash75
Beginner
1,510 Views
I think I read elsewhere that you could make a call to platformRequest in your MIDlet and pass the URI with the rtsp scheme.

Of course, the URI endpoint will probably need to end in rm...

Something like: platformRequest("rtsp://someserverfile.rm")

hyperlink to the following URL.it ll be very helpfull

http://developers.sun.com/techtopics...est/index.html

Good luck
0 Kudos
slash75
Beginner
1,510 Views
Although not recommended to use repeatedly, sometimes it is quite useful to force a garbage collection in situations such as your game is going to the next level where you use all new graphics and old objects are deleted.

Use

System.gc();
0 Kudos
slash75
Beginner
1,510 Views
Anyone who is a bit interested in electronics and hobby circuit assembling would have came across the readily available Bluetooth miniature modules which could be interfaced to a PIC microcontroller circuit and create devices that could communicate with any other Bluetooth enabled devices. This could be interfaced to our Mobile Phone applications in any platform that supports Bluetooth interfacing and create a wide variety of applications like Bluetooth controlled toy car (this project details are already available freely). You can find a lot more of applications for this mobile circuit combination, both useful and amazing.
0 Kudos
slash75
Beginner
1,510 Views
In general, producing a vibration in J2ME requires the usage of

Display.Vibrate(duration);

But for Nokia phones you can use the package
com.nokia.mid.ui.DeviceControl

and use the function DeviceControl.startVibra(freq, duration);

Note that the duration is specified in milliseconds and frequency in hertz.
0 Kudos
slash75
Beginner
1,510 Views
To reduce the amount of data, it could be compressed on the server and uncompressed using gZip library at the mobile device.
0 Kudos
slash75
Beginner
1,510 Views
hi,
Is it possible to filter the incoming messages coming from a particular number and save it into a different folder other than inbox through J2ME?

and also is it possible to filter the incoming calls too in J2ME?
0 Kudos
Christopher_K_
Beginner
1,510 Views
Quoting - poce
Hi,
I recently downloaded the Intel Mobile Platform SDK for Linux.
I'm trying to access an RFID reader from a java application.
The reader is a skyetek M9 (Development Kit).
My problem is that I cannot find the class RfidReaderClass from the library.
I'm using Netbeans and I configured the project to access all the libraries available through the Intel Mobile Platform SDK.
If I want to access the BatteryClass, for example, the IDE suggests the import of the com.intel.mobile.battery.BatteryClass, but for the RfidReaderClass I cannot find any library.
Am I missing somethiing?
It's like the class for Rfid readers is missing...
Any help is much appreciated.
Thanks,

Davide

Davide:

Try importing the package and creating a class, like below.

import com.intel.mobile.rfid.*;

public class RfidReaderClass extends ClassObject
{}

Hope this helps.

-CCK
0 Kudos
woleakande
Beginner
1,510 Views

Hi kremsoft,

If i can advise i will strongly advise you to also branch into other programming languages. I don't know how vast you are in Java, but i know that maybe another prog lang ( like C/C++) might solve the problem.

Thanks.

Why not try www.sun.comi have some JME downloads there.

0 Kudos
Quoc-Thai_L_Intel
1,510 Views

For questions on Java, I recommend the following site: http://forums.java.net/jive/index.jspa.

Regards,

-Thai

0 Kudos
Christopher_K_
Beginner
1,510 Views
I agree...Garbage Collection can be quite useful. It's a great way to reduce your apps memory footprint and use less power (using less memory uses less power) - an awesome dirty trick for power optimization. Timing is critical because you use that energy running the Garbage Collection cycle. Tools and testing are an absolute MUST for this method! But, it DOES work.

- CCK
0 Kudos
amanda829
Beginner
1,510 Views
Thanks to all who posts URLs of tutorials. Its really interesting to share the knowledge.
0 Kudos
froz5
Beginner
1,510 Views
Even though J2ME development is still Java, there are a number of differences between doing mobile development and doing J2SE or J2EE development..
0 Kudos
froz5
Beginner
1,510 Views
Thank you for the link mentioned above.. it was really helpful to me..
0 Kudos
abdulahad1985
Beginner
1,510 Views
0 Kudos
kevinloyed
Beginner
1,510 Views
Java is a object oriented programming laguage and Java is more secure from other programming language. you want to get more knowledge about java than click on www.sun.com

Cheers,
0 Kudos
jamesclark
Beginner
1,510 Views
Really very nice and great concept on your website really too much information about vibration in j2mee
0 Kudos
amanda829
Beginner
1,347 Views
GReat tutorilas..... I found these tutorials very useful. Thanks... if you have more then please share with us. :)
0 Kudos
Reply