views:

574

answers:

4

I tried to make an Android program where I can call a single number by clicking button. Works fine but as I end calling, the emulator shows call log. Instead of this I would that my program returns to the screen where is that calling button I made. How can I do this? My code is now like this

((Button) findViewById(R.id.soita)).setOnClickListener(
      new Button.OnClickListener() {
       @Override public void onClick(View arg0) {
String nro="9999999";
Intent intent1 = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+nro));
startActivity(intent1);
Intent intent2 = new Intent(Intent.CATEGORY_HOME);
startActivity(intent2);
A: 

I think I need to use the method onCallStateChanged. But where can I add the code there is only one line which starts an activity?

Jaska
Found it. One has to edit the InCallScreen.java.
Jaska
but you have to rebuild the Rom then?
Donal Rafferty
A: 

I'm trying to find solution for this problem too... :( Did you find something to solve this?

cikabole
A: 

Where can I find that InCallScreen.java file? Can you explain that?

Thanks in advice!

cikabole
A: 

use my app NotCallLog! Its in the market

roger l