Is it possible for a mobile webpage to capture a picture? - iphone

Assuming you built a page for each specific mobile browser (Android/iOS/BB/etc.), is it possible to have a web application capture an image and send it to the server for processing?
I'd like there to be "Nothing to install" for my application, but if I need to reach out to the hardware at all, I fear it's not possible.

There is the Video Capture API but I have no idea how widely spread addoption is at present and it is very new.
IF this api isn't avalible there isn't really much you can do other then asking users to upload it using a standard file upload and them to take the picture before hand.
This is one area that a native application would be far far better as intergeneration would be easier and more seamless for the user.

Related

Using a CDN for a mobile Swift app

I am currently developing a mobile app using Swift and wondering if someone could give their opinion about whether or not using a CDN is a good idea for some app images?
What I mean is, in the app the user will be able to achieve milestones/badges. The designs may change over time and I was thinking instead of embedding these in the app, put them on to a CDN and allow the app to call the CDN when needed and cache the response.
My concern with this is that in the app I provide 3 different sizes for each image and the app determines which size to use based on the users device. How would this work with online/CDN images? I don't really want to be downloading the largest image if I only need the smallest one.
I will be needing to store the profile image in a CDN so I need to go through the setup regardless but just didn't know about whats best practice for other app images. Things like tab images and other basic icons I will embed in the app but what about the images a user can achieve?
I realise this could be to broad a question and come down to personal opinion but really looking for some thoughts and if someone has come across the same "problem".
Perhaps On Demand Resources is what you need.

What are the pitfalls when implementing a web page like app?

I'm planning to implement some app that performs similar functions as some website does. An app should be able to post, get and view some data. Most viewing data is available only after login. Payments. The webservices are .NET asmx XML services.
So, I'm planning to use UIKit, drag and drop some text fiels. For posting the data, I will do some manual input validation, assemble input into a string, post it to the server. Also, some parsing will be done after getting info form a webserver. Now, I haven't done any website app before, so I'm just curious what are the potencial problems that I might run into.
I guess you are asking about potential technical issues. The ones I faced recently working on an app of this type and workarounds are:
Maintaining your session with the server if you are combining native UI screens together with UIWebView's of your website.
XML Parsing can be hairy at times, so JSON is the best option depending on your preference. The other solution is to output XML in the PLIST format which is easier to code against. On the server side PHP has some PLIST generating libraries. Am not aware of what is available on .NET.
On the iOS side the ASIHTTP library helps make it easier to post to websites, particularly when you are using binaries etc.
Depending on your use case you may also consider a pure web based UI version which resides inside a UI webview. If you are planning on going this route JQueryMobile is a pretty good solution for rendering iOS like UIs. This saves you quite a lot of effort on the communicating with the webservice and parsing etc.
Thats all I can think of for now.
Biggest problem might be getting it approved by Apple if they think it should be just a website and not an app. They might cite: "Limited Functionality". see : https://developer.apple.com/appstore/resources/approval/guidelines.html
I can also reccomend www.sudzc.com
Your UI will certainly not be as responsive as a native app.
Your users won't be able to use your app without an Internet connection/flaky connection
You'll have to rebuild all native controllers yourself if you wan't your app to look like a native iPhone app.
You'll have to rely on libraries like PhoneGap to use most of the hardware/non HTML supported functions (like geolocation, camera, etc.)
Etc.

Accessing Video Content ONLY through an iOS App - How would I do that

I've got a client that wants to have a paid app providing his video instructional content on iOS, but of course we dont want people simply getting the video content directly without paying for the app.
Is there some simple way of doing this that I'm overlooking? He wants the content streamed so he can add content easily and periodically without app updates.
Perhaps using Youtube but having the videos password protected? Is there a service anyone has used with an appropriate iOS API that anyone has heard of?
I've never done this before, but you could do some kind of token exchange based on the device ID. When the app is first used, register the device ID with the content server, and use that in combination with a salted hash of some kind to identify the device when requesting the media from the server.
I'm considering two options right now.
1- Following this post (roughly) In iOS, how would you programmatically pass a username / password to a secure site and essentially doing a combination of .htaccess for password protection, leveraging robots.txt to prevent search engines from indexing the videos, and obfuscating the video names. I've got to research the password protection of the video directory and how exactly to do that... but it seems the simplest. The downside is the clear text password.
2- A slightly more sophisticated method where I use oAuth to authenticate against but really following the first path, and potentially leveraging http://maniacdev.com/2010/09/new-open-source-oauth-library-for-easy-authentication-on-ios-devices-from-google/ to help in writing the oAuth piece.
a third possibly prohibitively expensive option is to look at the HTTP live streaming in OSX server https://developer.apple.com/streaming/
How do you guys think these options sound? Are there others I'm not considering?

Logging into and communicating with a server from an iOS app...help!

Hey everyone. I have a fair amount of experience developing iOS apps, but nothing much with web/server interacting apps. For a project at work, I am making an app that will let you login, and get pictures off from a server that will then be downloaded for display and review on the local device.
I need to get some pointers on the correct approach to take. Are there built-in classes that make doing something like this easy? Once the cogent is downloaded from the server, it will be viewed locally, so all I need is to get a point in the right direction for logging in and communicating with a server…from an iPhone.
Can anybody point me in the right direction?
Me, I'm using ASIHTTPRequest Librayry to communicate / download with Internet.
For example, for an news app I download latest news in JSON (with a PHP script on a web server) and store datas with SQLite. If you need a little explanation of JSON with iPhone, check here (in french, but source codes are in english ^^)
When I need to download an image, I use ASIHTTPRequest and a queue to avoid downloading to much files at the same time.
If you want more information about a step, just say it.
Good Luck !
NURLConnection is your friend, along with its delegate methods.
Don't be lured by the temptation to use the -sendSynchronous method (which, now that I think about it, if you require authentication, you probably can't use anyway).

What is good way to register users from phone app

We have a web application and we've built phone applications (iPhone, Android, BlackBerry) to be companions to the site. The usual workflow is that an existing user of the site gets a phone app and then plugs their existing credentials into the phone app and they are off and running, but more often now we are seeing folks who are downloading the app and then (and this should not surprise anyone) don't read the help screen that explains they need to go and get credentials at the web site and therefore cannot connect to the application which does require registration to manage their content. This is a giant usability fail condition.
So we know that we need to put user registration workflows on the phone app.
Other than the obvious solution of duplicating our registration page on the mobile, does anyone know of a better identity solution for the phone? For example, on the desktop we also use Facebook Connect as an identity server and the users love it. I'm looking for something that simple that we can implement across the major smartphone platforms.
Clarifying note:
I should add here that this registration mechanism is likely to; and it would be desirable if it did, go hand in hand with a general identity/authorization mechanism such as the Facebook mechanism mentioned below.
One other place I'm poking around is to see whether there's an openId solution that does not require a browser to pop up.
Restful service might be the e asiest way for you to achieve this, you can use it on any device that can make http requests, so you can make your own login screens and talk to the s ervice that way...
Facebook has a Connect API for the iPhone. Integrating it into your iPhone app is very smooth.
http://developers.facebook.com/connect_iphone.php
On the BlackBerry we were able to build a fairly robust REST pipeline between the client apps in the field and our servers. We primary use the framework for updates, but the device API is generic enough to be able to build almost anything you need via standard HTTP/HTTPS GET/POST calls.
On the RIM platform, look into the HttpConnection API as a starting point. There is also an example on the BlackBerry Developer's site which will help. Finally, I believe there are several examples inside the sample package that comes with every BlackBerry JDE (IDE + API download).