Uploading large amounts of data (photos and videos) on mobile has never been easy - on the surface it seems simple. Just how hard can it be?. There are numerous things that can go wrong, and numerous ways Android and iOS handle (or not) background processes.
A background process, as it's name implies is something that occurs "behind the scenes" while you're not using the app. For us this these are critical as it may take minutes for an upload to happen, or you may have a spotty internet connection and the upload may be hours or days later.
The mobile OS makers need to strike a balance between giving app developers the flexibility they want, and the battery life they advertise. It's a see-saw battle. Less things in the background, more battery life and vice versa.
Android err in the favour of app makers with much (much!) better handling for performing work when the app is closed, or phone is locked.
We had been finding on certain devices - looking at no-one in particular, Samsung - that they were very aggressive with battery management and kept putting GlobalWorkshop to sleep while the “background process” of uploads were happening - not helpful. However, fear not, as later Android Operating Systems, which now the vast majority of our users have, give us more powerful features for handling these uploads.
The past month, there's been a big effort to make use of these new features.
Rolling out on the Google Play store, is version 1.1.38 of the GlobalWorkshop Android app. Which when you next open it, are these features:
- Change to use foreground services - These processes that run independent of your app being open, and what's more - we're in control when they start and stop. When a foreground service runs you get a notification bar that stays in place, so you know an app is working. With GlobalWorkshop we'll tell you what's going on in the notification bar, and close it when the upload has finished processing. Brilliant! This is what the foreground service looks like:
- Completely re-worked upload code and logic - so it will have multiple attempts at uploading, at timed intervals if you have tiny network interruptions / spotty connections. While we were handling completely offline/online states before this is more fault tolerant to really bad connections.
- Now showing an indicator on which projects have uploads - so it's easy to see which have uploads in progress
- Improved status bar - it now shows the %age uploaded, and is visible on the Workshop screen, as well as each individual vehicle screen.
- Changed to have an outbox on the home screen - so you can see all of your uploads in one place.
- Improved logging - we've included a logging facility, so we can capture better data about how uploads are taking place, the speeds of them, on what devices and Android versions if we need some further fettling in future.
Apps are no different to cars, boats and planes - there's always fettling to be done. So we're sure this isn't the last change we'll make here.
What about iPhones ?
To make life interesting, the codebase for Android and iPhone are completely different. They're two separate apps.
iOS is much, much more restrictive on background processes. The long and the short of it is - there's a reason iPhones tend to have really good battery life despite some amazing displays - it's that background processes are quite strictly controlled. We can't kick off and leave a 1GB video upload running in the background... oh how we wish we could ! For general photo uploading on fast wifi and mobile data it's generally fine, however large uploads and bad connections the app will be put to sleep for an upload when you re-open the app.
We have a few things we've been investigating recently, and in combination with our Image Processor that had a pair of turbo's strapped to it, we may be able to support background uploads for images during the day. I.e. you can press the Upload button, close the app/lock the phone, and periodically images will upload for the next hour or two until they're done. It may happen within a few minutes or may take a few hours depending on your connection. [We get restricted to 30 second blocks every hour or so, so if a group of images haven't uploaded in 30 seconds it will be delayed to the next hour..]
As always drop us a line for any feedback. We obsess over these little details to make your lives easier!
Rowan and the team.
Purpose built for the needs of Automotive, Marine and Aviation industries. GlobalWorkshop is a service provided by Clever Robots Limited.