Is it possible to send some data while making a call

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Is it possible to send some data while making a call

Postby saikiran » Mon Feb 01, 2010 8:46 am

Hi
In android we can make a call by using the intent.
We can use the intents to send data between activities.
My question is shall we send some data in the intent while making a call?
I have implemented some application to make a call as well as to receive call through code
I am able to invoke my receiver on a incoming call.
But i didn't got the data what i kept in the sender side
making acall
String phoneNumber="5554";
Uri uri=Uri.fromParts("tel", phoneNumber,null);
Intent callIntent=new Intent(Intent.ACTION_CALL,uri);
callIntent.putExtra("key", "My phone data");
callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(callIntent);

On receiver side:
public class MyReceiver extends BroadcastReceiver {

@Override

public void onReceive(Context context, Intent intent) {
Log.d("debug","Receiver is invoked");
String data=intent.getStringExtra("key");
Log.d("data",data);
}
}

I made the necessary changes to manifest file.
My receiver is invoking but got the data as null
Please help me
Thanks in advance
Regards
saikiran
Regards
kirann
saikiran
Freshman
Freshman
 
Posts: 4
Joined: Wed Jan 27, 2010 7:26 am
Location: India

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests