views:

241

answers:

3

Hi,

I'm trying to register a midlet for push registration, in order to wake up from a bluetooth connection.

The requested behavior is that the application will wake up when a car's kit (hands free) will be in the range of the device.

Is it possible at all?

If yes, how should it be done?

Thanks in advance,

A: 

This is advanced stuff. Nice.

While this can be available on mobile phones according to the JSR-118 and JSR-82 specifications, I suspect not many handset manufacturers have actually implemented it.

Symbian provided a TCK-compliant reference implementation for Java BlueTooth Push to its licensees but testing it is a nightmare and I don't know whether either Nokia, Motorola or Sony-Ericsson actually included the funtionality in a phone.

My best guess of Symbian phones to try this on: Nokia N95, Sony-Ericsson P990 or W960, Motorola Z8. I would also advise trying on as recent a Bluetooth-enabled non Symbian Sony-Ericsson phone as you can find.

If you find a handset specification that actually says it supports J2ME BT Push, you then need to check whether that is supposed to work using RFComm, L2CAP or both. I don't know what your car kit uses.

As far as writing Java code to use Bt push, you can start by reading the example code in the 2 JSRs and the J2ME SDK from Sun Ltd.

QuickRecipesOnSymbianOS
The mythical BT Push might not be that helpful in this case, as in order to awaken a MIDlet it would need to actually create a BTSPP connection to the device, which I doubt it would be possible to configure the car's hands-free kit to do.Academic though, as I've never heard of a handset supporting BT Push Registry :-(
funkybro
A: 

I don't think it's possible to start up a midlet when it comes into range of a device, even with Bluetooth push registry compatibility (were you to find a handset supporting it).

Your best bet might be to have a midlet running in the background, constantly checking which devices are in the vicinity. When it discovers your hands-free kit, you could bring it to the foreground (if the handset supports it; this is usually achieved by Display.setCurrent(null) for background, and Display.setCurrent(<Displayable instance>) for foreground).

JSR 82 provides the functionality you need.

Beware though, this constant Bluetooth polling will drain the device's battery!

funkybro
+1  A: 

Hi,

I can confirm that it is possible to wakeup a MIDlet in Nokia Devices trough a registered service in the push-registry. The registration can be defined in the JAD (static registration) or dynamically in the code.

Nokia phones S60 3ed and up and S40 3ed should support this functionality, on other phones (sony,samsung,motorola etc..) I didn't find this feature working.

Google this JAD attribute: MIDlet-Push-1

Good luck!

Raanan