I've seen a lot of apps that can create icons for on the home screen. You add it through the normal Add on Home Screeen and when you click on the app it will directly start calling or whatever. This must be done by immediately redirecting to an url like sms:// or tel:// depending on what you are trying to do. But how is this accomplished?
How can you let a page be bookmarked normally so it will get the icon and then when it's pressed immediately redirect it to a specific url?
I THINK, these icons are made using Configuration Profiles & application links (url schemes).
Have a look at this thread: Installing a configuration profile on iPhone - programmatically
But they didn't find a solution in there. Profiles can only be installed via MobileSafari, they say. Not via a UIWebView. So i'm not sure how it's possible from native apps.
Anyhow the preference shortcuts aren't working anymore on iOS 5.1.
As soon as your app is opened, you call:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://www.google.com"]];
Related
I am struggling a little bit. I have a common url like www.domain.com/test.html
and i want Android users to get my app open if "test" is included, otherwise if they don't have the app their should be directed to the play store. I got everything implemented and it works with mozilla browser. But using chrome on Android it should be forbidden to automatically open the app if it is available!?. Now if the user enters www.domain.com/test.html and i recognize he is using Android and Chrome i tried the intent stuff in a script in a redirected www.domain.com/android_chrome.html:
<script> window.open("intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end","_self")
</script>
But the App won't open automatically. If i use a regular Link:
Take a QR code
it works. But i want to let it open automatically!
Google restricted starting intents from javascript apps, that's why it isn't working. Security reasons I guess. You should just display nice big link to let user switch to your app instead of website - or let him continue if he doesn't want to launch the app.
Forcing users into using app is bad, IMO. Splash screen suggesting to use it is okay, but don't push it.
I'm currently working on an iPhone Application which allows the user to navigate to POIs. Those POIs are defined via lat/lon, and the user should have the possibility to start his navigation solution with one click to navigate to this POI.
This works fine with Navigon, using URL scheme navigon://myapp|name||||||lat|lon
Now I know that there is an URL scheme named tomtomplus:// for the TomTom iPhone app, I'm only able to start tomtom, no other action is possile.
I tried tomtomhome://geo:action=navigateto&lat=mylat&long=mylon&name=myname - but did not work. Only tomtom app is starting.
Even when I try to go over the http://addto.tomtom.com API, tomtom does only start, no action in adding and POI or chance to navigate to.
Codesniplet:
NSString* launchurl = [NSString stringWithFormat:#"tomtomhome://geo:action=navigateto&lat=%.8f&long=%.8f&name=%#", myEntry.getLon, myEntry.getLat, myEntry.name];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[launchurl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
Any suggestions?
I used Tomtom to send me an email from the route planning option on my iPhone. In that email is a tomtomhome:geo link which I used.
To test I clicked on the link on my Mac in Safari, and obviously nothing happened. Then I saved the link as a bookmark, which immediately is synced to my iPhone using MobileMe. I clicked on the bookmark on my iPhone Safari browser and viola Tomtom opens with a map centred to the location in the link. It pops up with a balloon with the links name, and an right arrow allows me to choose first option "Navigate there"
The link generated is:
tomtomhome:geo:action=show&lat=26.123456&long=28.123456&name=linkname
I'm would like initiate another app which is listed in my app when user touch that app. is it possible? help me howto do that?
This isn't directly possible - the only way you can execute another application is via a URL handler.
For example, you can open a page in Safari via:
[[UIApplication sharedApplication] [NSURL URLWithString:#"http://apple.com"]];
And you get place a call (albeit with the user's agreement) via:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"tel://xxxx"]];
As such, it really depends on whether on the the application you wish to open has registered a URL handler.
With a custom URL handler, registered by the destination application, this should be possible.
http://arstechnica.com/apple/guides/2009/03/building-services-into-iphone-applications.ars
Yes, it is. Usually it is used to launch a few iPhone APIs such as Phone, Mail, Map, YouTube.
But you can use that for launching your own App that have implemented Apple URL Scheme http://www.docstoc.com/docs/3595962/iPhone-URL-Scheme. The idee is that you should create URL with some parameters for app wich you want to launch, and run it. Good luck.
I'm trying to put a button in my iPhone app that will move the user to the appStore and list ALL of our apps.
This wastes time loading safari... then the music store... then the appStore:
itunes.com/apps/OurCompanyName
This tries to load Music Store... and never reaches the app store at all:
itunes.apple.com/us/artist/OurCompanyName/id27628833
This link shows many other company's apps along with ours:
ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&submit=media&term=OurCompanyName
Apple's own "link maker", even with the correct "id#" doesn't work.
The link we cut/paste directly from our "more apps by this developer" in iTunes doesn't get
directly back to that app-list.
Isn't there a simple "direct to the appStore link" that will list all the apps by ONE company?
We do NOT want a clickable link for a browser on a PC. We need a link from a UIButton inside our app.
Well Its doable. Use the UIButton as a way to link to safari and give the url of the code that launches a page or search.
This for example works
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&submit=media&term=Playdom"]];
What about developing one html page with all your apps or make it inside the app and use that.
Try refining your search or inside of your descriptions put something pretty unique in all of your apps
Say developed by CompanyiPhoneDev or whatever and search for that!
also I think there is a way to link to an iphone app store search
Tada!
Hope that helps!
Does the link on AppStore work for you?
For example, the Apple Bumper app is at: http://itunes.apple.com/hk/app/iphone-4-case-program/id383941000?mt=8
When viewing the app in iTunes, right-click on the "Apple Inc." text will give you an option to copy a link, which is: http://itunes.apple.com/hk/artist/apple-inc/id284417353
Another way : http://arstechnica.com/apple/news/2008/12/linking-to-the-stars-hacking-itunes-to-solicit-reviews.ars
has a lot of info like
Searching iTunes relies on the Search
web object application or "woa". This
is located at
http://phobos.apple.com/WebObjects/MZSearch.woa.
You can access this service via your
web browser and it will redirect to
iTunes, which will handle the request.
Here's what a typical search request
looks like: view plainprint?
http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=US&media=software&term=ad+hoc+helper
http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=US&media=software&term=ad+hoc+helper
If you paste this URL into Safari,
iTunes launches and displays the
search results for the phrase "ad hoc
helper."
You can perform the same search
directly from the iPhone. The
following code snippet shows you how
to escape the URL and use the
UIApplication openURL: method to
switch control from your application
to App Store, opening its search
window with the phrase you pass. I
have put the search phrase into a
separate string here so you can easily
generalize this operation.
(void) doSearch
{
NSString *search = #"ad hoc helper";
NSString *sstring = [NSString stringWithFormat:#"http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?WOURLEncoding=ISO8859_1&lang=1&output=lm&country=US&term=%#&media=software",
[search
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
[[UIApplication sharedApplication] openURL: [NSURL
URLWithString:sstring]];
}
the solution is very simple it works like this:
NSString *iTunesLink = #" itms-apps://itunes.com/apps/CompanyName/id123456789";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
I have an app that uses OAuth to authenticate, which means the user must be directed to the website to authorize the application. I prefer to make it obvious to the user that they are using a standard browser to authorize at the original site rather than just using a web view to show the content within my app. However, every time they are directed to Safari (via openURL), it launches a new Safari window and once Safari has 8 windows open, it simply fails to work at all.
I'm wondering if there is an equivalen to the "target" attribute of an anchor tag in html which would allow me to cause all openURL calls from my application to open in the same window.
There is other functionality that I can expose via the web application, creating a hybrid app between native iphone functionality and web app functionality in Safari, but if I have to launch a new window every time I switch between the app and Safari, it becomes unworkable. The Youtube app is obviously able to return the user to the previous page after showing a video, but that might well be a custom plugin in Safari for iphone. Also, while returning to the previous page is somewhat useful, sending them to a new URL in the existing window really opens up a lot of possiblities.
I'm pretty sure there is no way to pass a target parameter to openURL:.
What I noticed about Safari is that it won't open another tab if the page you are opening with openURL: is/was already open in Safari. It just reloads that page. This might sound trivial and not helpful but perhaps you could use it to your advantage if you can make your web application only use one page. Different views or states could be expressed with #anchor tags.
An example is http://m.flickr.com. Notice their URL structure? It goes http://m.flickr.com/#/home, http://m.flickr.com/#/explore/interesting/, http://m.flickr.com/#/search and so on. All of these are different web pages to the user but to Safari it's all the same page.
I found iOS 6.0.1 Safari will open the same tab with a simple hashtag, without the slashes. So with the above example http://m.flickr.com, openURL to http://m.flickr.com#someinfo opens to the same tab.
In your webpage, use window.location.hash to return the params. In the above example it will return #someinfo.