ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #18817
Re: bluez on ubuntu phone
On 12.03.2016 14:03, Rodney Dawes wrote:
> Hi Nick,
>
> Low level APIs like bluez are generally not part of the SDK meant to be
> used by applications on the phone, and higher level QML APIs are what
> are supported in the SDK. However, currently there is also no policy
> group for talking to bluez over dbus, nor any supported method of
> performing background processing, so you won't be able to create a
> device pairing, or perform any background tasks, within an application
> you intend to upload to the store, currently.
From an API point of view, with some little knowledge of what's going
on, everything needed is around to create for instance multiplayer games
talking to each other over Bluetooth (basically use cases where your app
stays focused and the screen stays on). The only thing that's really
missing is an apparmor Bluetooth policy to allow those things from
confined apps. IMO it's about time to add that tho. I'll see if I can
poke Pat next week about this.
QtBluetooth is currently not included in the image seed, however,
installing libqtconnectivity-dev:armhf in the chroot and shipping
libqbluetooth5 within your click package would do just fine (example
here [1]).
Here for instance is some (very unpolished) code that adds a content hub
plugin for sending files over OBEX push [2] (in the shareplugin dir).
Note that I wrote this during Bluez4 days, so it wont work as is any
more today.
For other use cases, that require keeping a permanent connection to a
device even when the phone's screen is off, indeed currently there is no
defined way forward on how to get that into the official store. At this
point, I guess OpenStore is your best bet. An example for a smartwatch
app in OpenStore can be found here [3].
In any case, I think starting off with OpenStore and moving things over
to the official store as the Bluetooth story shapes up is a viable option.
Hope this helps,
Michael
[1]
http://bazaar.launchpad.net/~mzanetti/rockwork/trunk/view/head:/rockworkd/rockworkd.pro#L132
[2] http://bazaar.launchpad.net/~mzanetti/+junk/ubtd/files
[3] https://launchpad.net/rockwork
>
> If you're just looking to experiment with the examples, you can follow
> the instructions in my answer on Ask Ubuntu[1] about how to set up a
> chroot to compile and run traditional CLI tools on the phone.
>
> [1] https://askubuntu.com/questions/620740/#623311
>
>
> On Sat, 2016-03-12 at 03:21 +0200, Николай Шатохин wrote:
>> Hello.
>>
>> I'm trying to run few bluez examples on my ubuntu phone from here: ht
>> tp://people.csail.mit.edu/albert/bluez-intro/x502.html
>> But Ubuntu SDK can't compile it because can't found bluez headers
>> (and I suppose lib too). So, how to get it worked?
>>
>> Best regards,
>> Nick
>> --
>> Mailing list: https://launchpad.net/~ubuntu-phone
>> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ubuntu-phone
>> More help : https://help.launchpad.net/ListHelp
>>
>>
Attachment:
signature.asc
Description: OpenPGP digital signature
References