How to make call from the application | IPhone class removed

Put your problem here if it does not fit any of the other categories.

How to make call from the application | IPhone class removed

Postby ebersmoll » Tue Oct 14, 2008 12:16 pm

Hi,

In earlier sdk version(m5-rc14_windows) , to make call if number was given following piece of code worked
IPhone phoneService = null;

try {
IServiceManager sm = ServiceManagerNative.getDefault();
phoneService = IPhone.Stub.asInterface(sm.getService("phone"));
} catch (Exception e) {
Log.e("Error",
"exception for phoneservce= stub.asinterface");
}

phoneService.call(myClass.getPhoneNumber());

But in Android SDK 0.9, following have been removed
IPhone Interface for SDK developers to use to control the phone.
IPhone.Stub Local-side IPC implementation stub class.

Now I am porting my application to 1.0. Please tell me how to make the call or in worst case can we make call at a given number using the available APIs in sdk1.0

thanks in advance
-G
Windmill windmill on the land
love forever love is free
ebersmoll
Freshman
Freshman
 
Posts: 7
Joined: Fri Apr 04, 2008 4:41 am
Location: Delhi

Top

Postby brijeshthakur » Wed Nov 19, 2008 6:20 am

ebersmoll.

Use the following code to Make Outlook Call From Emulator.

In AndroidMenifest.Xml

<uses-permission android:name="android.permission.CALL_PHONE" />

Java Code

Intent dial = new Intent("android.intent.action.DIAL");

dial.setData(Uri.parse("tel:99999999999")); // Any Arbitrary Number.

startActivity(dial);


Bye bYe
brijeshthakur
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Jul 23, 2008 12:36 pm
Location: Banglore,India

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 18 guests