2

We are writing an application where a digital pen is paired with an android device, then the pen uploads a file to the Android device. We have inconsistent behaviour between different devices and would like a consistent solution. Ideally we would intercept the incoming file and manage the binary data within the application.

  • On a Galaxy S (2.2) and Galaxy Tablet (2.2), when a file was received via Bluetooth it would prompt the user to accept the file, but at that stage it includes a checkbox so that the file is automatically accepted from then on.
  • On a HTC Desire (2.2) the user is prompted when the file is sent from the digital pen, but the user must manually accept the file each time one is sent. If the user doesn't accept in time then the file is lost.

What we would like is consistent behaviour where the user does not need to manually accept each file.

We have also tried several solutions such as

  • listening for incoming files Bluetooth connections,
  • implementing our own BroadcastReceiver,
  • and attempting to get the Android device to act as a Bluetooth server and then manually intercept the file. (similar to the BluetoothChat sample application)

... but without any luck. We are able to trigger an Activity from a Bluetooth intent, but it appears that the OBEX file transfer occurs at a lower level within the workings of the Android device and not able to be intercepted.

We also have the issue that the standard Bluetooth/OBEX implementation writes to a different location depending on the vendor

  • /mnt/sdcard/bluetooth for Samsung
  • /mnt/sdcard/Downloads/bluetooth for HTC.

... but this is a lesser problem and able to be managed via preferences.

David O'Meara
  • 2,983
  • 25
  • 38

0 Answers0