Android Question Print through wifi shared printer

drgottjr

Expert
Licensed User
Longtime User
my answer is no. the library's scanning is used to connect you* to the network. even if you were to use a scanning library to identify all nodes on your network, you would have to figure out which were printers (good luck). if you simply use the printer library, i think your problems will be solved (at least those relating to printing on a wifi network). i have 2 networked wifi printers. when i want to print, a dialog appears asking me which printer to use. if you want to use your printer(s) to best advantage, you can also download some software from play that's been uploaded by the manufacturer(s) of your printer(s). i think there are several printing options available here. use the search box.

*edited a few minutes later. the author of the original simplewifilibrary burned out some time back. i see, however, that someone has picked up the torch and released an update. the update may or may not identify all hosts on the network, but even if it does, i don't see how it helps your cause. someone else has already written a library for you to use for printing. otherwise, you have to figure out how to talk to a printer (if you already know how to do this, check out the updated version. this is it: https://www.b4x.com/android/forum/t...wifi-library-updated-v-3-07-05-09-2018.76235/
 
Last edited:
Upvote 0

4rdn1_s

Member
my answer is no. the library's scanning is used to connect you to the network. even if you were to use a scanning library to identify all nodes on your network, you would have to figure out which were printers (good luck). if you simply use the printer library, i think your problems will be solved (at least those relating to printing on a wifi network). i have 2 networked wifi printers. when i want to print, a dialog appears asking me which printer to use. if you want to use your printer(s) to best advantage, you can also download some software from play that's been uploaded by the manufacturer(s) of your printer(s). i think there are several printing options available here. use the search box.

thank you for you explanation, so it mean that I have to use wifi printer on my network instead of usb printer that plugged in to PC?
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
you should be so lucky:) if the printer is visible as a printer on your wifi network, you can print to it. how you make a shared usb printer appear as a node on a wifi network will be a good exercise for you. some printer manufacturers have software enabling you to talk to a usb printer attached to the device with an OTG cable. your device must support such a contraption. you didn't mention usb in your initial post. had i seen that, i would have limited my answer to telling you the library was not for looking for nodes but for access points.
 
Upvote 0

4rdn1_s

Member
Yes, my mistake not to mention the usb printer. Again thanks for you explanation.

I have searched the forum and I think I will use bluetooth printer instead, to print a receipt from my app.
you should be so lucky:) if the printer is visible as a printer on your wifi network, you can print to it. how you make a shared usb printer appear as a node on a wifi network will be a good exercise for you. some printer manufacturers have software enabling you to talk to a usb printer attached to the device with an OTG cable. your device must support such a contraption. you didn't mention usb in your initial post. had i seen that, i would have limited my answer to telling you the library was not for looking for nodes but for access points.
 
Upvote 0
Top