Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Android source code
    primarykey
    data
    text
    <p>I am developing one application for that I made some changes in CallCard.java class of Phone application. You can find this class here <code>&lt;http://www.netmite.com/android/mydroid/packages/apps/Phone/src/com/android/phone/CallCard.java&gt;</code>. In the above class there are some cases. i.e BUSY, NUMBER_UNREACHABLE and POWER_OFF etc. In the case of POWER_OFF I called a method of a below class.</p> <pre><code>public class MyClass extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); System.out.println("**inside myclass"); } public void powerOff(Context c){ System.out.println("**inside powerOff"); Intent call = new Intent(Intent.ACTION_DIAL,Uri.parse("tel:+5555")); startActivity(call); } } </code></pre> <p>This is my own class and added into source directory Phone application. The code is like this:</p> <pre><code>case POWER_OFF: resID = R.string.callFailed_powerOff; MyClass myClass = new MyClass(); if(myClass != null){ System.out.println("**not null"); myClass.powerOff(getContext); } break; </code></pre> <p>The reason to do this is, I want to Call other number of same person when first-dialed number is switched_off(currentl hard-coded number). I think this is only one way to this.!! Finaly I started build the code but got some error. i.e 'Cannot find symbol'</p> <pre><code>Symbol: variable getContext Location: com.android.phone. myClass.powerOff(getContext); ^ </code></pre> <p>Is my way correct? and why this error. plz help me</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload