[android-developers] Re: Bluetooth listening to the RFCOMM connection failed.

2010-08-29 Thread Ryan Wang
The whole code I am using to implement the Obex protocol. The bluetooth adapter on the PC side will connect to the phone. But program is blocked in the accept() method. And I got nothing to receive. Why>?>? _server = BluetoothAdapter.getDefaultAdapter().listenUsingRfcommWithServiceRecord("

[android-developers] Re: Bluetooth listening to the RFCOMM connection failed.

2010-08-27 Thread Ryan Wang
One more thing. I am working for java app. The only api for bluetooth is list in the SDK. I cannot call the internal package. and cannot use javax.obex things. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send emai

[android-developers] Bluetooth listening to the RFCOMM connection failed.

2010-08-26 Thread Ryan Wang
I am working on HTC Hero with 2.1 SDK on it. And a Bluetooth adapter on PC only support OPP(Object Push Protocol), which I queried by my blackberry. The adapter's program is written in VC 6.0. It only do connect and send a file through the adapter. I write something to listen the connection with th

[android-developers] Re: Why FileOutputStream cannot effect immediately

2010-07-21 Thread Ryan Wang
I have found the way to solve this problem. Add a force sync after call the flush function. Now it's working great. Code is here: fd = fOutputS.getFD(); fd.sync(); On 7月20日, 下午5时16分, Ryan Wang wrote: > We made a special device just look like a T-flash card. The program &

[android-developers] Why FileOutputStream cannot effect immediately

2010-07-21 Thread Ryan Wang
We made a special device just look like a T-flash card. The program need to communicate with the device by the files. If we write something in a.txt, the COS run in the T-card like thing will write something in b.txt to answer. Here is the problem. If I use code like: FileOutputStream fOutputS = n