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.
(also there's the general problem of devices "helpfully" listening all the time for magic phrases like "Hey Siri" or "OK Google")