Introduction
I have a xy-problem
x: High level goal
I have dream: I want to store additional data to mails which are in IMAP. I the long run I want to be able to access this data via thunderbird and k9 (android app (mail use agent)).
Use cases:
I want to store a note in html format for this mail.
Upload a PDF file for this mail.
I want to store a re-submission date on the mail. Like google inbox snooze feature: Move the mail to a "do later" folder until the date is reached. (Evaluating this date and moving the mail to inbox again is not part of this question)
But I have no clue how to store additional data
y: My current thoughts about solving it
I need a way to identify a message in IMAP. I think the message id (without folder name) should work. I know that message IDs can have duplicates, but I see no other way. Please leave a comment, if you have a better idea.
Now I need a way to store this mapping somewhere:
`user#imapserver:message-id` --> `additional-data`
Question
How to store this mapping, so that thunderbird and k9 could access it?
Of course I know that thunderbird and k9 can't access this data today. How to patch them is a different question.
Background
I like free software and I like free communication. Up to now I use WhatsApp, Threema and other tools. But in the long run I want a free (like in software) solution. Email is wide spread, and I think it makes more sense to improve email than to create something new.
You could store annotations in a parallel mailbox as MIME messages using APPEND. You'd have to figure out a way to map annotations from one message to another.
So you can find the related message easily, you'll want it easy to search for. You could do something like using the message-id of the source message as the subject of the annotation message, or a transformation of the message id as the message id of the destination message.
Here are my thoughts on it... here is the current proposed and accepted standard for IMAP4 which is the current version...
https://www.rfc-editor.org/rfc/rfc3501
Here is a wiki link to show the previous versions and the progress that has been made over time ...
https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol#IMAP4
I think the question is a good one, but maybe if your idea is good enough, contact the people that are in charge of the protocol and think about ways to potentially make IMAP5 with the kinds of functionality that you want to expand it to be able to utilize...
I would say that the best way would be to try making the IMAP protocol better. Read over all of the functionality that it currently supports and make suggestions to the group in charge of it. The additions that you are wanting to add sound great, but unless I misunderstood the question, I think that protocol updates might be the cleanest approach.
Sounds cool though.
Good luck... I hope you like my thoughts.
Have you considered Mailgun? It has an extensive API ( https://documentation.mailgun.com/api_reference.html#api-reference). Incoming messages can be stored, processed by your application and then sent via email. I believe you can add your own header field information (perhaps generating something like a GUID and using it for unique message tracking). Up to 10,000 emails/month are free (one of your preferences). If your application workflow and the API align, this might help get the job done.
Related
I am currently using api.ai , to create agent to perform specific tasks, but one question i don't have answer to is , can i make it learn something while chatting , mean that i speak my name is 'John Cena' and she should store it and then whenever i ask her again bot should answer me that. i know there is a way to do it by logging into api.ai web and manually add entries , but it will not help, is there any work around programmatically or automatically ? the file i've been using to practice is given in github . and here is working DEMO
You basically need for your bot to "learn" facts. There are many different ways to achieve this, but recently the most common way is to arrange knowledge into Semantic "Triples" and store the knowledge into a Graph repository (like Neo4j, Titan, Spark Graph, etc). In your example, "my name is John Cena" would translate into a Triple like ("anubava","Name","John Cena"). That way, the next time you are logged in as anubhava and ask "What is my name?", it would translate into a Graph search that will return "John Cena". A word of caution, achieving this is not trivial and would require some significant amount of fine tuning. For more info, you can check here and here.
Finally, most complete solutions (that I know of), are Server Side solutions. If you want for the whole knowledge base to reside in your mobile device, you could probably use the resources there as inspiration, and build your own Linked Data repository using an embedded database.
Hope this helps. Good luck.
To store and recall the user's name, you'll need to set up a webhook with some basic data persistence capabilities. Any database or key-value store would work fine.
Here's the breakdown:
Implement webhook fulfillment for the intent that captures the user's name. The webhook should store the name along with a unique, identifying ID that you should supply from your front-end in either the sessionId or as a context parameter in your call to /query.
Implement webhook fulfillment for the intent that reads the user's name. The webhook should look up the name by ID and return a response that tells the user their name.
The high-level docs for writing a fulfillment webhook are here:
https://docs.api.ai/docs/webhook
I have always wanted to be able to have my users send feedback to my email address. Not a problem when using 'createChooser()' with ACTION_SEND type within an Intent. This may lead to a few very rare errors where there is not an application on the user's device to handle that Intent.
My question is: Is it possible to send an anonymous "from" to my developer email account so the User's email will not be required? I know basic HTML, and am wondering if this is possible with a 'form' in a 'WebView' (preferably less complicated) I Do not have a web server or access to one, and am only an individual developer, so that may throw that out of question.
Any insight is greatly appreciated, thank you for reading.
I don't think there is a reasonably easy way to do this with Intents. The best way I can see is have a couple of EditTexts for the message and maybe a title, and then a send Button at the bottom, then sending programmatically with a java class.
See this link for some info on how to do the actual sending part: http://www.developerfusion.com/code/1975/sending-email-using-smtp-and-java/
It's fairly straightforward.
The situation: I have many real life locations with specific information associated with them, and updated frequently. I am unsure of how to store this information for use in an android application.
My original thought was storing the data on some server/cloud source/database, reading from the server from each Activity in the app to make sure the info is up to date, and update the server with any changes that may or may not have been made.
For example: there are 200 people inside the library, one person leaves.
So we would read the number of people from the server, display this on the app, person leaves, subtract one, send the new number back to the server.
Would this be an incorrect approach? I'm fairly new to Android in general, and I really have no experience on how to approach this type of situation, what services to use, etc.
I would look into using Parse, its a pretty sweet way to power the backend, and their website is very detailed in explaining how to use it.
I am pretty new to the mobile end of development so forgive my naivety.
I would like to know if it's possible to have a structure/distribution model like the following:
Master App (has many "middle-man" instances)
!
!
Middle-man ( can customize data, look & feel, via web app and redistribute)
(has many end user viewers)
!
!
!
End User viewers( can download and install middle-man abc's app with middle-man's custom info)
Is this possible? I have searched around for quite a bit but perhaps I am searching the wrong terms?
I was thinking perhaps a couple options, let me know if it's sounds wrong.
Option 1 - Middle-man provides a special key code and end user types it in after installing the app to unlock it thereby storing the unique middle-man ID and displaying only their custom info. User only needs to enter code once. relation is stored in mysql perhaps??
Option 2 - create a build of the master template for each middle-man and provide the binary/install link along with a customized ini file to load correct ID? Or something to that effect.
Any better options out there? Something that allows for upgrades/new features to be passed down to all the instances easily.
Will this type of thing have any problems with the apple store if multiple middle men decide they want it on the app store?
Maybe I'm making it more complex than needed and could just use a simple "require login" for each end-user and the end user is tied to that middle man some how?
\The app could also be android app depending on middle-man requirements
Thanks in advance for any advice or links to helpful info.
If i had understood your question right, its a straight forward mobile app tied up with the backend.
User credentials for the middleman which shall associate with your
special key code.
Associate your actors(users) with roles and permission over accessing
content in the backend.
Your mobile app will pull the content only associated for the logged
in user.
Apart from this, you can store the content for offline etc.. Take phonegap approach and it pretty much does what you wanted to do.
I was wondering if it is possible to hook into the gmail and email
applications and check to see if it contains text that matches a
regular expression, and if it does, make that text into a link with a
URI that would open my application. What i am thinking of is similar
to how the gmail application can detect a web address or phone number
and make it a link. Is something like this possible?
The Gmail app is closed source and you only have the hooks they give you. AFAIK regular-expression-to-hyperlink-conversion isn't one of them:
Extending Android's Default Gmail/Email Applications
Depending on what you're doing, you might be able to send mail through some kind of gateway which does this work on the message prior to delivery. So rather than emailing johndoe#gmail.com people could write to johndoe#example.com, and the work of translating phrases into URIs could be done at example.com then forwarded to gmail.com with links in place...
But people are link-savvy these days. You can make links plenty readable, for instance look at http://en.wikipedia.org/wiki/URL ...fairly obvious, no magic required and I can enter that even without Google's help.