I'd like to save sensors like acceler开发者_C百科ometer, gyroscope, etc data and I don't know what's the best approach for that using a FAST or GAME selection. For example, I can think of saving 10 seconds of data in memory, and then making a batch insert into the database so I will not saving at a rate of 20ms to the database and block the phone, but I don't know how much time it could take a bath insert of 1000 records. Any other approach? My goal would be that at a desired time the records in the database will be sent to a specified web service. Thanks in advance. Guillermo.
I did something similar when I kept 5000 events in memory and printed it out to the console afterwards on iPhone to do some offline research. Besides the sluggish behaviour of the iPhone console in general it worked out pretty good.
So do you really need a web service and thus a bunch of user data? (I hope the users know that big brother is watching them ;-) Well, if so you should consider using compression and send out binary data, expecially if the users are not connected to their WLAN.
Kay
精彩评论