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

Java Development

Reply
Developer
Posts: 103
Registered: ‎12-12-2011
My Device: Developer
My Carrier: Robosoft

Share via WhatsApp Messanger

Hello all, can anyone tell me is there a way to share an article or a photo via WhatsApp Messanger in BB application?

Thank uSmiley Happy

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Share via WhatsApp Messanger

you would have to ask the whatsapp developers if they support this.
i suspect that the answer is no.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 103
Registered: ‎12-12-2011
My Device: Developer
My Carrier: Robosoft

Re: Share via WhatsApp Messanger

Thank you Simon, even i suspect the same answer, anyhow will confirm it..

Developer
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Share via WhatsApp Messanger

For BB10 only

 

<!-- Invoke target for incoming push -->
    <invoke-target id="com.whatsapp.WhatsApp.invoke.push">
        <entry-point-id>WhatsApp</entry-point-id>
        <invoke-target-type>SERVICE</invoke-target-type>
        <filter>
            <action>bb.action.PUSH</action>
            <mime-type>application/vnd.push</mime-type>
        </filter>
    </invoke-target>
    
    <!-- Invoke target for when a notification is clicked on in the hub -->
    <invoke-target id="com.whatsapp.WhatsApp.invoke.open">
        <entry-point-id>WhatsAppUI</entry-point-id>
        <invoke-target-type>card.previewer</invoke-target-type>
        <filter>
            <action>bb.action.VIEW</action>
            <property var="uris" value="pim:notification/vnd.wa.whatsapp" />
            <mime-type>notification/vnd.wa.whatsapp</mime-type>
        </filter>
    </invoke-target>
    
    <!-- Invoke target for sharing media -->
    <invoke-target id="com.whatsapp.WhatsApp.invoke.share">
        <entry-point-id>WhatsAppUI</entry-point-id>
        <invoke-target-type>card.composer</invoke-target-type>
        <icon>
            <image>icon_target.png</image>
        </icon>
        <filter>
            <action>bb.action.SHARE</action>
            <mime-type>image/*</mime-type>
            <mime-type>video/*</mime-type>
            <mime-type>audio/*</mime-type>
            <property var="uris" value="file://"/>
        </filter>
        <filter>
            <action>bb.action.SHARE</action>
            <mime-type>text/plain</mime-type>
            <property var="uris" value="data&colon;//local"/>
        </filter>
        <filter>
            <action>bb.action.SHARE</action>
            <mime-type>*</mime-type>
            <property var="uris" value="http://,https://"/>
        </filter>
    </invoke-target>
    
    <!-- Invoke target for simply launching the app -->
    <invoke-target id="com.whatsapp.WhatsApp.invoke">
        <entry-point-id>WhatsAppUI</entry-point-id>
        <invoke-target-type>APPLICATION</invoke-target-type>
    </invoke-target>

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Share via WhatsApp Messenger

@borceq - as this is a BBOS Java forum I am not sure how useful this code is. 

 

But since you posted this, my understanding is that the invoke target will only work if you are developing the application, so this specification would only be useful to the WahtsApp developers.  Is that your understanding too?

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Share via WhatsApp Messenger


peter_strange wrote:

@borceq - as this is a BBOS Java forum I am not sure how useful this code is. 

 

But since you posted this, my understanding is that the invoke target will only work if you are developing the application, so this specification would only be useful to the WahtsApp developers.  Is that your understanding too?


No, everybody can invoke other applications. Works pretty neat on bb10.

 

BB Java does not have this concept. There are possible workarounds for the developer of the app, but if whatsapp does not have them (or document them publicly)...

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Share via WhatsApp Messenger

"No, everybody can invoke other applications. Works pretty neat on bb10."

 

I agree everyone can invoke other applications.  However my understanding was that the definitions that were supplied in this Thread are used as part of the application being invoked (WhatsApp in this case), not as part of the application doing the invoking.  So my question was can you supply these detentions in another application? 

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Share via WhatsApp Messenger

you create an invocation in your own application, and specify the target.
the file above describes the parameters needed for the invocation target.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Share via WhatsApp Messenger

Thanks - learn something every day.....