Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User edgard_cz's Avatar
    Join Date
    Dec 2009
    Posts
    5
    Hellow,

    Anybody know how to print a image via bluetooth??

    I try to do this, but isn´t work:


    //code----------------------------------------------------------------------------------------------------
    try {
    //reed the image from a file, and saved in a byte array (img)
    FileConnection fc=(FileConnection)Connector.open("file:///E:/Extra/imagen.jpg",Connector.READ_WRITE);
    InputStream is=fc.openInputStream();

    byte img[]=new byte[(int)fc.fileSize()];
    is.read(img);

    is.close();
    fc.close();





    //do a bluetooth connection
    StreamConnection btcon;
    btcon =(StreamConnection)Connector.open("btspp://00158336E722:1;master=false;encrypt=false;authenticate=false");

    OutputStream output = btcon.openOutputStream();

    //send the image to the printer
    output.write(img);

    output.close();
    btcon.close();


    }catch(Exception e){System.err.println("error: " + e);}
    //end code--------------------------------------------------------------------------------------------

    For more information I use java Me, MIDP 2.0,Netbeans IDE, nokia 5130 and a printer Epson mp260.
    I get the bluetooth adress from the printer.



    please I need help.
    thanks.

  2. #2
    Regular Contributor thiagobrunoms's Avatar
    Join Date
    Jan 2008
    Posts
    88
    Hello,
    what do u really want to do?! To print the image that is stored in the device in a printer device through bluetooth?!

  3. #3
    Regular Contributor sunil_bhambani123's Avatar
    Join Date
    Sep 2008
    Location
    Ahmedabad
    Posts
    254
    Hi,

    Are you able to print simple Text document via bluetooth. Printing text is obviously possible using bluetooth and serial port communication. But, for images you will need to see the encodings handled by the printer. If it has some specific standard then you need to send the image accordingly.
    Sunil
    Mobile Application Developer

Similar Threads

  1. Replies: 35
    Last Post: 2009-04-11, 14:36
  2. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  3. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  4. 7650 Sending Image Via Bluetooth
    By adam_bruce in forum Bluetooth Technology
    Replies: 4
    Last Post: 2002-12-20, 22:39
  5. Send an image from the 7650 to a laptop using Bluetooth
    By dgilders in forum Bluetooth Technology
    Replies: 2
    Last Post: 2002-10-14, 22:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved