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

Web and WebWorks Development

Reply
Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi
Accepted Solution

Register for Search and Share invocation at the same time?

I have an app, which I want to register for OS Search (i.e when users start typing in Search field, my app icon shows up and my app is started). To achieve this I use following in config.xml

 

    <rim:invoke-target id="com.myapp">
        <type>APPLICATION</type>
        <filter>
            <action>bb.action.SEARCH.EXTENDED</action>
            <mime-type>application/vnd.bb.search.criteria</mime-type>
        </filter>
    </rim:invoke-target>

 To register as global SHARE target I use following code:

    <rim:invoke-target id="com.myapp">
        <type>card.composer</type>
        <filter>
            <action>bb.action.SHARE</action>
            <mime-type>application/*</mime-type>
            <mime-type>text/*</mime-type>
            <mime-type>audio/*</mime-type>
            <mime-type>image/*</mime-type>
            <mime-type>message/*</mime-type>
            <mime-type>video/*</mime-type>
            <property var="uris" value="http://,https://,data&colon;//local,file://"/>
        </filter>
    </rim:invoke-target>

 The issue is that I can't have both at the same time. If I register for Search I cannot use the SHARE, and if I register for SHARE I cannot use the Search integration.

 

It's because of the <type> tag, in first case its value has to be "APPLICATION" and in second case it has to be "card.composer".

 

And I can't register two <rim:invoke-target id="com.myapp"> with different <type>

 

Any ideas for workarounds? Or it is a system limitation I have to live with?



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Register for Search and Share invocation at the same time?

You've got the same id down for both. Use unique ones. I'd suggest com.myapp.search, and com.myapp.card for example.
Tim Windsor
Open Source Technical Lead
Highlighted
Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: Register for Search and Share invocation at the same time?

Thank you, it worked.  I was under the false impression, that the target-id must be the same as my appId, thus the confusion.



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry