开发者

stop outgoing gmail emails from android

Is it possible to intercept outgoing emails from Android? I have tried with content provider by using ContentObserver but still no luck.

this is my code.

开发者_StackOverflow    final String AUTHORITY_PLUS_MESSAGES = "content://gmail-ls/messages/";

    String[] gmailAccounts = getGmailAccount(this.getApplicationContext());
    String firstEmailAddress = gmailAccounts[0];

    Handler handler = new Handler();
    ContentResolver resolver = getContentResolver();
    ContentObserver observer = new GmailObserver(handler, resolver, firstEmailAddress);

    Uri uri = Uri.parse(AUTHORITY_PLUS_MESSAGES + firstEmailAddress + "/");
    resolver.registerContentObserver(uri, Boolean.TRUE, observer);


class GmailObserver extends ContentObserver {

 public void onChange(final boolean bSelfChange) {
        super.onChange(bSelfChange);
      Log.d(TAG, "***** onChange");
      // here I am getting lots of calls but not sure how to deal with outgoing messages ..
 }
}


Is it possible to intercept outgoing emails from Android?

No, sorry.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜