How to access the showCallScreenWithDialpad method?

Asked

Viewed 199 times

0

I’m not getting access to the method showCallScreenWithDialpad class com.android.internal.telephony.ITelephony.AIDL. I’ve tried to reflection and I couldn’t. There’s no way to instantiate the class ITelephony$Stub. I also tried to bindService and also could not (the bindService returns false). Anyone can help?

What I want to do is hide the Android call screen, IE, make a phone call and do not appear the default call screen.

Below follows what I tried.

By Reflection:

 .
 .
 .
 classCallManager = classLoader.loadClass("com.android.internal.telephony.ITelephony$Stub");
 getITelephonyMethod = classCallManager.getMethod("onTransact", cArg); 
 objeto = classCallManager.newInstance();
 getITelephonyMethod.invoke(objeto, 1, "1234567", "1234567", 1); 

This makes a mistake:

Caused by: java.lang.Nullpointerexception: null receiver

Because the object variable is equal to null, because the class cannot be instantiated:

W/System.err: java.lang.Instantiationexception: class com.android.Internal.telephony.Itelephony$Stub cannot be instantiated

Now by bindService:

    .
    . 
    .

    final ServiceConnection conexao = this;
    Class classeServico2 = ITelephony.class;

    boolean resultado = bindService(new Intent(MainActivity.this, classeServico2), conexao, Context.BIND_AUTO_CREATE);

And the bindService returns false.

  • Can you show the code you already tried? What error you had?

  • What exactly does your code do?! You can give some more detail?!

  • What I want to do is hide the call screen from android, IE, make a call Telefonica and do not appear the default call screen.

  • ITelephony$Stub is an abstract class. Therefore, it cannot be instantiated directly. Only through subclasses.

  • And you have the ability to access the function I want?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.