I'm building an asp.net web application for an iphone using jQtouch. How can I read the device serial number from asp.net mvc?
In short, I don't think you can get the device ID through iPhone Safari.
iPhone Safari, like any other browsers, works in a black-box model and only let through a selective set of information about the system, such as geo-location and device orientation. The Safari Web Content Guide by Apple documents several features specific to Mobile Safari.
A lot of the API's like JQTouch are interacting more and more with the device itself with things like geo-location etc. When I need to get more into the device and hardware I use tools like PhoneGap that allow you to work directly with the device like a native app (almost) still using javascript to do this. PhoneGap opens up the device functions to embed in your web page to leverage in your application. The catch is it is still a web site, but is now an application and must be added to the device through the likes of the app store or market etc.
You can read more at www.phonegap.com . I have had good luck with it so far combining JQTouch and PhoneGap.
Related
We are developing web browser application for mobile phones and I am trying to figure out a way that I can gain access to the camera and take a photo and then upload it to the internet. But so far what I was suggested is to use phonegap and create native application. Phonegap is fine but it is not what I am looking for because my client wants to design forms and these html forms somehow will be able to trigger the camera and take photo and upload it to a server. Do you think developing a native API for every platform and having access to its functions from the web browsers is possible? What your suggestion would be?
(Note: My customer only want application that can run on mobile web browsers no native application runs on I-Phone, windows mobile, Blackberry and Android)
Thanks a lot...
Web apps (not wrapped in native code as Kumar details) cannot access all device hardware and sensors. Location support is available on iOS and Android, but camera access is only available on Android (via JavaScript). Similarly, device motion APIs are not accessible on Android, but are on iOS.
As you can see, support is sketchy and if you are truly looking to use such features, you are better off (and in many cases, realistically looking at) writing native apps for each platform you intend to support.
HTML5 is not yet at the point where it can replace native apps. It can do some of the things that native apps can, but even then performance is suboptimal. Currently, native apps may be more difficult and time-consuming, but they are necessary.
Calling android native APIs from javascript functions of embedded WebView
Use JS to call Java code which will in-turn call the Camera API or whatever else you are looking for.
It's not going to be possible to do it on iPhone, the only known way of accessing the camera is through the Cocoa layer.
What is a hybrid app for mobiles? What is basic architecture to follow while developing? What are the components? What will be the back end and what will be the UI? Is it for only iPhone or can be for any mobile device?
With iOS, you can create an application that combines features of native applications and webpages.
A hybrid application is a native iPhone application that provides most of its structure and functionality through a web viewing area, but also tends to contain standard iOS user interface elements.
A hybrid application gives users access to web content with an element called a web view (described in “Web Views”).
Precisely how you use a web view in your application is up to you, but it’s important to avoid giving users the impression that your application is merely a mini web browser.
A hybrid application should behave and appear like a native iPhone application; it should not draw attention to the fact that it depends upon web sources.
You can create Phonegap app and still using native controls of cocoa for powerful features like Mapkit api, UIWebview (Childbrowser plugin) etc
A hybrid app is a mobile application in which the same app can be worked in different mobile operating systems like iOS, Android, Windows, etc…, and even in browsers (Mozilla, Chrome, IE, etc.. ). It is the same as mobile applications for users, which can be installed from App Store or Google Play store. But technically it’s different, its works with a combination of HTML, CSS and JavaScript.
More read-: http://webduratech.com/what-is-hybrid-app-how-it-can-help-small-scale-business/+
A hybrid application blends web views (loading a webpage into the app) and native code together to create a single seamless application. In most cases it is faster than developing the entire app in native code, because developing for the web is easier (there are tons of web frameworks and it is just easier to develop good looking content on the web vs via native code, such as swift).
Ex: Amazon uses web views for the products page on the iOS app, being able to reuse the code on iOS, Android and the web saves them a ton of time.
In a hybrid app, the core of the app (navigation, location) are normally done in native code and stuff such as showing images and information is generally done via web views.
Since web views are a web page, you can develop them in any HTML 5 framework you would like to use.
The most important part is to have an app that works and runs super well for your users, and having web views in the app is very tricky, but a huge time saver.
For instance, could a web app access the mic on an iPhone and transmit voice back to a server?
Or is it possible to build Safari extensions for the iPhone that can operate transparently on a web page? For instance, is it possible to build an extension that removed ads from Google result pages for the iPhone, without the user clicking any buttons to activate the ad-removal functionality?
You pretty much hit the main limitations.
You have no access to hardware that's not supported by HTML5 (geolocation is, but things such as acceleration and audio/video recording are not).
You can't build Safari extensions for the iPhone at this time, you can only use JavaScript like usual.
Some frameworks like PhoneGap make attempts to provide more hardware features via a native app container, but it appears Apple is trying to prevent those apps from going on the App Store, to some extent.
Is it possible to write to a file in a native iPhone application and have a Safari browser read from that file after having the browser opened from the native app?
Alternatively (and this would be great!), would it be possible to launch a mobile Safari webapp from a native iPhone app, and have that application access the OS 3.0 External Accessory Framework? My assumption is no...
Basically, I have a functioning iPhone app that wraps a simple mobile Safari webapp, but I'd like to utilize the external accessory framework once I have launched the Safari webapp from the iPhone app...
You can use the phonegap framework : it provide a project template and libraries to access native function in javascript (like writing/reading a file).
Consider also the localstorage and the SQLLite DB...
There are 2 different interpretations. If you want to launch MobileSafari from your app, then the answers will be no since MobileSafari and your app are isolated by sandboxes. But you may include the detail in the URL like
http://example.com?info=SXMgaXQgcG9zc2libGUgdG8gd3JpdGUgdG8gYSBma…
But you can embed a UIWebView in your app, then the answers will be yes (to the UIWebView), since you may communicate with the web view with any ObjC code.
I want to develop a mobile web application using asp.net 3.5 that can be viewed on an iPhone but there is no longer a template in VS2008 to enable mobile development. Can this be done ?
the iphone uses the "regular" version of your website so developing a "mobile" version would nto accomplish what you're looking for. You should check the browser headers and redirect people to the iPhone version of your site if you detect mobile safari.
http://iphone.facebook.com/
Another option (if you're using MVC) is to have your controller detect the browser and show a different view if it catches mobile safari. This way you wouldn't need a duplicate site, just two sets of views.
A web application (via Asp.Net 3.5) would be accessible over the Internet and would be accessible via the iPhone's Safari browser. There isn't anything truly special you need for it unless you want to make a true web application for mobile devices like the iPhone and Blackberries. In that case, you are looking purely at design aspects since it's still just a website. Due to the diversity of mobile browser capabilities, you'll need to do some research to find out what is recommended for the specific mobile browsers you want to access (the BBC's website comes to mind as a good example of mobile rendering).
Ultimately, the user agent is evaluated by your system and then it renders (or redirects) appropriately. Everything else is design if you want the page to render differently for the iPhone than any other browser on the web.
If you can get your hands on a copy of .Net magazine (a.k.a. Practical Web Design in the U.S.) issue 178, there is a great article on what you need to be aware of when doing mobile development and how the iPhone's browser is a lot different than others.
The iPhone (at least mine which is the 3G version) have full support for "normal" web apps with Ajax and everything. So mostly any Ajax library would be 100% compatible with the iPhone, at least as long as the Ajax library is focusing on Open Standards and such...
[Shameless-Plug I work with Ra-Ajax]
Ra-Ajax have 100% support for iPhone except for "dragging and dropping" which interferes with scrolling on the iPhone. This means that you can use Ra-Ajax (which is an LGPL licensed and Free of Charge library for ASP.NET) to create a "normal" website which will work 100% perfectly (except for dragging and dropping, which is used in e.g. Ra-Windows etc) on the iPhone...
Even the really "advanced" stuff like our Ajax Calendar sample works flawlessly with the iPhone :)