0

I am trying upload mutliple images in a service.I am passing the path list array in the intent.So if the service restarts (RE DELIVER INTENT) i will get the intent back.

But while uploading images say 3rd image out of 5 if my service restarts.I will have to upload all the images from the begining because i get it from intent again.

Is there a way to save the state of intent by modifying its content so that when i get it back i have the correct data or should i use preference to save the state.if preference is there a generic way to save any intent data in pref?

chaco
  • 55
  • 8

1 Answers1

0

For such things you should use foreground services, and you actually have not to worry about restarting you service. But okay, if you want you can also store some information in shared preferences. If you have to store some objects you can watch this.

Community
  • 1
  • 1
RevakoOA
  • 601
  • 1
  • 9
  • 20