upload photo from iPad

Forum to discuss the Web client version of Servoy.

upload photo from iPad

Postby jdbruijn » Fri Aug 19, 2011 2:47 pm

I'm creating a WC solution to be used on tablets, one feature of this solution is the user upload a photo. I know the iPad does not support any kind of filebrowsers so when I try using:
Code: Select all
var _file = plugins.file.showFileOpenDialog(1, null, false, null, uploadFileCallback, 'Select upload images')

I do not get to see the browse button in dialog (I kinda was afraid of this)

Is there another option I can use to enable the upload of a photo?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: upload photo from iPad

Postby jcompagner » Fri Aug 19, 2011 4:03 pm

does a media field work? (that is editable)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: upload photo from iPad

Postby jdbruijn » Fri Aug 19, 2011 4:47 pm

no, a media fields seems to show the same open-file dialog, which is shown without the browse button
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: upload photo from iPad

Postby jcompagner » Fri Aug 19, 2011 4:57 pm

how does an iPad upload something? Do you have a filesystem where you can browser to files for?
Do you see browse buttons in simple html examples?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: upload photo from iPad

Postby jcarlos » Sat Aug 20, 2011 7:53 am

I don't think this is possible using a web (browser) app. You can do this using native iPhone or iPad apps, but not from a browser. This is one limitation/challenge for web apps.

I am typing this from my iPhone, and I am not able to add and image from my iPhone album. But I can add images in my Facebook because Facebook has a native iPhone/iPad app.

However, someone in the Java world may have figured a way to solve this. You might have to solve this outside the Servoy world. If you find a solution, please post here.
jcarlos
 
Posts: 578
Joined: Thu May 04, 2006 8:55 pm
Location: Palo Alto, California USA

Re: upload photo from iPad

Postby patrick » Sat Aug 20, 2011 11:37 am

File system and/or photo library access is only possible with a native app.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: upload photo from iPad

Postby rvanderburg » Sat Aug 20, 2011 7:46 pm

If you use phonegap to wrap your web application to run on an ipad (and put it in the app store) you can use their api.
See http://wiki.phonegap.com/w/page/1649478 ... mera%20API
rvanderburg
Site Admin
 
Posts: 78
Joined: Wed May 04, 2011 10:28 am

Re: upload photo from iPad

Postby jcarlos » Sun Aug 21, 2011 9:22 am

rvanderburg wrote:If you use phonegap to wrap your web application to run on an ipad (and put it in the app store) you can use their api.
See http://wiki.phonegap.com/w/page/1649478 ... mera%20API


Excellent! Thank you for this tip.
jcarlos
 
Posts: 578
Joined: Thu May 04, 2006 8:55 pm
Location: Palo Alto, California USA

Re: upload photo from iPad

Postby jdbruijn » Sun Aug 21, 2011 12:46 pm

rvanderburg wrote:If you use phonegap to wrap your web application to run on an ipad (and put it in the app store) you can use their api.
See http://wiki.phonegap.com/w/page/1649478 ... mera%20API

Thx this is giving me hope again to get this working!
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: upload photo from iPad

Postby jdbruijn » Sun Aug 21, 2011 1:56 pm

i've looked at phonegap, is there anyone with experience using this?
Am I reading it right that we need the following:
- Apple development license
- a mac to develop the phonegap wrapper for our servoy webclient (I could not find a windows download for phonegap, at least not for a ios version)
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: upload photo from iPad

Postby ROCLASI » Sun Aug 21, 2011 3:18 pm

If you want to create a native app for iOS then indeed you need to do all that.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: upload photo from iPad

Postby Harjo » Sun Aug 21, 2011 8:32 pm

jdbruijn wrote:i've looked at phonegap, is there anyone with experience using this?


Hi Jos,
You contacted us, a few weeks ago, about this, and I replied to you by mail, did you got that mail?

yes, we have experience with phonegap & appcelerator.
It is not as simple as Ron (rvanderburg) suggested. The html has to run ON the iPhone, and you can't just simple embed phonegap javascript code in Servoy, because the webclient, runs in it own html/web-container. But there are other options. Please contact us, if you need help.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: upload photo from iPad

Postby ryanparrish » Sun Aug 21, 2011 10:56 pm

This has been done by using a ancillary native app that registers a custom URL scheme that Safari knows to hand off to when the URL is clicked on. Picup is one of those apps [1], there is another whose name escapes me right now that worked for Android as well.

[1] http://picupapp.com/
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL

Re: upload photo from iPad

Postby Gordon » Mon Aug 22, 2011 9:42 am

jdbruijn wrote:I'm creating a WC solution to be used on tablets, one feature of this solution is the user upload a photo. I know the iPad does not support any kind of filebrowsers so when I try using:
Code: Select all
var _file = plugins.file.showFileOpenDialog(1, null, false, null, uploadFileCallback, 'Select upload images')

I do not get to see the browse button in dialog (I kinda was afraid of this)

Is there another option I can use to enable the upload of a photo?


I have a similar issue to this in a JQ Mobile app, so its not Servoy web client specific, fundamentally you can not upload images via mobile Safari its blocked by Apple. Further to access the photo app you effectively close the mobile Safari app hence there is no connection between the two and no facility to upload images.

However there is a potential solution which I am currently working on where by you email your image to a Servoy listener which then extracts the attachment and uploads the image to your server at the same time updating your database. This has three advantages

a) Its possible and
b) Servoy will let you control precisely how the image is handled and deal with any security issues and
c) Photo app has the facility to email already built in so its an easy process.

The caveat to all this is I do not have a finished solution yet so IF I make it work I will let you know !!


HTH
Gordon
Last edited by Gordon on Mon Aug 22, 2011 1:39 pm, edited 1 time in total.
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: upload photo from iPad

Postby Gordon » Mon Aug 22, 2011 10:01 am

jdbruijn wrote:i've looked at phonegap, is there anyone with experience using this?
Am I reading it right that we need the following:
- Apple development license
- a mac to develop the phonegap wrapper for our servoy webclient (I could not find a windows download for phonegap, at least not for a ios version)


a) Yes you require and Apple development license (around $99)

b) Yes to use PhoneGap you do require a Mac for iOS

Gordon
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 265
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests