print from android using wifi or bluetooth - android

I am making an app in which i require printing options in Android. I tried with google cloud print and other options, but my requirement is that i need to print it offline either by using a network wifi or bluetooth. I have no idea in this field and also android doesnt come with inbuilt print options ...so please help
my basic requirement is that my device should first find printer either in a network or some way through bluetooth and then print should b fired..
Please help and thanks in advise I really need some starting knowledge to begin with
any other suggestions are welcomed

Some bluetooth printers use OBEX for file transfer (Polaroid, for example), but android has no api to use it except sharing api. You can create your own implementation of OBEX or google it.

Related

Transfer data between android device over wifi

I want to send data (for an example it contains the information: name,address) from my app to another hotspot enabled android device using the same app and display the information in it. So, how do I transfer? If it is not possible please tell me if there any possible way to transfer data via WiFi. Since I am new, procedure with code help me a lot.
This is what you need. P2P communication can only by performed by devices that run android 4.0 and up.

How to send file / message between two android device with out any intermediate server

I want to send files between two devices using internet connection with out use any intermediate /server. For example there are two device A and B both have internet connection and both device have installed my application, now need to send a file from Device A to Device B. Device A can know all the detail about the Device B.
Is this possible means guide me in the correct way. Thanks in advance.
You can use a Peer to Peer architecture to achieve this. Basically every phone is a client and a server the same time. See here for a basic implementation.
If the internet is not a prerequisite, you can follow Minav Patel's suggestion and use the Android Bluetooth implementation.
Another solution would be the WiFi-Direct feature (if the phone support it). See here for an example.
You can implement file transfer between two android devices using android bluetooth implementation.Go through following links it will help
android bluetooth implementation basics
http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html
http://developer.android.com/guide/topics/connectivity/bluetooth.html

Getting started with Bluetooth development for Android: Suggestions for test application

I have a task to integrate a Bluetooth device into my application. Now my requirement is very specific. The device has a specific communication protocol which relies on certain ACKs but I figured it would make my development much easier if there was a program that let me test communication with the device.
I was wondering if there was a program for Linux, or perhaps a simple Android program which let me communicate with any Bluetooth device with a series of pings using data I enter and simply log the responses.
EDIT: I might not have been clear enough in my question.
I have a scale that I need to integrate into my application, and the scale has a protocol similar to this:
Get a specific byte string from device
Transfer data
Transfer packet for disconnection
Receive acknowledgement for disconnect packet
Disconnect
Now when I have to issue a POST request from my application, I usually build a test script online so I can test if the POST works properly.
I was wondering if there was something similar I could do with the device.
Thanks
Your question is not clear enough. To communicate with a BT device, you need to know what profile your device supports. Depending on that, you can find a way in Android or Linux or windows to communicate with the device.
The simplest way is to open an RFCOMM channel from android/PC and transfer data to and from the device. For this the device has to support the serial port profile (SPP). If you want to do this in Android, look for the BluetoothChat example from google.
If you want to use a PC/mac/linux look at the Bluez python module. It's really simple to use. There are plenty of other options too..
I was looking for something like SENA BTerm. It lets me connect to any device and send whatever data I wish.
It is an extremely useful tool for testing my code.
http://www.sena.com/download/manual_bterm/overview.html is where you can find it.

Connect Android device to WiFi printer

I want to print my pdf document by my Android phone using wifi on any other way.
or please give me a suggestion about it is possible to connect our Device to wifi printer or send our document for printing.
I hope, I will get best answer or any suggestion from your side as soon as possible.
The simplest way I can think of is using Google Cloud print on android

Transfer data between android devices

I have created an android app and would like to enable users to transfer data (e.g. over TCP). Both have my app installed. Is there any framework or guide how to use bluetooth and/or w-lan to get a good user experience? How do they initiate the connection?
Thanks!
I learned how to use Bluetooth on Android by this link, analysing the source code of the example.
About sending information through TCP/IP, use normal Java for that (Sockets, for example). The only extra you could put it is to send an Intent to activate Wireless if was not activated yet.

Categories

Resources