简体   繁体   中英

Java midlet detecting printer

I am trying to incorporate an interface into my Midlet app to detect printers. Could be a couple of scenarios:- a. Printers that has been added to the mobile. b. Detect blueetooth printers

Thanks in advance.

Scenario a) You might want to look at the blackberry APIs (just in case) but there is no JavaME standard for discovering printers on mobile phones.

Scenario b) JSR-82 (see www.jcp.org) is the specification for the JavaME Bluetooth API. Most JavaME SDKs have Bluetooth example code to get you started.

However, I have never heard of somebody even attempting to connect a mobile phone to a printer using JSR-82. If I remember correctly, bluetooth works when 2 devices have matching profiles (phone supporting keyboard profile connects to physical keyboard, headset profile connects to actual headset...) and I have never heard of a phone supporting a printer profile from JavaME code (although, that part, I could believe, depending on the phone). The main issue here is probably going to be that the JSR-82 API will probably only let you send non-formatted binary data to any printer you connect to, which would mean that you would have to implement some kind of data transfer protocol in your JavaME code to allow the printer to understand what you want to print.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM