PDA

View Full Version : IPhone: automatically launch applications?




kingkung
Mar 31, 2008, 02:04 PM
Hi,

I'm using the iPhone SDK, and I want my iPhone application to automatically launch at a certain time... any way I can do this?

And any way I can test this on the emulator?



admanimal
Mar 31, 2008, 03:32 PM
I am almost certain that there is no officially supported way to do this.

kingkung
Mar 31, 2008, 03:40 PM
Thanks for the quick response.

Can you clarify what you mean by "official"? Are there certain "unofficial" ways to do this?

Follow up question: Are there any other ways to start up an application on the phone? For example, via system events, like adding a contact or photo? Or via a port-directed SMS?

gnasher729
Mar 31, 2008, 03:51 PM
Thanks for the quick response.

Can you clarify what you mean by "official"? Are there certain "unofficial" ways to do this?

Follow up question: Are there any other ways to start up an application on the phone? For example, via system events, like adding a contact or photo? Or via a port-directed SMS?

Yes. Just watch the iPhone videos on ADC; one of them shows the official way to start an application either by using a link on a website, or from another application.

kingkung
Mar 31, 2008, 04:04 PM
Yes. Just watch the iPhone videos on ADC; one of them shows the official way to start an application either by using a link on a website, or from another application.

Sweet, thanks a lot. I have the ADC videos downloaded, do you happen to recall in which video they discuss this? I assume it's the "iPhone SDK for Web Developers" video...

kingkung
Mar 31, 2008, 04:14 PM
Sweet, thanks a lot. I have the ADC videos downloaded, do you happen to recall in which video they discuss this? I assume it's the "iPhone SDK for Web Developers" video...

Never mind, I found it, thanks.

kingkung
Mar 31, 2008, 05:46 PM
Yes. Just watch the iPhone videos on ADC; one of them shows the official way to start an application either by using a link on a website, or from another application.

Okay, I just watched the video, which told me to create a URL schema for the app (myapp://).

Am I wrong in assuming that this feature will only work when I access the web link on my own iPhone (and not on any public domain)? I assume this is the case since no public computer would know to send links beginning with "myapp://..." to my iPhone app.

Thanks for the help.

SqueegyX
Mar 31, 2008, 05:59 PM
Well I highly doubt you will ever be allowed to launch an app on your phone that in response to a message that originates outside your phone. That would just beg for invasive hacking.

fishkorp
Mar 31, 2008, 06:00 PM
My understanding is that you register yourapp:// with Apple and they'll make Safari compatible with it, just like maps://whatever will open Google Maps, etc. So if you're making a cook book app and you register cookbook://blahblah with Apple, if anyone visits any website with a link cookbook://texthere it'll open up your cook book app on their phone, assuming they have it installed.

As for launching at a specific time, no, because that would require your app to run as a background process, which is against the rules. Of course if you jailbreak and write an unofficial app you can do this.

stadidas
Mar 31, 2008, 07:01 PM
That isn't how it works. You make your app register for a certain type of url, i.e myapp://. You can then embed a link in a page using this protocol. When selected in Safari on the phone, the link will be forwarded on to your app which will handle the request. There is no registration by Apple involved.

maxjg
Mar 31, 2008, 07:04 PM
fThis is Apple's tutorial on how to register for a your URL type(you'll have to be logged into ADC to get to it).
http://developer.apple.com/iphone/library/samplecode/LaunchMe/index.html
You certainly can use these links outside of Safari, look at the Address Book application. Each one of those UITableViewCells is a link(like the phone number cell links to tel://5555555555).

Monkaaay
Mar 31, 2008, 08:16 PM
It would be nice to be able to launch applications on start up. Too bad I never see it happening.

jasontremplay
Apr 19, 2009, 11:35 AM
Does anyone know a way to have a program or link start an application and then stop it after a period of time?

SqueegyX
Apr 20, 2009, 04:41 AM
Does anyone know a way to have a program or link start an application and then stop it after a period of time?

The receiving app can do what it needs to needs to do, and then open another registered url scheme back to the originating app.

App 1 opens "app2://dosomething/"
App 2 does something which takes a minute
App 2 opens "app1://didsomething/"

StevenMiles
Sep 10, 2009, 08:05 PM
Hi,

I'm looking for a way to write a method, or perhaps a link in a UIWebView, that will cause my app to close, and the iPhone's Camera app to open. Is there a way to do that? I explored LaunchMe, but it seems I'm trying to do something different.

Thanks,
/Steve

SqueegyX
Sep 11, 2009, 10:24 AM
Hi,

I'm looking for a way to write a method, or perhaps a link in a UIWebView, that will cause my app to close, and the iPhone's Camera app to open. Is there a way to do that? I explored LaunchMe, but it seems I'm trying to do something different.

Thanks,
/Steve

This isn't what you want to do. Instead, use the UIImagePickerController class to open the camera library or camera view from within your own app.

StevenMiles
Sep 13, 2009, 10:02 PM
Hi, SqueegyX,

Thanks for responding. I've already programmed to be able to use the camera from within my app, but I was considering just sending people over to the Camera app, because launching the camera from within your app takes mucho memory.

But I think I'll just keep using the camera within my app. Thanks anyway!
/Steve

whealey
Dec 4, 2009, 07:32 AM
I want to have my web app launch Mail and take you to your inbox... How would I do this with a link? I presume it would be mail:// but what would I put after that?

SqueegyX
Dec 5, 2009, 12:22 AM
Don't you can quite do that. The closest you will get it to open a mailto:foo@bar.com url. That will open the mail app with a new message prepped for sending to that address.

aaortega
Dec 14, 2009, 02:48 AM
Can you have an application launch itself and then close like 5 seconds later? There are apps that send you reminders at a certain time, why would I not be able to do that?

smoker68x
Mar 18, 2010, 12:45 AM
Sorry to change the subject (slightly), but I have a question along the same lines as this...

From what I have read so far there is not a way to launch an app at a certain time (ie: an alarm clock programmed to open a radio app), but is there a way to launch a link to an online audio feed?

Basically, I would like my iPhone to wake me with a certain radio station (for which I have an app and the direct link to the audio feed) and I live too far away to use a regular alarm clock for that. Am I asking for the impossible, or is there something I have overlooked?