How to build app for flagging emails in iPhone? - iphone

Unfortunately, the iPhone cannot flag email messages for followups as it does in Outlook or Gmail. Everywhere I search, people are griping about this with no solution except for moving emails in a 'follow up folder', which is lame because I use flags on my PC with great ease. I am using Exchange to access my email and know flagging works on Windows, Treo, and some other phones. Still no email flagging in the upcoming iOS 4.3 either.
My question is if it is possible to modify the built in mail app in iPhone to give capability for flagging email messages? I'm sure this would require jailbreaking which I'm ok with. If it is not possible, what about creating a stand alone app that simply views emails with an option to flag them? Any help would be greatly appreciated.

The only options you have to get this feature are
build your own mail client for the iPhone. There is a really nice (but not up-to-date) mail framework in Objective-c called MailCore and a pretty good C framework called libEtPan
hope that Apple will support it in a new iOS version release

Have a look at the sql database for the MobileMail.app account in this folder:
/User/Library/Mail/IMAP-emailaddress#imapserver/
Edit it directly with SQLite.

The iPhone's mail application doesn't come with an extensions framework, so there's no straightforward way to modify its functionality. If you really have your heart set on this feature, the only option you really have is to jailbreak and write your own mail client. That wouldn't be a simple exercise, especially if you need Microsoft Exchange integration.
The way I would deal with this is to use the Gmail web interface, which lets you star messages. You can set up your exchange account to forward messages to Gmail, and then you'd use Gmail as your primary mail provider.
Both these solutions sound really clumsy, so I think you might have to give up on flagging messages.

Related

Messaging service within my app

I need to implement a message service into my app that works exactly like this:
users register with a nickname within the app
they can add contacts (just nicknames) and send them a message by just specifying their nickname
they can send a message whenever they want, and the message is stored on a server until when the receiver connects to internet.
when a message is received, a push notification is triggered.
So, the messages work pretty much like emails, however instead of using email addresses, we only use usernames. I'm also going to build my own back-end for it.
Which APIs should I use or which 3rd party framework can I use ?
And any tip ?
N.B. I need to make it work with iOS 3.0 as well.
and in the future I will develop an Android app, so the nicknames should be unique and I should be able to send messages from iPhone to Android devices within the same app.
thanks
I've successfully used the Three20 library and would recommend giving it a try. It's an open source spin-off originated by the author of the Facebook app. It features a bunch of additional GUI components that might be useful to your project, like a message composer that resembles the one used by Apple's email app.
Also, Three20 features a nice framework for handling navigation within your app. Currently, the biggest drawback seems to be that certain features don't play well with the iPad API.
The answer seems to be Push Notifications

Import contacts from outlook to iphone programmatically

I want to know if it is possible to import contacts from outlook to iPhone through code. I want to implement a sync functionality in which a user can import contacts from their Outlook into their iPhones. If so then what approach has to be followed.
There are two modes of sync.
Through iTunes and the desktop. To my knowledge, I dont think its possible programmatically to invoke iTunes and make it sync, as it rightly should be. So, there is not much left to do there.
If you are looking to sync with an existing MS Exchange server account, then there are not many choices out there but to implement the way this answer seems to point out.
However, if you are bit lucky, you might be able to get it to work with a bit of poking
-around with IMAP. There are are a few libraries out there that you could possibly repurpose. Unfortunately, there are no straight forward solutions, that atleast i kno of, for achieving this as yet and this could possibly be the easiest route. One such lib is : Remail. Another point to remember is that some c libs may also support iphone/cocoa and its not a bad idea to watch out for some of them.
Good luck.
Things are going to be different depending on which version of outlook you are using and the email server that it is connecting to. I am assuming that you are not connecting to an exchange server and that you dont want to use iTunes so your best bet to get the contacts to an iPhone is going to be a desktop app that connects to a webservice that will then sync with an iPhone app that can dump the contacts into an address book. You will have to write an exporter for your version of outlook (2003, 2007, 2010, 2011 are all still widely used) so it may just be easier to have your user open a gmail account and then use it to push the contacts to the phone.
It may seem convoluted and but the only official ways to sync your contacts are going to be through iTunes, icloud, active sync or google sync. I may just be having trouble understanding why you are trying to reinvent the wheel here so perhaps you could explain more of what you are trying to do here.

Plug In To Other Applications (iPhone SDK)

I'm pretty sure that due to the Application Sandbox, none of this is possible, but...
I am working on an application that operates on text that the user inputs. Aside from forcing the user to copy and paste from another application or type in text, what other options exist for getting text? To be more specific:
Is there any way to get the user to "pass" an email to my app? I can imagine a hacky solution where I have the user mail it to a server on the Net, and then I expose the mail from a server-side application, but I'd like something a bit more direct.
Is there any way to get to the user's mail inbox without asking them to put in their credentials?
Is there any way to plug-in to Safari, so that I can send web pages "over" to the app? I don't mean a full plugin, which I know is impossible.
I'm trying to think of creative ways to solve this problem of how to get text into my app, so any ideas would help.
From the Iphone SDK Forum: "Apps can't read each others files - but you could use a URL scheme to launch one app from another. Any parameters in the URL would be passed."
It's what my gut was telling me, but i wanted to go verify before saying..officially, no. The Sandbox isolates each program..
You can pass via URL text strings, but that's about it. I haven't seen any app which hacks around this limitation, but that just may be none of them surviving the app submission process.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/21099-sharing-data-between-applications.html

Get content of SMS and email in iPhone?

I'm trying to implement an app that can read received SMS and email out. I mean convert the text content to voice. So I need to access to SMS and email first. As far as I know, there is no such API provided in the default SDK. Is there any other way to realize it?
Are the SMS messages stored in database(sms.db)? How to access to them? Is it only possible on jailbroken iphones?
And what about emails? Are they only stored in mail servers? How can I get them in my app?
Sorry for asking so many questions. I have spent many days on this problem, but havn't found any solutions...
You can't. According to the Device Features Programming Guide: Sending an SMS Message:
In iPhone OS 4.0 and later, you can send text messages from within your application. This feature is strictly for sending messages. Incoming SMS messages go to the built-in Messages app.
There are serious privacy and security concerns with enabling app access to emails and SMS, and I am glad Apple choose not to do it.
Yes, you can, (at least with SMS) but only in a jailbreak app (which you suggest is ok in your comments).
The sms.db file can be read by apps that aren't sandboxed.
See my answer to a similar question for how to get SMS content. That answer just shows how to get the most recent SMS, but if you just use the commented out while loop, you can iterate through all SMS.

iPhone gui message from perl/shell-script possible?

I want to write a perlscript on my iPhone that is able to give me a heads up at certain points so I'm wondering how I would go about doing that.
Is there a way to get a message through the gui from a script running in the background? I've been looking without much luck. I had a thought about inserting a fake sms into the sqlite db as a last resort but it seems somewhat unlikely that it would work.
It would be nice to be able to make a push notification style popup appear but that might too much to ask.
Any ideas?
For reasons of security and stability, Apple does not allow scripting languages on the iPhone. You can run them on a jailbroken phone but I'm given to understand it's a hassle.
From the Apple Push Notification Programming Guide:
Note: On a desktop system, a
background process is often the means
whereby users are informed of
downloadable data for an application
that currently isn’t running. But on a
device such as the iPhone, background
applications are, for performance and
security reasons, prohibited. Only one
application may be executing at a
time.
The iPhone is a secure and reliable phone first and a computer second. Computing is sacrificed to ensure a reliable phone.
I found a solution I liked so I decided to share it. I found an app for jailbroken iPhones called GriP - Growl for iPhone. Which changes the way push notifications and other messages are handled. It also makes it possible to send messages from the command line via something along the lines of:
/usr/bin/GriP -t "Title" -d "Description"
It has worked great so far.
Thank you for your help TechZen and molecules.
Do you want information from your phone itself or from an outside source? If you want information from an outside source, you could set up a Perl script on a computer to e-mail yourself notifications (see Sending Email with Perl Best Practice).