EPISODE · Feb 2, 2024 · 58 MIN
92: Background Tasks can be Shiny
from GoneDotNet · host Jonathan Dick, Allan Ritchie
In this episode, Jon and Allan discuss backgrounding in mobile development. They start by reviewing the virtual list view and how it solved Allan's problem. Then, Jon reveals the story behind his nickname 'Red.' The conversation then shifts to backgrounding in mobile development, covering common scenarios such as data synchronization, image uploads, and real-time GPS. They explore the different approaches to backgrounding on Android and iOS, including the use of services, broadcast receivers, foreground services, and job scheduling. Finally, they discuss background transfers on both platforms. This episode explores background transfers, background tasks, and code execution in mobile apps. The hosts discuss the challenges of handling slow APIs, managing state in background jobs, and scheduling one-off and periodic jobs. They also delve into the intricacies of background GPS in iOS and Android, as well as the considerations for background tasks in Windows. The episode concludes with a brief mention of background tasks in CarPlay and Android Auto. Takeaways Backgrounding in mobile development is the ability to execute code when an app is not in the foreground. Common scenarios for backgrounding include data synchronization, image uploads, and real-time GPS. On Android, backgrounding can be achieved using services, broadcast receivers, foreground services, and job scheduling. On iOS, backgrounding is more restricted, with foreground services and background transfers being the primary options. Developers should consider the specific platform guidelines and limitations when implementing backgrounding functionality. Background transfers are useful for uploading or downloading large files or data sets. Managing state in background jobs can be challenging, but there are various ways to handle it, such as using preferences or messaging frameworks. Background GPS in iOS and Android allows for tracking location and other data, but it should be used judiciously to avoid excessive battery drain. Background tasks in Windows can be achieved using WinRT APIs, but they may be less relevant in desktop scenarios. Consider the specific use case and user needs before implementing background tasks, and be mindful of the impact on battery life and data usage. People Hosts: Jon Dick, Allan Ritchie Audio Engineer: Jim Heath Chapters 00:00 Introduction and Virtual List View 05:28 The Story Behind the Nickname 'Red' 08:50 Backgrounding in Mobile Development 19:21 Backgrounding on Android 27:45 Backgrounding on iOS 30:31 Background Transfers on Android 31:55 Background Transfers on iOS 32:42 Background Transfers 33:45 Handling Slow APIs 34:38 Background Tasks in iOS 13 36:46 Managing State in Background Jobs 37:45 One-Off and Scheduled Jobs 40:20 Background Execution in iOS 41:36 Passing State to Background Jobs 44:22 Challenges of Data Synchronization 45:45 Background Execution in Windows 46:19 Background GPS in iOS 47:39 Background GPS in Android 51:53 Considerations for Background Tasks 55:12 Background Tasks in CarPlay and Android Auto
Embed this episode
Ready to play
92: Background Tasks can be Shiny
No transcript for this episode yet
Similar Episodes
No similar episodes found.
Similar Podcasts
No similar podcasts found.