Is it possible to prevent editing when MFMessageComposeViewController shows up?
'Cause I want the body of SMS can't be changed by user and I think it's still legal.
Please help!
No the user has final say when using the MFMessageComposeView.
Your app is also prohibited from changing the content/recipient/body of the email when the
view slides up.
If you could do this it would be easy to paste in a different recipient, sniff the content provided by the user etc. etc. (especially in the Message App, you could swap the phone number and do terrible things.).
I guess this is the logic behind, you get to pre-populate the message, but the user decides from there on and until "Cancel" or "Send".
You should probably build a web service where you have control over the data
when it hits the server and make an interface for that on the phone.
Related
I'm working on a SOS app that is supossed to send emails and/or sms when the user needs it to. This will happen using the contacts that the user added to the app. At the moment the user can add 4 of these contacts, regardles of the type (email/sms).
I'm already able to send sms OR emails using
await ChatMessageManager.ShowComposeSmsMessageAsync(chatMessage);
or
await EmailManager.ShowComposeNewEmailAsync(emailMessage);
The problem is doing both things, one after the other.
If I call both of this functions at the "same time", only one of them will show the respective page. Since OnNavigatedFrom and OnNavigatedTo events do not fire in these conditions, is there any other kind of event that fires when it comes back from the pages or some other way to wait until one of the pages is dismissed?
Thanks
Ok I've found the solution
Window.Current.VisibilityChanged
fires in this case. I'm able to figure out when the application is getting visible again and assume that the SMS was treated, launching the email at this stage.
I just start listening to the event before composing the SMS and release it when it comes back. It seem so simple now..
(Still don't know why OnNavigatedTo doesn't work)
Launch 2 SMS Compose tasks in Windows Phone 8.1 RT App pointed me in the right direction.
I use an MFMailComposeViewController in an app to make it easy for the user to send me support requests. However, I get a lot of emails with the default message (+ the user's signature), but without any additional info added. I'm guessing this is because a kid is using the device and they're just mashing buttons. Is there any way to detect this case and have it not send the email?
Unfortunately, this is not possible.
From the apple docs:
Important: The mail composition interface itself is not customizable
and must not be modified by your application. In addition, after
presenting the interface, your application is not allowed to make
further changes to the email content. The user may still edit the
content using the interface, but programmatic changes are ignored.
Thus, you must set the values of content fields before presenting the
interface.
I'm using an ABPersonViewController and I was wondering if it is possible to return to my application after making a phone call or sending an email/message instead of exiting to the respective native apps.
On the iPhone Contacts app, you can make a phone call by pressing the phone number field. Ending the call automatically takes you back to the contact screen. You can also send an email and message by clicking on the respective fields (though ending the email/message action does not take you back to the Contacts).
To be more specific, tapping on "mobile 1 (555) 555-5559" should make a phone call to that number (my app already does that). However, when I end the call, I would like to be directed back to my app and not the native iOS Phone app. I would like similar actions for sending an email and message too.
If this is possible, it would be great if someone could share the solution! Thanks for any help.
it is possible to return to my application after making a phone call or sending an email/message instead of exiting to the respective native apps.
AND
Ending the call automatically takes you back to the contact screen
In SHORT : It is not possible because Apple/iOS Does not Provide this type of Feature.
I just released an update to my app DreamFX Photo, and made it free. My problem is that I have an "email me" button for support, and I'm getting around 3 blank emails an hour from different people. Any thoughts if this is spam or some sort of bug?
haha, i have that issue as well.
I believe users are pressing on the support link, and then decide to cancel the email. by mistake they are clicking on the "Send" button, instead of the "Cancel".
either that, or they save the email as draft and then send it later on by mistake.
I support a very popular free app and we get tons of blank emails. We thought that it was a bug or a spam as well but after analyzing them and responding to all of them, we have come to the conclusion that there are 4 primary causes.
People tap the support link and then accidentally hit "send" instead of "cancel".
People are just tapping things randomly trying things out.
"Pocket emails". Similar to pocket dials, the phone becomes unlocked and unintended actions occur.
"Baby emails". We respond to each email, even the blank ones, and have found that often someone let their child play with the device and the child manages to send an email. This might even be our primary driver of blank emails. :)
I need to be able to give users the ability to call someone or email someone from a certain view in my navigation based app.
I thought I would use an action sheet with the choices and depending on the button pressed allow one or the other to be initiated (I'm simplifying a lot but ...).
I really have several questions.
Assuming this is possible to do, will my app be gone after a phone call is started?
Is there a way for me to launch/push on the stack the same "controller" and "view" that Apple uses for making calls and sending emails? Or am I going to have to code this all myself to look like their app?
I want the user to come back to the same page they were on when the email or phone call was initiated. How can I do that or is my app gone if I use their controller and nib?
Assuming it's possible to do either of these things, can I put the email address I want for a default in the to: field of the email view and if so how?
Here are the answers to your questions:
Assuming this is possible to do, will
my app be gone after a phone call is
started?
Yes.
Is there a way for me to launch/push
on the stack the same "controller"
and "view" that Apple uses for making
calls and sending emails? Or am I
going to have to code this all myself
to look like their app?
Yes. MFMailComposeViewController for Mail, and [[UIApplication sharedApplication] openURL:[NSURL URLWithString:telephoneText]] for a Call
I want the user to come back to the
same page they were on when the email
or phone call was initiated. How can
I do that or is my app gone if I use
their controller and nib?
For Mail this can be accomplished with MFMailComposeViewController. It's not possible for a telephone Call.
Assuming it's possible to do either
of these things, can I put the email
address I want for a default in the
to: field of the email view and if so
how?
Yes.
You can look at the sample code https://developer.apple.com/iphone/library/samplecode/MailComposer/index.html or the tutorial http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email
unfortunately if you make a phone call then the application is terminated. For email however, I believe there is a framework or something to do that, I think it's in the messaging API, but I'm not 100% sure as whenever I use email stuff I just do a mailto: url (which closes the app)
You can not make a phone call from within you application without exiting your app.
You can send an email inside your application using MFMailComposeViewController. Your application will remain at whatever view it was at when you present the Mail Compose View Controller view. You can set all of the normal fields in an email (subject, recipients, cc, bcc, body, ect...).