Re: [android-developers] Call Duration tracking

2013-04-22 Thread Asheesh Arya
http://stackoverflow.com/questions/4422410/how-to-implement-a-contentobserver-for-call-logs


On Tue, Apr 9, 2013 at 7:42 PM, samramub...@gmail.com wrote:

 Can any one tell me,is there any method to get call duration when any call
 ended up ??
 actually i want to save call duration into the data base when it is ended
 up!!

 Kindly do reply ,thanx in advance :)

  --
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Thanks  Regards
 ASHEESH ARYA
 +919990503567

-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] call duration...?

2012-01-08 Thread Abhilash baddam
Hi,

I am calling a phone number through intent..like

Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(tel:123456));
startActivityForResult(intent, 1);

how can i find the call duration means whenever the person has been
answered the call and whenever he dropped the call... for that i tried
like this...but i can be able to find out the when the person ended
the call but i cannot be able to find out the time whenever the call
has been answered.

   @Override
public void onCallStateChanged(int state, String incomingNumber) {
super.onCallStateChanged(state, incomingNumber);

// Don't fire before the call was made
if (state == TelephonyManager.CALL_STATE_OFFHOOK)
{
called = true;
dialled = true;
long startTime = System.currentTimeMillis();
Date date = new Date(startTime);
Toast.makeText(UITestActivity.this,Call Connected: +
date.toString(), Toast.LENGTH_SHORT).show();
}   

  if(state == TelephonyManager.CALL_STATE_RINGING){

Toast.makeText(UITestActivity.this, RINGING , Toast.LENGTH_SHORT).show();
}

// Call has ended -- now bring the activity back to front
if (called  state == TelephonyManager.CALL_STATE_IDLE) {
called = false;
System.out.println(DROPPED THE CALL);
mTelMgr.listen(this, PhoneStateListener.LISTEN_NONE);
long endtime = System.currentTimeMillis();
Date date = new Date(endtime);
   Toast.makeText(UITestActivity.this,Call Disconnected:
+ date.toString(), Toast.LENGTH_SHORT).show();
startActivity(new Intent(UITestActivity.this, UITestActivity.class));
}
}



On 1/4/12, Abhilash baddam abhilash.androiddevelo...@gmail.com wrote:
 Hi narendra,

 I tried as per your suggestion thanks. But i was strucked  to find out
 whether the outgoing call has been answered.


 On 1/4/12, Narendra Bagade bagadenaren...@gmail.com wrote:
 refer related content provider like call log.

 On Wed, Jan 4, 2012 at 12:26 PM, Abhilash baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 Hi,

 I want to know the call duration, when I called to other number and
 when that call-ends. How can i get the call duration...?

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




 --
 Regards,
 Narendra
 .

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


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


Re: [android-developers] call duration...?

2012-01-04 Thread Abhilash baddam
Hi narendra,

I tried as per your suggestion thanks. But i was strucked  to find out
whether the outgoing call has been answered.


On 1/4/12, Narendra Bagade bagadenaren...@gmail.com wrote:
 refer related content provider like call log.

 On Wed, Jan 4, 2012 at 12:26 PM, Abhilash baddam 
 abhilash.androiddevelo...@gmail.com wrote:

 Hi,

 I want to know the call duration, when I called to other number and
 when that call-ends. How can i get the call duration...?

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




 --
 Regards,
 Narendra
 .

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

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


Re: [android-developers] call duration...?

2012-01-03 Thread Narendra Bagade
refer related content provider like call log.

On Wed, Jan 4, 2012 at 12:26 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com wrote:

 Hi,

 I want to know the call duration, when I called to other number and
 when that call-ends. How can i get the call duration...?

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




-- 
Regards,
Narendra
.

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