i want to know if there is any way to pass a string from an activity to a class which extends phoneStatelistener.
in sending end, i used
Intent pass = new Intent(ListActivity.this,CallHelper.class);
pass.putExtra("name", name);
and in the receiving end..
public class CallHelper {
private class CallStateListener extends PhoneStateListener {
int flag;
@Override
public void onCallStateChanged(int state, String incomingNumber) {
String name = getintent().getStringExtra();
}
but it showing error in getintent() part, is there any alternate way?