×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    11

    Problem whith ReadVisualTag

    hey,

    I'm currentle trying to develop an application on a nokia 6212. This aplication should read a 2D barcode when finished but i'm having some trouble using the VirtualTagConnector. The application is throwing an exception while making a VisualTag connection. The code is as I included here or at least the function which uses it is.

    these are the imported library's used in the code

    import java.io.IOException;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.contactless.ContactlessException;
    import javax.microedition.contactless.visual.*;


    and the function is as stated below:

    [I]public String readVisualTag() {

    boolean supported = true;
    String mySymbology ="data-matrix";
    String dataout = "Not supported";

    try {
    Check that needed symbology is supported for reading
    String[] symbologies = SymbologyManager.getReadSymbologies();
    for (int i=0; i<symbologies.length; i++) {
    if (symbologies.equals(mySymbology)) {
    supported = true;
    break;
    }
    }
    if (supported) {
    // Get supported image classes
    Class[] images = SymbologyManager.getImageClasses();
    // Read visual tag
    VisualTagConnection conn = (VisualTagConnection)Connector.open("vtag://"); byte[] data = conn.readVisualTag(image, null , mySymbology);
    //putting the data in a string
    dataout = new String(data);
    // Handle data from the image
    conn.close();

    }
    else {
    System.out.println("Symbology not supported for reading");
    }

    }
    catch (IOException ioe) {
    message1="InptOutputException";
    message2=ioe.getMessage();
    }
    catch (VisualTagCodingException ce) {
    message1="VisualTagCodingException";
    message2=ce.getMessage();
    }
    return dataout;
    }


    the exception occurs on the line that I colored in red. I have no idea why but it throws an IOException while debugging.
    If anyone got an idea why that is or how it can be solved, plz let me know. Al help is welcome.
    Thank you in advance for the effort of at least reading this.

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Problem whith ReadVisualTag

    Did you happen to check this wiki link..:-

    http://wiki.forum.nokia.com/index.php/Contactless_API
    http://discussion.forum.nokia.com/fo...d.php?t=106690

    Hope they help..

    Cheers,
    Mayank

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    11

    Re: Problem whith ReadVisualTag

    I still didn't found a solution for the problem. I searched the forum with my problem but no succes either there.

    Now I was wondering if you could give me a confirmation that the Nokia 6212 phone does support the JSR-257 for visual tags?

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Problem whith ReadVisualTag

    Quote Originally Posted by joery_vn View Post
    I still didn't found a solution for the problem. I searched the forum with my problem but no succes either there.

    Now I was wondering if you could give me a confirmation that the Nokia 6212 phone does support the JSR-257 for visual tags?
    I have to confess I am not an expert in this area, however Nokia does claim that the device in question supports JSR-257 here however we also have people talking in the forum here that it might not be possible to do visual tags with 6212. I'd rather have someone from Nokia or an expert comment on this now.

    BTW Nokia also has a dedicated NFC SDK here

    Cheers,
    Mayank

Similar Threads

  1. Some problem whith a Notepad
    By Ctrlaltcanc in forum Python
    Replies: 0
    Last Post: 2008-02-04, 09:41
  2. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  3. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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