Pergunta

Is there a way to prevent BackgroundTransfer from trying indefinitely to upload a file. Let's say one of my user is trying to upload a movie from the phone to Facebook. Facebook Graph API doesn't accept byte-range/resume/etc. Let's say the network is slow, less than 50 kbps. Under 50 kbps, BackgroundTransferService will restart the upload.

That being said, when testing my app, I've noticed that the uploaded restarted 4-5 times under my very slow 3G wifi router (yeah... I'm a mix of the two cases).

Will this behavior happen on a GSM/3G/4G network?

What think is that this behavior is totally welcome, on a Wifi, but not on a phone network, as data costs more.

[Edit]

I forgot one important info: I don't have internet on my WP, so that's why I ignore the behavior of BTS on a phone network.

Foi útil?

Solução

Yes, the agent will try and reattempt the transfer if the connection is dropped. This is one of the benefits of using the agent, you let it worry about reattempting and network conditions so you don't have to. The API does all you a level of control over usage of cellular data via the TransferPreferences property. You could set this if you're concerned. Alternatively, let the user set their own preferences about data usage via the built in settings on the phone.

There is more information at http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202955(v=vs.105).aspx#BKMK_TimelinessofCompletion

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top