views:

897

answers:

4

Hi,

I want to place an icon on the iPhone screen form my application, like placing an icon and if i will touch that icon it will do the desired operation, like opening a sound file or an image.

So i want to ask is it possible to place an icon on screen through an application and do some events on it.

Regards, Vishal

+4  A: 

You can't do that. The only icon that will appear on the iPhone home screen will be the icon for your application itself.

Edit:

Expanding on the web shortcut idea suggested by Gene, it might be possible you achieve what you want by having a web short cut using a specific protocol handler to open your app with a web short cut added to the home screen. Take a look at this article:

http://www.mobileorchard.com/apple-approved-iphone-inter-process-communication/

I believe that would still require the user to add the shortcut though, I don't think a third party app can add web shortcuts.

andynormancx
+1  A: 

Andynormancx is correct. The only exception to this rule (that I know of) is a web shortcut -- within Mobile Safari, you can select "add to home screen", and a shortcut to the bookmarked page will appear on Springboard. The icon is a partial screenshot of the web page.

I don't know if this would be useful to you, though I suppose you could bookmark a link to a sound file or image.

HTH, Gene

PDXGene
A: 

I found it annoying that google maps cannot be page bookmarked onto the home screen. Here is an almost quick solution:

  1. Create a Tiny URL of the target Google Map. SF Bay Area Traffic is http://tiny.cc/gZKMO

  2. Mail yourself the Tiny URL.

  3. Select the URL in the email application.

  4. Before Safari realizes that it is a Google Map url, touch the x on the url line to cancel the transfer to the Google Map App.

  5. Touch the + at the bottom of Safari and touch "Add to Home Screen"

Name it appropriately and, there you have it, a Google Map entry on your home screen.

A: 

What you can do is create an application and under ApplicationDidLoad in your ApplicationViewController.h You would type in your code. (If you don't have the SDK, then don't post the question with the tags iPhone-SDK and Cocoa.)

iTz Sillohsk8