Search code examples
javaandroidtelephonytelephonymanager

Where to copy ITelephony.java in android studio and how to import it? Please don't close this without answering


I have looked at other SO questions similar to mine. But i could not find any help. I have copied ITelephony.java to com/android/internal/telephony. when i tried to use the same it says "Cannot resolve symbol ITelephony".

private ITelephony telephonyService;

Can any one please point me in the right direction. Any help will be appreciated.


Solution

  • Create a package under java folder

    com.android.internal.telephony
    

    and then copy ITelephone interface in that package

    package com.android.internal.telephony;
    
    
    public interface ITelephony {
    
        boolean endCall();
    
        void answerRingingCall();
    
        void silenceRinger();
    }