thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

MessageProvider for third-party apps

Open piaci opened this issue 4 years ago • 8 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same feature request.
  • [X] I will describe the problem with as much detail as possible.
  • [X] This issue only contains a request for one single feature, not multiple (related) features.

App version

5.912

Problem you are trying to solve

After removing BroacastReceiver, the whole third-party integration is gone with the mentioned release. My app (an android launcher) used these methods to get notified whenever a mail arrived or deleted.

Suggested solution

I do understand the concern to let the user know if an app requested these permissions. Don't know if there's an option to create custom runtime permission, but would be welcome. Especially as I have found some roms (mainly android 11 and 12) where the system simply ignores these permmissions stated in the manifest and had to be granted through adb.

Screenshots / Drawings / Technical details

No response

piaci avatar Feb 23 '22 18:02 piaci

Please try to describe the problem you're trying to solve, not the solution you believe will solve the problem (or has solved the problem in the past). Please also keep in mind that things that might be obvious to you, aren't obvious to others. I, for example, don't know why a launcher would need to get notified when an email app has received a new message. Can you explain what your launcher is doing with that information?

cketti avatar Feb 23 '22 22:02 cketti

right. the problem is the third-party integration is gone. the app is kind of an aggregator, collects the user's information on the screen, grouping them in a way that all are at hand. information like mail, sms, messages, rss etc. as of the new version user cannot get this information (it's by choice, not a default behavior). many other mail apps are integrated but k9 (and a few more) give the option the get the info through the mail app itself, which would be the preferred way as it's the cleanest.

piaci avatar Feb 28 '22 20:02 piaci

any news on this?

piaci avatar Mar 24 '22 20:03 piaci

You were very vague. Exactly what information do you want K-9 Mail to expose?

cketti avatar Mar 24 '22 20:03 cketti

sender, date, subject, preview, unread. that was all the needed and worked fine with the previous broadcastreceiver and the current contentobserver. but in the beta they're all gone. any solution would be welcome . I'm not sure what else you're expecting to hear.

piaci avatar Mar 24 '22 20:03 piaci

Please pretend MessageProvider does not exist. It is now an implementation detail. Right now there is no interface for third-party apps. If you want there to be one, you need to tell us what data you want to have access to. There is no point in adding support for accessing arbitrary messages if all you wanted was e.g. accessing the unread count of a particular account.

K-9 Mail is an app that supports multiple accounts and a special folder called Unified Inbox. MessageProvider only allowed accessing the message list of the Unified Inbox. Is that what you want? Or do you want to have access to the list of accounts, list of folders in those accounts, to messages in particular folders, to message contents besides sender, date, subject, and preview?

cketti avatar Mar 24 '22 21:03 cketti

no, not only a badge counter or similar. checking content://com.fsck.k9.messageprovider/inbox_messages when changed then show the unread messages with account name, sender, date, subject, preview in a list view. clicking on an item opens the k9 app at the given message.

here you can see a few images about it. there is no mail screen shot, but you'll get the idea. this is a decade old version of the upcoming app. listener launcher

piaci avatar Mar 24 '22 22:03 piaci

do you need any additional information on this?

piaci avatar Apr 26 '22 23:04 piaci