In iPhone app Development, we can use "openURL" to send SMS.
But the problem is that, the app quits and opens SMS application.
How can I send 10 different customized SMS to 10 different phone numbers without quitting application?
There's no way to do exactly that -- presumably to stop unscrupulous applications spamming your contact list.
You can allow a user to send an SMS without existing your application by using the MFMessageComposeViewController, which is only available in iOS4. You can fill in the defaults but it's up to the user to press the "Send" button.
in iOS4, you app will goto into the background, so it is possible that the app wont quit.
I think you can also send the same message to 10 different people.
But to send 10 different messages, thats is a bit of spam engine, and apple dont allow things like this.
Related
I'm creating an iPhone app that uses the native iOS mail app. Is it possible that when the user clicks either cancel or send in the mail app, it can then redirect back to the app itself without having to reopen it?
Is it then also possible that when the user goes to access the mail portion of the app, it can display the mail app within my app in a webview type manner? Thanks.
No, you cannot change the functionality of another publisher's app, especially Apple's. But it sounds like you can accomplish what your want to do by using MFMailComposeViewController. It allows you to send an email from within your app, i.e. without leaving it to go to the native mail client.
If what you are doing is just sending emails you can display a MFMailComposeViewController to allow user to send emails without leaving the app.
I am working on application. I want to send sms to number directly by clicking button in my app. currently my app is sending sms to number but it first shows the messages view and then there is a send button as i've done:
presentModalViewController:controller
i want the message to be sent without showing the Modal view
You can't this is not allowed.
This way you could send hunders or thousands of messages without the user noticing, thus apple does not allow you to do that.
That's not possible. You have to show the user de message view where he can send the sms. If it would be possible to add a 'send sms' function directly to a button, that would be a huge security flaw!
No. There is no official way on iOS to send a message without presenting the dialog and the user clicking send. Maybe on a jailbroken device you could, but definitely not on the app store.
Is there a way to simulate push notifications by pushing data to mobile safari? Here are 2 scenarios.
I make a web app via phonegap and dont want to use APNS but rather make a web-socket connection and push data to the device myself. On the device end is there a "alert" function I can call to emulate a pop up when a user is not in the application?
Lets throw web app out the window. Is there a way I can do this in native mobile safari? Im not talking about a plain old JS alert window that would only come up if the user was in the app, but be able to do so with it backgrounded.
You cannot run background tasks with mobile safari so for #2 you can't do true push notifications or alerts. However you can send a user an SMS if you have the user's phone number. This can have a hyperlink to a part of your web site (which can contain some sort of payload). You can use a service such as Twilio to help you send SMS'es. However this costs money. APNS does not.
For scenario #1 I'm assuming you're talking about a native app using a phonegap solution. In this case when the app is backgrounded you cannot access any UI at all and wake up the app and show a UIAlert. In fact unless an app is registered for location updates or background music, the app is effectively not going to respond after a set period of time (it only can "finish" certain operations it had started before). So the websocket solution will only be effective if the user has the app opened.
You could register a local notification that runs at some predetermined time which will show an alert. But that is not being pushed from the server so its probably not what you want.
APNS is your best solution for scenario #1. Its not that hard to implement and its pretty inexpensive. Check out urban airship if you want to avoid building out your own server-side components for it.
How can I send a SMS from an iPhone programmatically?
Yesterday, I found an example code and coded it but the code gave me a SMS dialog (internal SMS dialog).
I just want to send a SMS programmatically without the internal SMS dialog.
Is there any example code?
Unfortunately, what you describe is completely impossible without a jailbroken device.
I have an iPhone WebApp that is installed to the home page. When a phone call comes in or an email is sent it brings up either the phone screen or the email screen. After the user finishes the phone call or email, is it possible to automatically bring up the same web application that was previously open?
No. Also native apps can't do this consistently (only for incoming, but not for outgoing calls the app will be launched again; e-mail can be sent from within the app).
Kevin, yes it can be done with some effort. What you want is HTML5 local storage and perhaps HTML5 application caching as well.
What you do is not unlike what a pre-multitasking iPhone native app would do: you store the application state in the local storage and use it on launch to restore state. I don't believe you have hooks on termination so you'll have to store the state at every state transition, as it happens.