i have a application which has 2 parts one is a webview and other is a native iphone application.
I want to invoke a native iphone application from a website inside
a webview.
If by webview you mean a webpage that you open in Mobile Safari you can link to your native iPhone app by registering a custom URL scheme for your app.
http://www.idev101.com/code/Objective-C/custom_url_schemes.html has a fairly clear description on how it's done.
If you mean opening something like Mail or SMS from within your app, then you can use a URL like sms:// or mailto:
Related
Assume we have a HTML5 web page embedded within a PhoneGap or Titanium app.
Can the app invoke JavaScript functions found within the HTML5 web page?
Specifically: after the app receives an Apple push notification, how can the app invoke one of the JS functions on the web page?
Thanks!
Are you asking how to do it in PhoneGap? or are you asking how PhoneGap does it?
How PhoneGap does it:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html
UIWebView's stringByEvaluatingJavaScriptFromString: method.
Edit: how to respond to push notifications in phonegap: can we do push notification in iphone using phonegap framework?
Id like, if possible, just create an App for iphone by and URL, like http://keepyourlinks.com/browser.php
my go it's to make a browser inside a browser....
possible?
Yes it is, our app uses a browser inside the native application to view a web site. We also setup encryption and session variables so that we can check if they are logged in and validate that they are on the iPhone app and not in a browser.
You can use a UIWebView in your XIB and pass it a URL.
I want to access TTS (Text-To-Speech) and STT (Speech-To-Text) functionality of iOS from web app. Since web app dont access ios device functions, is it possible to launch Native app from Web app?
e.g. When user wants to access TTS (e.g. Dragon Dictation), web page will launch Native app, take recording and send the recorded text to web app again.
Or we can access TTS/STT functionality right from web app?
The only native apps you can access from web apps are those with custom URL schemes set up, and the built-in ones e.g. SMS (sms://), phone (tel://), iTunes (itms://) and YouTube (http://youtube.com/watch?...).
If the apps you mention don't have their own custom URL schemes which you can use to get to them, there's no other way you can do this.
I can answer one part of your question - using the functionality of an IOS native app from a web-app;
Apps can be developed such that they respond to custom URL schemes - like, for example, the mail app responds to mailto:// and youtube responds to youtube://. Calling a URL with one of these schemes will start the IOS app - but it's entirely on the developer to code this into their application.
You could therefore in theory develop an app to get triggered from a web-app, perform an action then return to a web app after! Probably not something I would try and do though.
How can I invoke an app from a native app? I want to invoke my app on clicking a mail from the native mail app. For example native mail app list staza app and good writer app when you want to view a pdf file, that is in your inbox.
So what we should do if we want to display our app also in that list?
You can try inter-process communication. Here is some guide
how is it possible using html/js to make an iphone native app build with phonegap or other html based app makers to load an url in a navigation controller without leaving the app. (sort of like the fb iphone app)
You can use a Plugin in your Xcode project. This one was specifically created by the guys on the PhoneGap team to address the situation you desribe.
Chec out the code in http://github.com/purplecabbage/PhoneGap-Plugins/tree/master/ChildBrowser. This allows you 'spawn' a new controller (from your basic PhoneGap Native app) which pops up and has a browser in the controller. A button allows the user 'close' the view and you return to the native app.