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
New Developer
NH_dev
Posts: 6
Registered: ‎02-09-2013
My Device: BlackBerry Z10
My Carrier: VivaCell

How to invoke "Text Messages" app to compose sms ?

Hello,

 

I'm trying to invoke the native app for sending sms, but can't figure out the invocation parameters.

The sample app "invoke client" and

https://developer.blackberry.com/cascades/documentation/device_platform/invocation/email.html

 

 documentation allow me to invoke composer for email, but not for text messages.

 

Any suggestion is highly appreciated.

 

 Thanks,
    Narek

Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: How to invoke "Text Messages" app to compose sms ?

As far as I know, it's not documented yet. But it's available.

 

<invoke-target id="sys.pim.text_messaging.uib.view">
        <type>card.previewer</type>
        <filter>
            <action>bb.action.REPLY</action>
            <mime-type>application/vnd.blackberry.sms</mime-type>
            <mime-type>application/vnd.blackberry.mms</mime-type>
            <property var="uris" value="pim:"/>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging.uib.compose">
        <type>card.previewer</type>
        <filter>
            <action>bb.action.FORWARD</action>
            <mime-type>application/vnd.blackberry.sms</mime-type>
            <mime-type>application/vnd.blackberry.mms</mime-type>
            <property var="uris" value="pim:"/>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging.composer">
        <type>card.previewer</type>
        <filter>
            <action>bb.action.COMPOSE</action>
            <mime-type>application/text_messaging</mime-type>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging.previewer">
        <type>card.previewer</type>
        <filter>
            <action>bb.action.VIEW</action>
            <mime-type>application/text_messaging</mime-type>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging.sharemedia">
        <invoke-target-type>card.previewer</invoke-target-type>
        <type>card.previewer</type>
        <icon><image>share_icon.png</image></icon>
        <filter>
            <!-- Single File share -->
            <action>bb.action.SHARE</action>
            <mime-type>*</mime-type>
            <property var="uris" value="file://"/>
        </filter>
        <filter>
            <!-- Multi-File share -->
            <action>bb.action.SHARE</action>
            <mime-type>filelist/*</mime-type>
            <property var="uris" value="list://"/>
        </filter>
        <filter>
            <!-- Contact card sharing -->
            <action>bb.action.SHARE</action>
            <mime-type>*</mime-type>
            <property var="uris" value="file://"/>
            <property var="exts" value="vcf"/>
        </filter>
        <filter>
          <action>bb.action.SHARE</action>
          <mime-type>text/plain</mime-type>
          <mime-type>application/vnd.blackberry.string.address</mime-type>
       </filter>
        <filter>
            <!-- Browser share link -->
            <action>bb.action.SHARE</action>
            <mime-type>*</mime-type>
            <property var="uris" value="http://,https://"/>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging">
        <type>card.previewer</type>
        <icon><image>share_icon.png</image></icon>
        <filter>
            <action>bb.action.SENDTEXT</action>
            <mime-type>application/vnd.blackberry.string.phone</mime-type>
        </filter>
        <filter>
            <action>bb.action.SENDTEXT</action>
            <mime-type>application/vnd.blackberry.string.contact</mime-type>
        </filter>
        <filter>
            <action>bb.action.SENDTEXT</action>
            <mime-type>*</mime-type>
            <property var="uris" value="tel:"/>
        </filter>
    </invoke-target>
    <invoke-target id="sys.pim.text_messaging.smsuri">
        <type>card.previewer</type>
        <icon><image>share_icon.png</image></icon>
        <filter>
            <action>bb.action.OPEN</action>
            <mime-type>*</mime-type>
            <property var="uris" value="sms:,smsto:"/>
        </filter>
    </invoke-target>
    
    <!-- CROSS-PERIMETER -->
    <invoke-target id="sys.pim.text_messaging.smsuri.entr">
        <type>card.composer</type>
        <icon><image>share_icon.png</image></icon>
        <filter>
            <action>bb.action.OPEN</action>
            <mime-type>*</mime-type>
            <property var="perimeter" value="enterprise"/>
            <property var="uris" value="sms:,smsto:"/>
        </filter>
        <filter>
            <action>bb.action.SENDTEXT</action>
            <mime-type>*</mime-type>
            <property var="perimeter" value="enterprise"/>
            <property var="uris" value="sms:,smsto:,tel:"/>
        </filter>
    </invoke-target>

 

Please use plain text.
New Developer
NH_dev
Posts: 6
Registered: ‎02-09-2013
My Device: BlackBerry Z10
My Carrier: VivaCell

Re: How to invoke "Text Messages" app to compose sms ?

Thank you very much. It works - now I'm able to invoke the sms composer,

just still can't figure out how to populate 'number', and 'body' fields together.
I suppose it should be achieved by sms:, and smsto: parameters in uris, but wasn't able to make it work. Only number field is being initialized.

 

If you have done such thing and can suggest more, that will be great.

 

 Thanks a lot.

 

Please use plain text.
BlackBerry Development Advisor
shaque
Posts: 227
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to invoke "Text Messages" app to compose sms ?

Hi,
Apologies for the delay. Our docs team is currently preparing the docs for sms/mms invocation. They should be online in a week or so.

Shadid
Please use plain text.
New Developer
NH_dev
Posts: 6
Registered: ‎02-09-2013
My Device: BlackBerry Z10
My Carrier: VivaCell

Re: How to invoke "Text Messages" app to compose sms ?

Ok. Thank you very much!
Looking forward to it.

Narek
Please use plain text.
Trusted Contributor
Sith_Apprentice
Posts: 207
Registered: ‎05-02-2010
My Device: various
My Carrier: AT&T

Re: How to invoke "Text Messages" app to compose sms ?

borceg,
do you know how to set the recipient for sms? I want people to type whatever message they want, but have it sent to a specific number (set by variable)
If you are the original poster (OP) and your issue is solved, please remember to click the "Accept as Solution" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the Star on the left of their post.
Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: How to invoke "Text Messages" app to compose sms ?

Nope, sorry.
Please use plain text.
Developer
noahhuang
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: How to invoke "Text Messages" app to compose sms ?

Could your team also have a example on it? Thank you.

Please use plain text.