Problem with bluetooth on android 2.1 (samsung spica i5700) where pairing works but connection does not work

前端 未结 5 1694
南旧
南旧 2020-12-06 08:23

I have a Samsung Spica i5700 which I already have updated to Android 2.1. I am using the phone with an application called Run.GPS (http://www.rungps.net). This application l

5条回答
  •  天涯浪人
    2020-12-06 08:39

    I got this information from the gps-sport forum. Not sure what to do with it though...

    See also http://www.gps-sport.net/forums/thread/1532-0/Keine-Sprachausgabe-auf-HTC-Desire

    Cross posting this entry from the software category. The thread over there deals with the Zephyr HxM as a secondary issue - meaning it mightn't be easy to find...

    24.04.2010 16:47:05 UTC geändert am 24.04.2010 17:03:03 UTC

    A fix to the bluetooth connection problem

    Hi

    If this problem still is not resolved, the code below describes how to make the connection work with Android 2.1 (Tested on HTC Desire). Just replace "00:07:80:89:EE:EB" with the MAC of your HXM to make it connect. After the connection is successful, a regular method with input = socket.getInputStream() can be used.

    BluetoothDevice hxm = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:07:80:89:EE:EB");
    Method m = hxm.getClass().getMethod("createRfcommSocket", new Class[]{int.class});
    socket = (BluetoothSocket)m.invoke(hxm, Integer.valueOf(1));
    socket.connect();
    

    Hope the fix will be out very soon =)

    Best regards Espen S. Nygaard

提交回复
热议问题