How do I send csv/text file from an Android phone to a wifi printer?

前端 未结 4 1817
心在旅途
心在旅途 2021-02-03 12:06

I am developing an Android application were I am supposed to get the data from a database in csv/txt file format and later I have to send the files to a wifi printer.

Do

4条回答
  •  星月不相逢
    2021-02-03 12:30

    You can do this using sockets. You can get examples in these links http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/ Example: Android bi-directional network socket using AsyncTask

    and you can google it. (Socket programming via java and android examples)

    So first you must get your printer ip and port and send data to printer via a socket. To be ui friendly, you can create a setting form where you can set available printers ip and port

提交回复
热议问题