Uploading Multiple (100s) Photos via phonegap on Android

283 views
Skip to first unread message

ec list

unread,
Dec 17, 2012, 12:59:55 PM12/17/12
to phon...@googlegroups.com
Hello Everyone,

I am new to Android development (and to some extent development in general).  I am working on an app that will hopefully allow someone to go around and collect data and take photos which are stored in a sqlLite database, but eventually will be sent up to a ColdFusion server.   I have the app working to the point that I can collect the records, put them in the sqlLite DB, and then upload the first 10 or 20 images, but then I get memory errors (ie - "Out of memory on a 4131088-byte memory allocation") and the uploading ceases.  

Ideally someone would push the "upload all your data to the server" button and everything in the database goes up to server, but for some reason that's not happening.  I have tried setting this up two ways:

1) I used an actual javascript loop to loop through the records in the sqlLite DB and do the uploading.  This didn't work as well as the second way (crashing happened sooner)

2) I used the success callback from the first upload to call the next, which called the next, etc...and again, this failed after 10-20 records on my phone.

Can anyone make any suggestions on how to handle this or if its not realistic to begin with?  I don't really know what's eating up the memory on my phone since I am not purposely storing data from each upload or anything like that.

Thanks for any help or clues.

EC

ERON Cohen

unread,
Dec 20, 2012, 5:56:41 AM12/20/12
to phon...@googlegroups.com
Mike- I would recommend you watch the cartoon smart tutorial videos (the first two are enough to get you going and they're free):
http://www.cartoonsmart.com/phonegap_tutorials.php5

or join Lynda.com and watch their videos.  I think both of the above tutorials involve dreamweaver, but you can just use eclipse for everything.

On Wed, Dec 19, 2012 at 8:43 PM, Mike Britton <mbrit...@gmail.com> wrote:
I'm not even able to get the file browser up with a form element!  How did you do it?

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

Reply all
Reply to author
Forward
0 new messages