android 2.1 using usb bluetooth

by WuZhenda » Thu, 30 Dec 2010 22:14:55 GMT


Sponsored Links
 Hi,all.I'm trying to use usb bluetooth in android 2.1.
I find I can use  "bttest enable", "bttest disable" ,and "scanetc bluztool
in adb mode,but when I try to set bluetooth ON,in the UI,

It didn't work,the logcat just show  "V/BluetoothEventRedirector( 2143):
Received android.bluetooth.adapter.action.STA
TE_CHANGED"

I have changed bluetooth.c  to avoid use  rfkill method.and modified
init.rc  like this:
anyone can give some advice
 mkdir /data/misc/bluetoothd 0777 bluetooth bluetooth


service dbus /system/bin/dbus-daemon --system --nofork
    socket dbus stream 660 bluetooth bluetooth
    user bluetooth
    group bluetooth net_bt_admin


service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -d -n
    socket bluetooth stream 660 bluetooth bluetooth
    socket dbus_bluetooth stream 660 bluetooth bluetooth
    # init.rc does not yet support applying capabilities, so run as root and
    # let bluetoothd drop uid to bluetooth with the right linux capabilities
    group bluetooth net_bt_admin misc
    disabled

service hciattach /system/bin/logwrapper /system/bin/hciattach -l
    user root
    group bluetooth net_bt_admin misc
    disabled

service hfag /system/bin/sdptool add --channel=10 HFAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service hsag /system/bin/sdptool add --channel=11 HSAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service opush /system/bin/sdptool add --channel=12 OPUSH
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service pbap /system/bin/sdptool add --channel=19 PBAP
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

-- 



Other Threads

1. Hoe to record voice..?

Hi friends,

              I am trying to record a voice but i am getting an
exception..when the clicks on a button it will start recording and when he
clicks on stop it's stops recording that is my idea and that recorded file
will be stored in SDCard. But here i am getting IllegalStateException at
recorder.start(); this line...


@Override
public void onClick(View v) {
if(v==rec)
{
 recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
recorder.setOutputFile("/sdcard");
try {
recorder.prepare();
} catch (IllegalStateException e) {
 e.printStackTrace();
} catch (IOException e) {
 e.printStackTrace();
}
try
{
recorder.start();  *//here iam getting exception*
}
catch(IllegalStateException e)
{
System.out.println("Exception...."+e.toString());
}
}
else if(v==stoprec)
{
 recorder.stop();
 recorder.release();
 }

-- 

2. app2sd - not working

I've just updated my app so the user can choose to install it on the
sd card or not. But I keep getting some comments that it's not
possible for them to install it on the sd card. Can anyone see if I've
made anything wrong or if you have any other suggestions?

Andr

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.someapp.fun"
        android:versionCode="1"
        android:versionName="3.0"
        android:installLocation="auto" >

        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.READ_PHONE_STATE" /
        <uses-permission android:name="android.permission.VIBRATE" />

        <uses-sdk android:minSdkVersion="4" />

    <application android:icon="@drawable/icon" android:label="@string/
app_name">

        ...

    </application>
</manifest>

-- 

3. Order of insert

4. Accessing AudioManager within a class which extends BroadcastReceiver

5. Exchanging data between apps

6. Package name problem during apk installation

7. setFilterQueryProvider not working - Please help