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
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