Reputation: 298
I'm making an application that will backup all SMS messages.
These are my choices,
read every sms message details then store it to the server(one by one).
read every sms message details then store it to the server(by batch, like 100sms per batch)
What should be the best way?
On choice 1, the use will wait until the backup is finished.
Upvotes: 0
Views: 124
Reputation: 28551
So it boils down to what you want to offer to your users. I think not much more code would be required to have both options, so I would simply leave it as a preference settings to the user: "instant backup" or "scheduled backup").
On the first time application is ran, I would anyway send a batch of all existing SMSs, not sending 1 by 1.
Upvotes: 1
Reputation: 1704
Option 1 will require a very good internet connection and it will take more time to send every message. Option 2 is more efficient, you need only one connection and one request to the server.
Upvotes: 0