Extending Android's Default Gmail/Email Applications

断了今生、忘了曾经 提交于 2019-12-06 04:57:38

问题


I would like to extend the Android platform's default Gmail/Email applications either by plugging into their ContentProvider or by using intent filters. Essentially, I want to be able to scan incoming emails for special rules that will trigger events in my Android application. If scanning emails automatically isn't possible, then I would at least like to add a menu item to the email viewer screen that would allow the user to flag the email content as needing to be scanned.

  1. Does the Gmail/Email applications allow you to extend them in this way?
  2. For future reference, besides finding sample code or reading documentation provided by the author of an application, is there a standard way of finding out what intents are available for my application to use? Like a tool maybe?

Thanks, Marc


回答1:


Does the Gmail/Email applications allow you to extend them in this way?

Gmail is closed source, and so it is difficult to know what it does or does not support.

The Email application is not part of the public SDK, so trying to rely upon any ContentProvider it may have (and I don't know that it has one) would be a mistake, as your application is liable to break with subsequent Android updates.

I would at least like to add a menu item to the email viewer screen that would allow the user to flag the email content as needing to be scanned.

The only way to do that assumes Gmail/Email uses Menu#addIntentOptions(), and via Google Code Search, this does not appear to be the case.

You might consider contacting the developers of K9 to see if you could hook into their Android email application.

is there a standard way of finding out what intents are available for my application to use? Like a tool maybe?

Not really. Intent actions are just strings.



来源:https://stackoverflow.com/questions/926770/extending-androids-default-gmail-email-applications

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!