Last sunday was a sunny day and so we did a family tour on our bikes. As a developer of mobile apps there’s always something to test and so I started my TimeTracker APP on my BlackBerry Z30 to test if all works as expected.
Perhaps you ask: a TimeTracker APP on a Bike Tour ? why that ?
TimeTracker is a business app for Freelancers, small Companies or Enterprises and can run as a single APP or integrated into BES 10 (BlackBerry Enterprise Service). There are many TimeTracker APPs out there – so what’s different with this one ?
I implemented many features to support companies working international and as soon as you’re doing this: welcome to the hell of Date and Time and Timezones ! To make it more complex: a Company from Domain of Logistic with Service Employees working worldwide requests some features:
- Split tracked times on midnight if they go over night
- Employees should always enter local times (using the actual TimeZone where they’re working at customer site)
- The APP should detect if borders between countries will be crossed
I will focus on these topics in this article – of course it’s only a small part of the app. There will follow some more articles where I will talk about this app and present the solution I found for a native Blackberry 10 App developed with Cascades.
To know the current TimeZone I can ask the CalendarService and comparing the local time with UTC I’m getting the Timezone Offset. All tracked times always store the local time, TimeZone and TimeZone Offset. This allows me to calculate times to be displayed in local time for the employee and calculated internal as UTC. Using UTC also helps to avoid entering overlapping times.
Let’s start easy with the Bike Tour from Sunday. here you’ll see the local time (UTC +02:00 – the little sun icon tells you it’s the Summer Time – DST)
To calculate the Time was easy in this case where all happens in same TimeZone from Start to Finish.
What I wanted to test from this Bike Tour if tracking of GPS Position works well. Here’s what I got:
Start and Finish was tracked at the same place from GPS and there are also 12 Waypoints recorded from the tour. Of course you can show the locations on BlackBerry Maps and tapping on the Zoom you’ll get all the Waypoints listed with addresses.
This is a TimeTracker and not a GPS Tracker !
There are different Categories as Work-Time, Stand-By, Travel-Time, Break, … and for each Category in Settings the user can define if there should be GPS Tracking at Start, Finish, Both or continuosly, where continously meant every 30 minutes or so. A Category like Break will have no GPS Tracking to guarantee privacy.
Remember the customer request to know if borders are crossed ?
I’m using a little trick: Reverse Geocoding. From the tracked Coordinates I’m asking the reverse Geocoding Service for the address and this address includes the country name ! Comparing Country Names I know if they change and the Employee crossed a border. This information can be important for Travel Accounting. So it makes sense for international working employees for Category TravelTime to set GPS Tracking continously.
Let’s take a look at a more complex sample as my biking tour. Here’s a travel from Germany (TimeZone +02.00) to San Francisco (TimeZone -07.00). Normaly TimeZone details are hidden, but if you tap on the Earth Icon they become visible:
If you take a look at the calculated travel time (18 hrs 12 minutes) you’ll see that this was calculated from UTC.
The Employee entered the local time which makes sense and is easy to understand.
Taking a look at the tracked Locations:
TimeTracker detects different Country Names from Reverse Geocoding and knows that ‘Borders crossed’
So we know the Countries (can be more if Employees are driving with their Truck through more some Countries ) and we know correct Times and TimeZones and also the times as UTC.
But that’s not the end of the story ;-) If a Calendar is connected to the APP, for all tracked times also Calendar Events are created. If this Calendar is an Enterprise Calendar the synchronization will be done by BlackBerry 10 automatically so the Dispatcher always knows what his / her Service Employees are doing out there without waiting for the daily report.
TimeTracker knows about different TimeZones at Start and Finish, but Calendar uses the same TimeZone for a single Calendar Event:
For the Calendar Event I had to calculate the End Time for the TimeZone the Event started – in this case Germany.
- Employee – Local TimeZones: from 10:30 – 19:42 (same day)
- UTC TimeZone: from 08:30 – 02:42 (next day)
- Calendar – Local TimeZone at Start: 10:30 – 04:42 (next day)
To avoid misunderstandings TimeTracker adds some notes to the CalendarEvent to let the user know, it ends in reality at 19:42 same day.
TimeTracker can be customized through Settings. If using the Personal Edition, you can configure your own environment. For Group or Enterprise Editions the settings will be injected from your Manager. If using Group and Enterprise, reports can be sent and tracking details transmitted to the server.
Here we used some settings for Categories, connected Calendars and reverse Geocoding.
Details for Category Settings:
Calendar Status is set: ‘Out of Office’ and Location will be tracked contionusly every 15 Minutes.
Next weeks there will be some follow up articles and videos to explain the app in more detail. Perhaps you got a first feeling that it’s a difference if developing a simple TimeTracker as Consumer App or a more complex Business App ;-)
The app is optimized for Touch and Keyboard Devices, dark or light Theme, translated into different languages and easy to use.
I will also publish some source code abot the Date, Time and TimeZone handling to help other Cascades Business App Developers.
Next article I will talk about creating reports, HowTo sign reports from touch Screen and send out as formatted Mail.
Interested as a Business User ? CoMo Solution supports TimeTracker Enterprise Customers.