| Reply | « Previous Thread | Next Thread » |
|
Howdy,
I have a MIDlet which uses the Location API's... Inside the created Location class I implemented a checkApiExistence() method that checks for the existence of the api on the device : public static boolean checkApiExistence() { String version = System.getProperty("microedition.location.version"); return (version != null && !version.equals("")) ? true : false; } just like in the Location API's example of Nokia... Tried that one on a non-jsr179 device and im getting same error... only problem is that in that same class I have a import javax.microedition.location.*; statement... so when I try to run the MIDlet i get a No Class Def Found Error... obviously because of the fact that the api's are not supported, and I try to import them right away... so... Is there some way to get rid of this porblem ? Maybe to decide runtime not to import those api's ? any other tip is welcome ! thanks in advance
Last edited by Tiger79 : 2007-05-11 at 11:27.
|
|
Hi Tiger79,
"so when I try to run the MIDlet i get a No Class Def Found Error... obviously because of the fact that the api's are not supported, and I try to import them right away..." Which device are you trying to run your application? Or is it on the emulator? Which SDK? Kind regards, Juarez Alvares Barbosa Junior - Brazil |
|
Found the error ;)
I had a static class (for singletons) in my project which imported the location api's... so these would be imported regardless if the device included those... So I had to undo the static thingie for that class... |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Porting C Open source. | debasish1234 | Open C/C++ | 7 | 2008-01-28 12:06 |
| Can I replace the System APIs with APIs in my .dll? | steve.sun | General Symbian C++ | 1 | 2006-03-15 06:36 |
| Java I-modeb APIs | irfan.khan | Mobile Java General | 1 | 2006-03-10 14:51 |
| Do we still have device specific APIs for MIDP2.0 phones? | qmei | Mobile Java General | 1 | 2006-01-23 13:09 |
| Audio Streaming APIs on 9210 | Nokia_Archive | General Symbian C++ | 1 | 2002-05-30 13:45 |