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

Adobe AIR Development

Reply
BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: Enable Share button in context menu

@mdd

So I asked internally what's up here and it would seem that InvokeActionItems is restricted to SET and SHARE actions. I am still not sure 100% the rationale behind it but it's a platform behaviour and not something wrong or broken in AIR.

Sounds like you will have to add all other actions manually.
Developer
Developer
Posts: 226
Registered: ‎01-17-2012
My Device: PB

Re: Enable Share button in context menu

ok, that mystery is cleared up and context menu for a jpg has Share and Set As.

 

However, when I selected e.g. Share, then BBM nothing happens.  What else is required?  Does something need to be passed in the ByteArray?

BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: Enable Share button in context menu

@mdd

 

What is the location of the file? Is it in a location that the BBM application has access too? Because all of the same application sandbox rules apply here, you can't send it a file path in your applications sandbox.

Developer
Developer
Posts: 226
Registered: ‎01-17-2012
My Device: PB

Re: Enable Share button in context menu

file location:

file:///accounts/1000/appdata/MyTonido.debug.testDev_onido_debug60b05a92/shared/photos/

 

Trusted Contributor
Posts: 223
Registered: ‎03-14-2012
My Device: PlayBook 2.0

Re: Enable Share button in context menu

Your example is not working. 

BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: Enable Share button in context menu

I am afraid it does work for me. I am not really sure how much more help I can be if it doesn't.
Trusted Contributor
Posts: 223
Registered: ‎03-14-2012
My Device: PlayBook 2.0

Re: Enable Share button in context menu

[ Edited ]

@mdd Open your own thread!!

BlackBerry Development Advisor
Posts: 172
Registered: ‎10-25-2010
My Device: Not Specified

Re: Enable Share button in context menu

@vibes I am not really sure what you are talking about. I am trying to help you on your own thread. I have posted several examples that work for me as well as several things to try and solve your problem. I am not sure what other information I can give you or ask from you to help solve your problem.
Developer
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: Enable Share button in context menu

[ Edited ]

@Vibes No need to get angry at others. Also: jdolce's code works for me as well. My guess is that you did not import your *.ane's correctly, or they are not found when compiling. (@jdolce: keep up the good work :smileywink: )

 

which brings me to the following:

- what IDE do you use?

- did you ever successfully added an ANE? (ESPECIALLY the QNXDevice.ane AND most likely QNXSkins)

- have you used classes of ANE's before?

- what AIR version do you use?

 

personally, I'm working in a completely different IDE (company policy) and therefore have to compile via command line. At first, the ANE's were also not found while compiling, though it did while programming (highlighting, syntax checking worked and such). As a hotfix, I did this:

 

STEP ONE

Did you check your bar-descriptor? You  must allow *.ANE's to run, or it won't work

 

<qnx>
    <!-- other stuff -->
    <action system="true">run_air_native</action>
    <!--more other stuff -->
    
</qnx>

 

STEP TWO

The second thing is your MyApp-app.xml. Did you add the necessary extensions? only the ones you need of course

 

    <extensions>
        <extensionID>qnx.fuse.ui.skins.QNXSkins</extensionID>
        <extensionID>qnx.system.QNXDevice</extensionID>
	<extensionID>qnx.net.QNXNetwork.ane</extensionID>
	<extensionID>qnx.sensors.QNXSensors</extensionID>
    </extensions>

 

 

STEP THREE

goto

Blackberry SDK folder -> frameworks -> air-config.xml

 

find the element 'library-path'. It should look similar to this

      <!-- List of SWC files or directories that contain SWC files. -->
      <library-path>
         <path-element>libs</path-element>
         <path-element>libs/mx</path-element>
         <path-element>libs/air</path-element>
         <path-element>locale/{locale}</path-element>
	     <path-element>libs/qnx</path-element>
	     <path-element>libs/blackberry</path-element>
      </library-path>

 add all the *.ane's that you need.  Example

      <!-- List of SWC files or directories that contain SWC files. -->
      <library-path>
         <path-element>libs</path-element>
         <path-element>libs/mx</path-element>
         <path-element>libs/air</path-element>
         <path-element>locale/{locale}</path-element>
	     <path-element>libs/qnx</path-element>
	     <path-element>libs/blackberry</path-element>
	     <path-element>libs/qnx/ane/QNXDevice.ane</path-element>
	     <path-element>libs/qnx/ane/QNXNetwork.ane</path-element>
	     <path-element>libs/qnx/ane/QNXSensors.ane</path-element>
	     <path-element>libs/qnx/ane/QNXSkins.ane</path-element>
	     <path-element>libs/blackberry/ane/BlackBerryPushService.ane</path-element>
      </library-path>

 

Make sure the *.ane's exist at the given paths. BB SDK -> frameworks -> libs -> ...

 

This way, you can be sure the *ane's exist while compiling.

 

 

 

If Step 1 does not work, try 1 + 2, if 1+2 does not work, try 1 + 2 + 3.

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Trusted Contributor
Posts: 223
Registered: ‎03-14-2012
My Device: PlayBook 2.0

Re: Enable Share button in context menu

I tried everything as described but it won't work.
Sorry, this is so frustrating. :smileysad:


- what IDE do you use?
>Flash CS 6

- did you ever successfully added an ANE? (ESPECIALLY the QNXDevice.ane AND most likely QNXSkins)
>Yes. I'm using the invokation framework in a project.

- have you used classes of ANE's before?
>Yes.

- what AIR version do you use?
Air 3.1


I tried to invoke the email CARD without the context menu and that's also not working:

var request:InvokeRequest = new InvokeRequest();
request.target = "sys.pim.uib.email.hybridcomposer";
request.action = InvokeAction.VIEW;
request.uri = "file://path/to/document.pdf";
InvokeManager.invokeManager.invoke( request );

 



What do I miss?