tags:

views:

12

answers:

2

Hi! I need to manage the GPRS connection on a JavaME application (start an internet connection automatically or ask user to select some connection) in a symbol handheld device with Windows Mobile 5. I'm developing this application with Java 1.3 and using IBM J9 as jvm. How can I deal with this?

The connection starts only when i do open internet explorer and access something before launch the java application, after that the JavaME application connects to internet normally.

A: 

You're not totally screwed here - but close. You're going to have to write some C++ and use a JNA (not JNI) interface to manage your connection. It's straight-up impossible to manage a GPRS connection through CLDC. Good luck.

Brandon
A: 

You can try using a tool called mortscript. It is a simple scripting language for windows mobile. It has functions for connecting and disconnecting the the default internet connection. Try it, it's free and you can do lots of other nifty stuff with it without writing any C++ code.

You can use mortscript to connect to the internet then launch your java program. However, if you want to connect from within your java code, you'll need a simple JNI function to call ShellExecuteEx on the script or

Aside from that, if you haven't started developing yet, I'd highly recommend you use .NET instead.

Huy Do