Hi,
I have implemented the application to send and receive calls.
I am making a call by an intent.
If we keep some data in this intent shall we receive at receiver side?
I am doing this but i got the null.
Where iam wrong my code is

for making call
 String phoneNumber="5554";  //here i used to emulators for testing
        Uri uri=Uri.fromParts("tel", phoneNumber,null);
        Intent callIntent=new Intent(Intent.ACTION_CALL,uri);
        //callIntent.putExtra("key", "My phone data");
        Intent data=new Intent(Intent.ACTION_SEND);
        data.putExtra("kay","this is my data");
        callIntent.putExtra(Intent.EXTRA_INTENT,data);
        callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(callIntent);

on receiver side
public void onReceive(Context context, Intent intent) {

    // TODO Auto-generated method stub


    String data=intent.getStringExtra(key);

      if(data==null)
          Log.d("ur data","u received null;
      else
          Log.d("data",data);
      }
}
In the above case my receiver is invoking upon a incoming call but i didn't
get the data.
Please help me

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to