BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-13-2004, 08:35 AM   #1 (permalink)
New Member
 
Join Date: Oct 2004
Location: NYC
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Retired BBF Moderator
 
Mark Rejhon's Avatar
 
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Post Thanks: 1
Thanked 0 Times in 0 Posts
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 (permalink)
New Member
 
Join Date: Oct 2004
Location: NYC
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
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


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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