obex

Read contacts using bluetooth

送分小仙女□ 提交于 2020-01-05 04:00:27
问题 I'm trying to read contacts from my mobile device using 32feet library and i'm having a bad request error when I try. The device is paired with my app. This is my code: var item = (BluetoothDeviceInfo)listBox.SelectedItem; Task.Run(() => { item.Update(); item.Refresh(); item.SetServiceState(BluetoothService.PhonebookAccess, true); if (OBEXOpenStream(item.DeviceAddress.ToString())) { if (OBEXConnect()) { string tName = ""; string tType = "text/x-vCard"; string tFileContent = ""; int result =

Android: how can i browse remote device file system via bluetooth?

前提是你 提交于 2019-12-19 17:35:49
问题 I need to build an Android app that puts/gets files from a remote device via Bluetooth; the app must also browse the remote filesystem. I've read something about OBEX but have really not found any example for Android, except some great apps on the market as Bluetooth File Transfer. How can it be implemented in an app? 回答1: Since there is no standard method/implementation of OBEX OPP/FTP that is exposed to developers on Android, you will have to roll you own over the Bluetooth API which is

Android RFComm with OBEX Push not working

折月煮酒 提交于 2019-12-10 12:02:10
问题 I am trying to remake a java application into an android application, but I cannot make it work. The application is meant to talk to a device that uses OBEX Push. The device cannot take any incoming connections and it has no user interface but some LEDs. The java code snippet I am trying to remake is following: LocalDevice local; local = LocalDevice.getLocalDevice(); local.setDiscoverable(DiscoveryAgent.LIAC); String sConnectionURL = "btspp://localhost:" + myUUID + ";name=" + obexName; this

Read contacts using obex in c#

心不动则不痛 提交于 2019-12-08 03:09:49
问题 I'm trying to read contacts using 32feet library for c#. I'm connecting my PC to mobile device via bluetooth, and when I try to execute this code always give me bad request error LocalInfo.SetServiceState(BluetoothService.PhonebookAccessPce, true); BluetoothAddress addr = BluetoothAddress.Parse("00:00:00:00:00:00"); BluetoothEndPoint rep = new BluetoothEndPoint(addr, BluetoothService.PhonebookAccessPse); BluetoothClient cli = new BluetoothClient(); cli.Connect(rep); Uri uri = new Uri(ObexUri

Access Android's OBEX server and read data

徘徊边缘 提交于 2019-12-07 19:12:25
问题 I was wondering if it's possible to read data (contacts, missed calls, etc.) from Android's OBEX server from windows with Bluecove. I tried the following code from windows, but it returns OBEX_HTTP_NOT_ACCEPTABLE when connecting. Device address and channel are correct as I can tell since when running this test, android pops up a dialog asking if I allow the other device to access it's contacs. Thanks! code: import java.io.IOException; import javax.microedition.io.Connector; import javax.obex.

bluetooth file send

回眸只為那壹抹淺笑 提交于 2019-12-07 17:47:32
问题 i'm new to bluetooth development and i found the 32netfeet . Right now i'm able to search for bluetooth devices nearby and connect to them but how do i send a file e.g SendTest.txt? I tried buttonclick event using the OBEX but i don't understand this is my example code: using InTheHand.Net; using InTheHand.Net.Sockets; using InTheHand.Net.Bluetooth; namespace BluetoothIntheHand { public partial class Form2 : Form { private Guid service = BluetoothService.DialupNetworking; private

Access Android's OBEX server and read data

China☆狼群 提交于 2019-12-06 07:54:06
I was wondering if it's possible to read data (contacts, missed calls, etc.) from Android's OBEX server from windows with Bluecove. I tried the following code from windows, but it returns OBEX_HTTP_NOT_ACCEPTABLE when connecting. Device address and channel are correct as I can tell since when running this test, android pops up a dialog asking if I allow the other device to access it's contacs. Thanks! code: import java.io.IOException; import javax.microedition.io.Connector; import javax.obex.*; public class PBAPTest1 { public static void main(String[] args) { String deviceAddress =

Sending multiple files through Bluetooth

旧街凉风 提交于 2019-12-06 01:48:06
问题 I saw your answer about sending file through Bluetooth. (answered Jun 13 '11 at 5:01) Intent i = new Intent(Intent.ACTION_SEND); i.setType("image/jpeg"); i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/sdcard/file.jpg")); startActivity(Intent.createChooser(i, "Send Image")); Yes! It works. It will open a default Bluetooth tool/window/dialog to send a file. But would you please teach me how to send more files? Here is my code... String xFile[3] = { "aa.txt", "bb.txt", "cc.txt" }; Intent i = new

bluetooth file send

吃可爱长大的小学妹 提交于 2019-12-05 22:00:35
i'm new to bluetooth development and i found the 32netfeet . Right now i'm able to search for bluetooth devices nearby and connect to them but how do i send a file e.g SendTest.txt? I tried buttonclick event using the OBEX but i don't understand this is my example code: using InTheHand.Net; using InTheHand.Net.Sockets; using InTheHand.Net.Bluetooth; namespace BluetoothIntheHand { public partial class Form2 : Form { private Guid service = BluetoothService.DialupNetworking; private BluetoothClient bluetoothClient; public Form2() { InitializeComponent(); } private void btnSearch_Click(object

Sending multiple files through Bluetooth

梦想的初衷 提交于 2019-12-04 05:59:40
I saw your answer about sending file through Bluetooth. (answered Jun 13 '11 at 5:01) Intent i = new Intent(Intent.ACTION_SEND); i.setType("image/jpeg"); i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/sdcard/file.jpg")); startActivity(Intent.createChooser(i, "Send Image")); Yes! It works. It will open a default Bluetooth tool/window/dialog to send a file. But would you please teach me how to send more files? Here is my code... String xFile[3] = { "aa.txt", "bb.txt", "cc.txt" }; Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); for (int i = 0; i < 3; i ++) { intent.putExtra