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);
                        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. a plea for a market change!

The market app in 1.6 sure does look spiffy but you guys missed
something huge.  Please for the love of god add a filter by developer
type.  I know I am not the only person who is sick of developers like
M STAR LLC who spam the market daily with 20+ 'updates'   We all know
they haven't changed their code and only update the version number for
the purpose of getting moved up to the top of the list.  I am sick of
this crap, who agrees?

2. HttpConnection forWifi

Hi Friends....

I have written my HttpConnection code for Android.I have also set
Network preferences. Should I change the code so that it would be able
to work for Wifi?or I dont need any change.Does the same code work for
Wifi correctly?Here is my code:

public static String http_get(String urlParameters)
                    String msg = "",uid = "";
                    int ch;

                    url = url + urlParameters ;

                    int BUFFER_SIZE = 2000;
                    InputStream in = null;
                    try {
                        in = OpenHttpConnection(url);
                    } catch (IOException e1) {
                        // TODO Auto-generated catch block


                         InputStreamReader isr = new InputStreamReader
                         int charRead;
                           String str = "";
                           char[] inputBuffer = new char
                         try {
                             while ((charRead =
                                 //---convert the chars to a String---
                                 String readString =
0, charRead);
                                 str += readString;
                                 inputBuffer = new char[BUFFER_SIZE];
                         } catch (IOException e) {
                             // TODO Auto-generated catch block



                                    uid = str.substring(2);




                    catch (Exception e)
                              msg = e.toString();
                    return uid;

  public static String postData(String user,String file, String

              // Create a new HttpClient and Post Header
              HttpClient httpclient = new DefaultHttpClient();
              HttpPost httppost = new HttpPost(url+file);
              String result="";

          try {
               // Add your data
               List<NameValuePair> nameValuePairs = new
               nameValuePairs.add(new BasicNameValuePair("sID",
               nameValuePairs.add(new BasicNameValuePair("content",
               httppost.setEntity(new UrlEncodedFormEntity

               // Execute HTTP Post Request
               HttpResponse response = httpclient.execute(httppost);

               InputStream is = response.getEntity().getContent();
               BufferedInputStream bis = new BufferedInputStream(is);
               ByteArrayBuffer baf = new ByteArrayBuffer(20);

                int current = 0;
                while((current = != -1){
                  Log.d("GETANDPOST",new String(baf.toByteArray()));
                  result=new String(baf.toByteArray());
               /* Convert the Bytes read to a String. */
          //     text = new String(baf.toByteArray());
             //  tv.setText(text);

          } catch (ClientProtocolException e) {
               // TODO Auto-generated catch block
          } catch (IOException e) {
               // TODO Auto-generated catch block
          return result;

public String SetPreference() {
        NetworkInfo info=connMgr.getActiveNetworkInfo();
                   return (connMgr.getActiveNetworkInfo().getTypeName


3. How to compile a module to Android Dev Phone 1

4. How to connect through HttpConnection using WiFi for Android?

5. Setting Drawable/ClipDrawable level from XML

6. Free, OpenSource Android project for all: AnCal

7. Strange Exception