Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon
Accepted Solution

ANE permissions

Im trying to make an ANE for BBM for air and have run into problems with permissions. I can include the bbplatformbbmsp lib in the ANE but how do i grant permission since there is no {libname}.xml or bar-descriptor.xml file?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ANE permissions

I'm just guessing, but it seems very likely to me that the permissions which matter are those of the app in which the ANE is used, not any that are specified by the ANE itself. I've never done an ANE and moved on from AIR, but this just seems likely to me. Maybe it's something you can try easily enough?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: ANE permissions

As far as i know there is no BBM support for AIR other than invoke, so i dont think there are any permissions for it.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ANE permissions

The permissions in the bar-descriptor file are generic, not tied to any one platform. To use libbbmsp.so, you need to specify <permission>bbm_connect</permission> for an AIR app using it via an ANE, same as you do for a Native or Cascades app. (WebWorks might do things a bit differently but I think even there it translates into the same permissions in the end.)

See http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.do... for a full list of the available documented permissions.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: ANE permissions

Ok, is there a way to check if your app was granted permission? I tried that and got the permissions box and selected ok, but still throws an error in ANE. But when i comment out all the bbmsp methods then it runs fine. I clicked on my name and then apps inside bbm but the list is empty.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ANE permissions

The original call to bbmsp_request_events(0) will return BBMSP_FAILURE if the user has not granted permission to your app.

Note that there are still numerous bugs with BBM, as noted in the release notes, even with the latest release. You might want to read about some of those: https://developer.blackberry.com/blackberry10devalphas/releasenotes/

I've had various issues with BBM not working consistently while I was developing with it initially... sometimes I had to reboot to clear out some "state" that it seemed to be stuck with, so consider doing that. You may find you need to "baby" it a bit, until maybe the next release (Jan 30) fixes more of the issues.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: ANE permissions

Yeah, but i dont think you can debug the ANE through FB and it seems it fails to even load if the bbmsp library is linked (from my understanding of the c/c++ linker from school, a library isnt linked if no calls to any of its methods are made).
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ANE permissions

Sorry I can't help with that aspect. My own approach loads the library dynamically, after the app launched, so what I saw could be different from what you're seeing.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: ANE permissions

I found the issue, there are apparently two bbm libraries in the NDK....one is libbbmsp (BlackBerry Messenger Social Platform) and one is libbbplatformbbm (BlackBerry Social Platform BBM). The second one is the one I had linked, but the first one is the one I should be using.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ANE permissions

That would do it. The "platform" one is the C++ stuff for Cascades.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.