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
Related
I'm writing an iPhone web app using HTML5/CSS3. I need to embed a link to open a built-in maps app from my web app. To open a location on the map I redirect mobile Safari to URL like this:
http://maps.google.com?q=Business+Name%26+Street+Address+City+State+Zip
In this case if a user taps on this link the iPhone opens up the maps app and displays the location specified in the URL.
But when I need to provide a URL for driving directions to a predefined location:
http://maps.google.com/maps?saddr=1234+1st+ave+portland+or&daddr=Business+Name%26+Street+Address+City+State+Zip
I've encountered a strange situation when in some cases the iPhone displays a pupup message:
Open this page in "Maps"?
with a choice of yes and no, and only if a user taps Yes, the maps opens up with directions. Note that this popup shows only for some addresses.
Is there any way to prevent this popup from showing at all?
I've created simple web page. Put a link and set google map link with query string value of particular address on src attribute of link element,run it to my iPhone 4.It is working fine, I'm not getting any window to ask it open on map app.
I noticed that you've used "saddr" as a query string parameter. You can replace that with "q" query string parameter.
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"]];
If you visit maps.google.com on a mobile device, then press 'Menu', 'Get Directions', and select the 'transit' option, you are taken to a page where you can enter two locations and a date/time, and get directions on public transit. However, the URL is still maps.google.com.
Is there any way to link directly to this page so that I can load it in a UIWebView in my iOS app? Would 'clicking' the buttons in Javascript be (the only/a good) solution?
Try: http://www.google.com/transit
Even clicking the buttons in javascript doesn't seem to be working. The Google Maps code is a little strange- the event listeners aren't assigned directly and I can't get a .click() to work. So what I'll do is have the user enter the two locations in boxes in the app, then load something like http://maps.google.com/maps?f=d&source=s_d&saddr=Coover+Hall&daddr=lied+rec+center in the UIWebView, except I'll add some more specific location information before building the URL, since this is a city-specific app. Not a perfect solution but it gets the job done.
You could create a URL that links to the transit directions with the "dirflg=r" paramater.
Find the other URL parameters here: http://web.archive.org/web/20110714031648/http://mapki.com/wiki/Google_Map_Parameters
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.