ACTION_CALL how to get the called time in Activity Result

by GPU » Fri, 20 Feb 2009 13:21:52 GMT


Sponsored Links
 Hi ,
 I want to get the last call time.I am starting the activity for
result like this

                       Intent intent = new Intent(Intent.ACTION_CALL);
                        intent.setData(Uri.parse("tel://988"));
                        startActivityForResult(intent, REQUEST_CODE);

After i end the call i am getting the  resultcode = RESULT_CANCELED

So How to get the call time after the call is ended

If its not by the activty resul directly,what is the contect Uri for
the call log?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. setChoiceMode(), getSelectedItemPosition() & inconsistent behaviour

Your explanation is not exactly right. ListView does not focus its
children, it selects them. When the system enters touch mode (when the
user touches the screen), the selection disappear.


This is not the proper way to do it. The menu should NOT contain
contextual items; the menu should NOT contain items which depend on
the selection state of a ListView. Contextual menus must be tied to
long presses on the ListView. The menu (activated by the menu key) is
a global menu meant for activity level actions only.






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~

2. setChoiceMode(), getSelectedItemPosition() & inconsistent behaviour

Ok, in case anyone faces this, here's a way to go:
--
Relying on the selectedItemPosition on a ListView can be a dangerous
approach. In my experience if the List loses focus (by clicking
something else) the selectedItemPosition gets set to INVALID_POSITION.

Basically if your item doesn't have that orange 'highlighted' look to
it, count on the selectedItemPosition being null.

As an alternative you may want to remember the selected item by
overriding the onItemClick and onItemSelection methods and saving the
selected item's index, then use that to control your menu option
availability.
--
Source: 
http://stackoverflow.com/questions/569830/strange-listview-selection-behavior-on-android/



--~--~---------~--~----~------------~-------~--~----~

3. USB Keyboard and mouse configuration help needed in android

4. x86- what to provide instead of /dev/block/sdb2 when running in Virtual Box?

5. x86- what to provide instead of /dev/block/sdb2 when running in Virtual Box?

6. Where can I put some media files(image or video) into emulator or real device

7. Activity and Services