The legal framework is actually already mostly in place due to laws detailing the necessary consent to record a telephone conversation. So it might not take much to extend that concept to applications on a phone other than the actual phone app.