I am trying to get a phone object so that I can call and conference two numbers from within my application.
I have tried using the static PhoneFactory.makeDefaultPhones((Context)this) but have not had any luck.
String phoneFactoryName = "com.android.internal.telephony.PhoneFactory";
String phoneName = "com.android.internal.telephony.Phone";
Class phoneFactoryClass = Class.forName(phoneFactoryName);
Class phoneClass = Class.forName(phoneName);
Method getDefaultPhone = phoneFactoryClass.getMethod("getDefaultPhone");
Object phoneObject = getDefaultPhone.invoke(null);
Error - Caused by java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from Looper thread