Is there new information about that problem?

On Apr 25, 9:41 am, scanning_it <[email protected]> wrote:
> Well after testing the whole thing I recognized that the state is not
> delivered via an Intent extra. (although mentioned in the SDK)
>
> Here is what I tried:
>
>         Log.e(TAG,"Received Bt change. Change action: "+intent.getAction
> ());
>         int state = intent.getIntExtra("BLUETOOTH_STATE", 404);
>         int previousState = intent.getIntExtra
> ("BLUETOOTH_PREVIOUS_STATE", 404);
>
> The action is fine but the states are always 404. So there is no state
> returned.
>
> Could you lead me to the file where you have found the things you
> mentioned. I haven't found it in the source. :(
>
> Thank you very much.
>
> Regards.
>
> On Apr 25, 9:11 am, scanning_it <[email protected]> wrote:
>
> > Thank you very much. I am aware that it is not part of the public
> > API. :)
>
> > On Apr 24, 10:41 pm, Nick Pelly <[email protected]> wrote:
>
> > > On Fri, Apr 24, 2009 at 7:09 AM, code_android_festival_way <
>
> > > [email protected]> wrote:
>
> > > > At the moment I am trying to update my application to Android 1.5.
>
> > > > In Android 1.1 I was able to detect the BT state with catching the
> > > > following broadcasts:
>
> > > > <action android:name="android.bluetooth.intent.action.ENABLED" />
> > > > <action android:name="android.bluetooth.intent.action.DISABLED" />
> > > > <action
> > > > android:name="android.bluetooth.intent.action.REMOTE_DEVICE_FOUND" />
> > > > <action
> > > > android:name="android.bluetooth.intent.action.REMOTE_DEVICE_DISCONNECTED"
> > > >  /
>
> > > > <action
> > > > android:name="android.bluetooth.intent.action.REMOTE_DEVICE_CONNECTED" /
>
> > > > <action
> > > > android:name="android.bluetooth.intent.action.BONDING_CREATED" />
>
> > > > After testing with Android 1.5 I recognized that only:
>
> > > > <action
> > > > android:name="android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED" /
>
> > > 1) These are not part of the public API. If you use them it is at your own
> > > risk, and your app will probably break again going forward beyond cupcake.
>
> > > 2) Your question is easily answered by looking at the source.
>
> > >     /** Broadcast when the local Bluetooth device state changes, for 
> > > example
> > >      *  when Bluetooth is enabled. Will contain int extra's 
> > > BLUETOOTH_STATE
> > > and
> > >      *  BLUETOOTH_PREVIOUS_STATE. */
> > >     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
> > >     public static final String BLUETOOTH_STATE_CHANGED_ACTION =
> > >         "android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED";
>
> > > > is available.
>
> > > > How can I detect the specific state of Bluetooth in 1.5? With the
> > > > settings I can only differentiate between BT on and off.
>
> > > > I'm looking forward reading your answer.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to