×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    ZXing fails on Nokia N97

    Hello there!

    I would like to run the open source J2ME implementation of ZXing on the N97 and allways receive a NullPointerException. This might have something to do with Nokia's JSR-234 implementation.

    Does anyone here have experiences concerning this error and know how to handle such an exception?

  2. #2
    Nokia Developer Expert
    Join Date
    Nov 2008
    Posts
    72

    Re: ZXing fails on Nokia N97

    It is hard to tell if NPE is related but S60 JSR-234 does not implement zoom control and therefore zxing will not be very usable.
    --
    Gorkem

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Re: ZXing fails on Nokia N97

    Is it possible to receive a detailed error message while using the N97 emulator?

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    53

    Re: ZXing fails on Nokia N97

    zXing works fine with N97. Probably you would have missed some resources, thats why you got this 'NullPointer' exception. zXing has 2 versions of sources in the framework; one for devices supporting jsr 234 and one for the devices which do not support JSR 234. So, if you think that issue is in JSR 234 implementation code, you can comment the section and run the application with basic core code(i.e. without jsr 234). But N97 supports JSR 234 and that would not be the issue. So better you check with all project resources added correctly.

  5. #5
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    53

    Re: ZXing fails on Nokia N97

    One more thing Soen, check in the midlet attributes that it points to the right midlet class.
    MIDlet class : com.google.zxing.client.j2me.ZXingMIDlet
    And also check the midlet icon is present in the pointing path(/zxing-icon.png).

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    2

    Re: ZXing fails on Nokia N97

    I also got the same problem (NPE) with zxing on my 5800 XpressMusic. I tried both versions of zxing, and both got the same problem. Any advice pls? Tks in advance.

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    2

    Re: ZXing fails on Nokia N97

    It is caused by the fact that the time (2000 ms) that is set to the splash page was too short. The phone doesn't have enough time to instantiate the player & videoControl instance variables, before those variables are being referenced (the run() of SplashThread class calls splashDone() of ZXingMIDLet). So NPE is thrown. Set the time to, say, 5000 ms, will fix the NPE. However, I am having problem reading barcodes. It always says "Sorry, no barcode was found".

  8. #8
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Re: ZXing fails on Nokia N97

    In the meanwhile I got the ZXing application run on the N97 device. Everything works fine, except the auto focus of the camera. It's necessary to focus the barcodes, because otherwise the decoding process fails (same issue as 'pshcheung'?).

    My first idea was, that Nokia perhaps didn't implement the AMMS API (JSR-234), which is mentioned in the implementation notes (see for instance http://library.forum.nokia.com/). But then I found another barcode reader (from UpCode), which is also implemented in Java and works fine for the N97 device (including auto focus functionality).

    My question: Does anybody have an idea, why the camera doesn't focus while the camera is in use inside a Java application?

    The AdvancedMultimediaManager implemented by ZXing (see http://code.google.com/p/zxing/), offers three methods: setFocus(), setZoom(), setExposure(), setFlash(). I tried to use these methods and to leave them unactivated with the same result: No focus function at all.

  9. #9
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: ZXing fails on Nokia N97

    Hi, i ve used in three phone model. First nokia e71 wich implement jsr 234 (autofocus capability, zooming also, ...) and it works well. so i ve tryed the same code and just desacte amms feacher and deployed my application on nokia 2700 classique. i was realy disappointed ;(. the result were not sattisfied. i also tryed my application with another phone constructor the result were worst. hehehe
    did i have chosed the best library? did you know if there is an other library i should use (not essentialy open source).
    i ve used mobiletag reader and kaywareader and these application work perfectly. i want to developpe same application.
    best regards.

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×