Add Wifi Printers to React Native

Viewed 1252

I am developing a React Native app and as a part of functionality the app needs to scan for printers connected in the same WiFi network as app is connected.As a part of the research i could find only one library react-native-printer but this does not gives full flexibility so i thought of integrating this module as a Native Module(Java and Swift) as a first step i started to look for Android support but could not find any proper documentation or example for the same.Any working example or documentation will be helpful.

Currently i tried WifiManager API from Android to scan for printers but then once i get scan result how do i configure the printer for the app to print jobs.

Note: i need to identify any generic printers that is connected to the same WiFi network.

1 Answers

What about embed a local web page in a webview and use something like https://printjs.crabbly.com/

 <button type="button" onclick="printJS('docs/printjs.pdf')">
    Print PDF
 </button>
Related