BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-13-2004, 08:35 AM   #1
RobKao
New Member
 
Join Date: Oct 2004
Location: NYC
Posts: 7
Default Calling the phone app

Please Login to Remove!

I've seen couple of threads on this, and want to share w/ people that w/ API 3.7, you can call the phone application from your own app.

The trick that i have not figure out is the how to call the app and have it call a number that you can pass in. Play around w/ the "args" variable in the code (see below)...

Here is the code:

Code:
public boolean gotoPhoneAppxxx40;xxx41;xxx123;
        boolean retval = true;                        
            int handle = CodeModuleManager.getModuleHandlexxx40;"net_rim_bb_phone_app"xxx41;;            
            if xxx40;handle <=0 xxx41; xxx123;
                retval = false;
            xxx125; else xxx123;
                ApplicationDescriptorxxx91;xxx93; phoneDescriptors = CodeModuleManager.getApplicationDescriptorsxxx40;handlexxx41;;
                
                if xxx40;phoneDescriptors == null xxx41; xxx123;
                    retval = false;
                xxx125;
                else
                xxx123;
                    if xxx40; phoneDescriptors.length <=0 xxx41; xxx123;
                        retval = false;
                    xxx125; else xxx123;
                        Stringxxx91;xxx93; args = xxx123;"call","",""xxx125;;                       
                                        
                        ApplicationDescriptor descriptor = new ApplicationDescriptor
                        xxx40;
                            phoneDescriptorsxxx91;0xxx93;,
                            "phone", args,
                            null, -1, null, -1,
                            ApplicationDescriptor.FLAG_SYSTEM
                        xxx41;;
                
                        try
                        xxx123;
                            ApplicationManager.getApplicationManagerxxx40;xxx41;.runApplicationxxx40;descriptorxxx41;;
                        xxx125;
                        catchxxx40;ApplicationManagerException exxx41;
                        xxx123;
                            retval = false;
                        xxx125;
                    xxx125;
                xxx125;                
            xxx125;
        return retval;
    xxx125;
[Edit by Mark Rejhon: Added [code] tags to make your source code more readable]
Offline  
Old 10-14-2004, 10:29 PM   #2
Mark Rejhon
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Default

Just added [code] and [/code] tags around your source code to make it properly formatted.

This would be a Controlled API task, for security reasons.

However, I don't see it in the Controlled API list:
http://www.blackberry.com/developers...lledAPIs.shtml

Therefore, I am not sure if there is a way of doing so -- anyone else who can give an answer?
__________________
Thanks,
Mark Rejhon
Author of XMPP extension XEP-0301:
www.xmpp.org/extensions/xep-0301.html - specification
www.realjabber.org - open source
Offline  
Old 10-15-2004, 09:02 AM   #3
RobKao
New Member
 
Join Date: Oct 2004
Location: NYC
Posts: 7
Default

thanks for making it look nice.

The code uses the net.rim.device.api.system api, so it is part of the controlled API, which means you have to get your code signature.

Nevertheless, the method calls the phone api.

Rob
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MSA ALTAIR 4XR 10178557 Multigas Detector, (LEL, O2, H2S & CO), Charcoal case picture

MSA ALTAIR 4XR 10178557 Multigas Detector, (LEL, O2, H2S & CO), Charcoal case

$699.00



MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty* picture

MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty*

$795.00



MSA ALTAIR 4XR picture

MSA ALTAIR 4XR

$700.00



Altair pump probe P/N 10152669 with Charger picture

Altair pump probe P/N 10152669 with Charger

$190.00



MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2) picture

MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2)

$295.00



Altair WBS-202 Dual channel wireless intercom base station picture

Altair WBS-202 Dual channel wireless intercom base station

$1350.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.