I’d like to be able to intercept outgoing messages and check whether or not an attachment exists on the message. If one does exist, I’d like to be able to replace that attachment, the goal being to encrypt the outgoing attachment(s) for the recipient.
I’ve looked into using ContentObserver, but this does not appear to give me control over content, nor a way to “intercept” the message before it is sent.
Does anybody know of a way this can be done or have any leads I can look into?
You have to write your own email client on Android for that. Due to security reasons you can’t intercept an outgoing Email and modify it.