Wednesday, May 5, 2010

[android-developers] Re: Connecting to bluetooth devices

Oh. Well, did you take a look at the Bluetooth Chat example? In that
app the user clicks on the name of the device they want to connect
to. But if you know the device name or the MAC address you can skip
the user interaction part.

On May 5, 9:02 am, Dan Forever <the.mep...@googlemail.com> wrote:
> After looking more closely it seems that the code you pointed to
> simply turns on the bluetooth radio, but doesn't tell me how to
> establish a standard connection with a paired bluetooth device.
>
> I'm essentially trying to create a widget that allows me to enable and
> disable my bluetooth handsfree device (not establish my own custom
> data connection).
>
> On May 5, 5:09 am, DonFrench <dcfre...@gmail.com> wrote:
>
>
>
> >http://developer.android.com/intl/de/guide/topics/wireless/bluetooth....
>
> > On May 4, 2:29 pm, Dan Forever <the.mep...@googlemail.com> wrote:
>
> > > Excellent, where did you find that?
>
> > > On May 4, 9:38 pm, DonFrench <dcfre...@gmail.com> wrote:
>
> > > > In Android 2.0 +:
>
> > > >    Intent enableIntent = new
> > > > Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
> > > >    startActivityForResult(enableIntent, REQUEST_ENABLE_BT);
>
> > > > On May 4, 2:09 am, Dan Forever <the.mep...@googlemail.com> wrote:
>
> > > > > I'm looking to create a button in my app that essentially does the
> > > > > same thing as if a user went to "Settings"->"Wireless & Networks"->"Bluetooth settings" and opted to connect (or disconnect) to a
>
> > > > > previously paired bluetooth device.
>
> > > > > Unfortunately I can't see how this is done from the android bluetooth
> > > > > api. Am I looking in the wrong place? Is there an Intent that can be
> > > > > sent to act as a shortcut to that settings menu option?
>
> > > > > Thank you for any suggestions you can offer
> > > > > - Dan
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscribe@googlegroups.com
> > > > > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscribe@googlegroups.com
> > > > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscribe@googlegroups.com
> > > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscribe@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate