Site icon Pocketables

How I created a notification add-on for a postal tracking app using Tasker

tasker-postenThe official app for the Norwegian postal service is decent, but it’s lacking one feature that I’ve wanted for ages: the ability to check for tracking updates in the background and create a notification if there is one. I finally had enough of waiting for it to be added officially, so I sat down and created one in Tasker.

I won’t go into everything in detail, but just briefly go through how it works. The methods used can be used elsewhere as well, and it should be possible to do something similar with other tracking apps.

The task is as follows:

In human terms, this is what happens: Every morning, the task finds the tracking numbers that are currently in the official app, and tracks them online. Then it looks to see if there’s a file for each number in a specified folder. If there isn’t, it means it’s the first time it’s seen that number, and creates that file. If there is, it compares the information in that file with what it found out from tracking the numbers, and sees if there are any changes. If there are any changes, it creates a notification, and puts that new information in the file. Then, next time it runs, it will compare the status to that information, and so on. That way, it will create a notification every time the status of the shipment has changed.

because it uses the official app’s database of tracking numbers, it’s truly an add-on to that app, and doesn’t require me feeding it tracking numbers or anything like that separately. I tried various scenarios to look for bugs, and haven’t found any yet, but only time will tell if that’s truly the case. In any case it was a fun little project, and it sure took less time than waiting for the official app to get the feature.

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Exit mobile version