Difference between revisions of "DW Missed call notification cleaner patch"

From DW Wiki
Jump to navigation Jump to search
(Created page with "If prompted patch was not successful. Please try the following steps. #[http://www.dw-p.net/dl/DW-Missed-calls-notification-cleaner.apk Download the file to your phone.] #Copy...")
 
 
Line 6: Line 6:
 
Now the system application manager should be able to see "DW Missed calls notification cleaner".
 
Now the system application manager should be able to see "DW Missed calls notification cleaner".
 
You can now try it. When DW Contact attempt to clear the missed call notification, you should see an alert dialog box.
 
You can now try it. When DW Contact attempt to clear the missed call notification, you should see an alert dialog box.
 +
==Use it in your application==
 +
;Clear missed call notification
 +
<pre>
 +
Intent cmc = new Intent("com.dw.intent.action.CLEAR_MISSED_CALL");
 +
startActivity(cmc);
 +
</pre>
 +
;Getting results
 +
<pre>
 +
    public void clearMissedCallsNotification(long id) {
 +
        Intent cmc = new Intent("com.dw.intent.action.CLEAR_MISSED_CALL");
 +
        cmc.putExtra("CALL_LOG_ID", id);// You can carry custom data
 +
        startActivityForResult(cmc, RC_CLEAR_MISSED_CALL);
 +
    }
 +
 +
    public void onActivityResult(int requestCode, int resultCode,  Intent intent) {
 +
 +
        if (RC_CLEAR_MISSED_CALL == requestCode) {
 +
            if (resultCode == Activity.RESULT_OK) {
 +
                return;
 +
            }
 +
            long id = 0;
 +
            if (intent != null) {
 +
                id = intent.getLongExtra("CALL_LOG_ID", 0);// Get back custom data
 +
                tryClearMissedCallsNotification(id);
 +
            }
 +
            return;
 +
        }
 +
        super.onActivityResult(requestCode, resultCode, intent);
 +
    }
 +
</pre>

Latest revision as of 07:48, 27 November 2014

If prompted patch was not successful. Please try the following steps.

  1. Download the file to your phone.
  2. Copy it to the directory where the system software. Should be the stock Contacts app in the same directory. Maybe "/system/priv-app/" or "/system/app/".
  3. Then change the mode of FILE to 644. (Modify file permissions, so any user can read it)
  4. Restart the phone.

Now the system application manager should be able to see "DW Missed calls notification cleaner". You can now try it. When DW Contact attempt to clear the missed call notification, you should see an alert dialog box.

Use it in your application

Clear missed call notification
Intent cmc = new Intent("com.dw.intent.action.CLEAR_MISSED_CALL");
startActivity(cmc);
Getting results
    public void clearMissedCallsNotification(long id) {
        Intent cmc = new Intent("com.dw.intent.action.CLEAR_MISSED_CALL");
        cmc.putExtra("CALL_LOG_ID", id);// You can carry custom data
        startActivityForResult(cmc, RC_CLEAR_MISSED_CALL);
    }

    public void onActivityResult(int requestCode, int resultCode,  Intent intent) {

        if (RC_CLEAR_MISSED_CALL == requestCode) {
            if (resultCode == Activity.RESULT_OK) {
                return;
            }
            long id = 0;
            if (intent != null) {
                id = intent.getLongExtra("CALL_LOG_ID", 0);// Get back custom data
                tryClearMissedCallsNotification(id);
            }
            return;
        }
        super.onActivityResult(requestCode, resultCode, intent);
    }