4

I have heard about technology AGPS that can work to provide GPS functionality in non-GPS devices.

Is there a code in j2me or API's given to support for j2me programming?

gnat
  • 6,213
  • 108
  • 53
  • 73
Yatin
  • 2,969
  • 9
  • 34
  • 68

1 Answers1

-1

JSR-256 is the standard that allows you to retrieve the phone's location in J2ME code.

If it is available on your phone and if it supports location on your phone and if your phone doesn't have GPS hardware, then the implementation of JSR-256 on your phone probably uses AGPS.

As a J2ME developer, you are probably not supposed to know or have any control over whether your code will end up using GPS or AGPS. Using JSR-256 should just give you the result of the most accurate option available.

The specification is at http://jcp.org/en/jsr/detail?id=256

An existing stackoverflow answer that can be useful to you is at JSR 256 battery events

Community
  • 1
  • 1
michael aubert
  • 6,836
  • 1
  • 16
  • 32
  • 1
    JSR 256 is sensor API - do you really mean it, not Location APIs like JSR 179 (LAPI 1.0) or JSR 293 (LAPI 2.0)? – gnat Mar 30 '12 at 07:30
  • ya i didn't get the answer ... it was about Sensor Api – Yatin Mar 30 '12 at 07:39
  • JSR 256 is pretty much the last JSR I am aware of that has actually been implemented in some phones. It can be used for a whole range of hardware (battery, gps, accelerometer...), all within the same API. But you are right about JSR 179. I think it also exists in some phones. I am not aware of any handset manufacturer who has upgraded to JSR 293 but you might have better luck with that. – michael aubert Mar 30 '12 at 08:43