June 2018
Beginner to intermediate
394 pages
9h 2m
English
The downloading process is a network operation similar to uploading. All the problems and issues that we encounter in the uploading process are applicable to downloading as well. When a mobile device has a poor network connection and bandwidth, or when activity gets recreated - we need to handle these kinds of event. In the activity, scope lets all the listeners be subscribed; when activity stops, unregister them, and when an activity starts, register all the listeners.
Using the getActiveDownloadTask method, we can obtain download tasks when the activity restarts:
StorageReference mStorageRef; @Overrideprotected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mStorageRef != ...
Read now
Unlock full access