Missed Call Count in Android
<p>I want to count the numbers of missed calls which i received. But it does not return number of missed calls. Thanks for your help in advance...</p>

<pre><code>String[] strFields = {
                    android.provider.CallLog.Calls.NUMBER, 
                    android.provider.CallLog.Calls.TYPE,
                    };
            String strOrder = android.provider.CallLog.Calls.DATE + " DESC"; 

            Cursor mCallCursor = getContentResolver().query(
                    android.provider.CallLog.Calls.CONTENT_URI,
                    strFields,
                    null,
                    null,
                    strOrder
                    );
            int missed=0;
            if(mCallCursor.moveToFirst()){
                do{
                    if(mCallCursor.getString(mCallCursor.getColumnIndex(mCallCursor.getColumnName(1)))=="missed"){
                        missed++;
                    }
                }while(mCallCursor.moveToNext());
            }
            mCallCursor.deactivate();
</code></pre>
