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


Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL picture

Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL

$8.95



Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008 picture

Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008

$5.95



Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M picture

Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M

$2.95



Dell OEM Latitude Rugged Extreme 7404 Docking Connector Circuit Board picture

Dell OEM Latitude Rugged Extreme 7404 Docking Connector Circuit Board

$14.95



NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL  picture

NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL

$198.22



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98







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