Coder Social home page Coder Social logo

norkator / paketin-seuranta Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 5.0 3.09 MB

Privacy preserving parcel tracking application for Android supporting multiple parcel courier companies. App is targeted in Finnish market. Standalone app, no private backends, tracking or overkill infrastructure. No ads or paid content.

Home Page: https://play.google.com/store/apps/details?id=com.nitramite.paketinseuranta

License: MIT License

Java 100.00%
paketin-seuranta android finland courier-tracking parcel-tracking parcel-finland privacy-preserving privacy parcel tracking

paketin-seuranta's Introduction

Paketin-Seuranta-title-promo

Paketin Seuranta

Paketin Seuranta on pitkän historian omaava eri kuriirien toimitusten seuraamiseen tarkoitettu Android sovellus. Sovelluksen kohdeyleisö on Suomessa mutta pidetään repositorio yleisesti Englannin kielellä.

Paketin Seuranta is free application, no ads or paid content ever!

Table of contents

Help required

I am looking for help to develop this application further and maintain existing functionalities. If you are interested let me know, contact me via email: [email protected]

Development areas are: bug fixes, user interface, more tracking methods, better cleaner code and basic maintenance. Somebody with material design ui experience is especially welcome.

Anyone with less or more coding experience is welcome. Norkator moderates that any contribution will be respected so no need to be scared to contribute.

Android app: https://play.google.com/store/apps/details?id=com.nitramite.paketinseuranta

Dev environment

Prerequisites

  • Download latest Android Studio
    • Follow it's normal installation instructions.

Installing

Steps to get development environment running

  1. git clone https://github.com/norkator/paketin-seuranta.git or use gui like Github Desktop
  2. Open Android studio
  3. Click File -> Open -> Select project root containing app folder.
  4. Download all required SDK etc files. Android Studio automatically installs all required packages.
  5. Happy developing!

Adding new courier

Good sample PR of such case is #116

  1. Creating parcel courier logos. I have been using following tool: https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
  2. Add new courier strategy at /com.nitramite/courier folder. Use others existing ones as sample.
  3. Add carrier with new id at CarrierUtils see others as sample. Use unique integer id! and add created icon.
  4. Add carrier to UpdaterLogic class.
  5. Add carrier to setCarrierSpinnerData at FragmentTrackedDelivery.
  6. Add carrier to CarrierDetectorTask if you want this new carrier is part of automatic detection tool.
  7. Should now be available for use.

For participants

  1. Let's keep Paketin Seuranta simple and respect privacy.

  2. No private servers /backends meaning only direct communication to parcel service provider apis.

  3. I norkator will review and test pull requests. If everything looks and works according to rules pr will be merged. Otherwise I ask changes. Just give me time. This repo is not dead.

Versioning

We use Semver versioning

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when incompatible API changes are made,
MINOR version when backwards compatible features are added,
PATCH version when backwards compatible bug fixes are made.

Note that as a contributor you do not need to take versioning into account as the author Norkator is responsible of that.

Author

  • Norkator - Initial work, code owner - norkator

Contributors

  • Ristomatti Airo - Tons of ideas and project management
  • Developer From Jokela - Code improvements, upgrades, Firebase Cloud Messaging integration
  • CostelliGraphics - New app logo

License

MIT

paketin-seuranta's People

Contributors

dependabot[bot] avatar developerfromjokela avatar masaseta avatar norkator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

paketin-seuranta's Issues

Improvement: Maybe we should switch from ListView to RecyclerView?

ListView is now old, Google itself recommends using RecyclerView.

I've seen in the app when I archive something, the courier Icon spacing gets messed up. I suspect that to the ListView.

Also if my list is able to scroll down, when trying to scroll up, swipe-to-refresh always hits me.

Improve PostNord tracking

  • Sizing details are not parsed.
  • Sender details are not parsed.
  • Recipient details can maybe be parsed too.

Change theme based on phone settings

Somebody in ratings/reviews asked:

"I also noticed that the application lacks the so-called theme selection. automatic switching, ie that the application follows the theme setting of the user's phone (dark / light)"

Clean phasing

Fix notification repeating problem on some companies. Related to TRANSIT phase which should be converted to IN_TRANSPORT

Last updated label

It will be very nice to have a 'Last updated' label on the main screen.

I'll implement it if I'll have time.

4PX Express support

Today I've come across an tracking number that doesn't get tracked in Cainiao. Instead it's 4PX.

Here's their API:
URL: http://track.4px.com/track/v2/front/listTrack
Method: POST
POST Data: (JSON) : {"serveCodes":["<TRACKING_CODE>"],"language":"en-us"}
Respose:

{
  "result": 1,
  "message": "操作成功",
  "data": [
    {
      "ctEndCode": "FI",
      "ctEndName": "芬兰",
      "ctStartCode": "CN",
      "ctStartName": "**",
      "duration": 1,
      "queryCode": ""<TRACKING_CODE>",
      "serverCode": "<TRACKING_CODE>",
      "shipperCode": "302772171691",
      "status": 1,
      "tracks": [
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_ADFF",
          "tkDate": 1595979339000,
          "tkDesc": "Depart from facility to service provider.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        },
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_AAF",
          "tkDate": 1595897534000,
          "tkDesc": "Shipment arrived at facility and measured.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        },
        {
          "tkCategoryCode": "C",
          "tkCategoryName": "",
          "tkCode": "FPX_C_SPLS",
          "tkDate": 1595897534000,
          "tkDesc": "4PX picked up shipment.",
          "tkLocation": "深东凤岗仓",
          "tkTimezone": "UTC+08:00"
        }
      ]
    }
  ],
  "tag": "12"
}

I an not sure what is the tkCode, it seems to be an "ID" for the event. I haven't yet found a list or array in 4px tracking website that would be helpful in integration

CursorIndexOutOfBoundsException

image

This kind of bug is very high on crash logs.

Another crash log has similar point but onOptionsItemSelected different
at com.nitramite.paketinseuranta.Parcel.getParcelItems (Parcel.java:412)
at com.nitramite.paketinseuranta.Parcel.onOptionsItemSelected (Parcel.java:954)

Problem with notifications, user notified

"Olen tässä jokin aika sitten kiinnittänyt huomiota, että sovellus ei lähetä ilmoituksia paketin kulussa tapahtuvista muutoksista. Mistä voisi johtua? Huawei p30 Puhelimena. Sovellus on suojattua ja näin ollen on auki taustalla kokoajan."

I asked settings first to know how they are setup.

Backup is broken on Android 10

The storage permission system/API's changed on Android 10. Since my phone upgraded to it I haven't been able to do backups.

Error I'm getting says "Varmuuskopion otto epäonnistui. Tämä tapahtuu joskus kun sovellus ei ilmeisesti ehdi luomaan kansiota. Yritä uudelleen niin toiminnon pitäisi onnistua." However retrying does not help. I believe the permission would need to be requested in place and the file storage probably done using some new API.

Issues with an empty package

After adding a new package for tracking an empty package had appeared above it. It might have something to do with the fact I had the phone screen off for quite some time before realising I forgot to save it(?)

I then I noticed packages cannot be removed from the list anymore. It didn't seem to matter if it was the empty package that appeared by itself or some another another one with some fields filled in.

Yanwen tracking broken again?

Tracking code VR344217874YP can be found from Yanwen's own tracking (and also ParcelsApp tracking finds it) but PS doesn't detect the courier and is unable to fetch any details if Yanwen is manually selected.

Push Message interval

Hello,

I've set my update interval to 0, which matches the server's cron job.

How is the cron set up? What's the interval there? 5 minutes?

Having no ads or in app boughts affect on visibility

I have feeling around Google Play that apps having no google ads or in app boughts wont be pushed by google as hard as ones having them.

Same happens with youtube videos.

Should we have even in app donate button?

Release 2.1.6

I will make new release which must include all linked pull requests functioning at acceptable rate.

Testing and new release

  • What happens if push notification kicked update is run if no packages on list, ignored?
  • What else?

Make release if testing shows green light.

A better way to notify about parcels statuses

Hello,

I was looking at the source code, and there's some requests to your server for Finland Post. Can you make that open source, so we can improve things there?

I was planning to add push notifications, because starting from Android 8.0, background threads are getting killed after a short time of running. Because of this, app's notifications aren't working. 😄

We can implement the server to push messages every x minute to check the parcels status. So the background threads will not be needed.

AppCompat does not support the current theme features

Crashes on Android 4.4.2 minSdkVersion 16

Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }

UPS tracking broken again?

UPS doesn't seem to work. Cainiao does pick up the code but does not show the pickup location (I'm not sure if that's available outside of their own site though). Example code sent via Trello.

Jenkins pipeline development

image

Current pipeline is following. Here taking ideas what to possibly add in the future.

Only master branch will go thru Deploy stage.

Cainiao Parcel marked as invalid, if destCountry is null

There is an issue with the Cainiao parcels, if destination country is for some reason null, it marks it as invalid package, when the API reports back parcel's details. Cainiao's API gives back a success boolean, I think it's better to use that instead.

Make debugging feature for users

We have problems like notifications not working at least for one user and finding problem is hard.

  • Make view which open behind "debug" button from menu or something.
  • View should have at least notifications debug feature which looks all needed features existence to be able to show notifications and find possible problem.
  • Also add method to show sample notification to test notifications that way (yes not related to firebase directly)

Choosing different license

Would be better to change software license to more open one. But what would be okay for project like this.

Notifications are slow

@developerfromjokela do you notice that notifications come with big delay when set to 0 or anything else

I checked server push notification crontab config and it was every 5 mins and I dont find any setting from firebase which would like to affect this. I am thining is this only one user problem.

Fix manual language change feature

"Nyt uusimman päivityksen jälkeen sovelluksen kielen vaihto ei toimi enää ollenkaan. Aluksi kieli näkyy oikein, mutta heti kun sovelluksessa klikkaa jotakin muuttuu kieli suomeksi." <-- Android 10, device lang Finnish but overrided to English from app settings. Won't work. This implementation seems to be breaking on every new Android so better remove this and do as Google wants, meaning always follow device language. I find this causing non wanted work.

Jenkins pipeline for Google Play release

This is task for myself

Create Jenkins pipeline which automatically:

  1. When new tag is made.
  2. Jenkins builds new application apk from master branch.
  3. Automatically dumps it into Developer Console and makes release.
  4. Uses tag description contents as release notes?

Reason: releasing is boring work which can be automatized.
We don't have tests written so can ignore that for now.

Pull to refresh too eager after using sideways swipe

Pull to refresh does no more trigger when just scrolling up, so that is fixed. For some reason the same problem resurfaces if I swipe a parcel on the list first. It doesn't even need to complete any action, just peek "delete package" action a bit and then scroll up.

Android 10 yet again.

All packages with phase WAITING show customs icon

Special icon for packages waiting for customs declaration was my feature request but it's appeared the logic to show it on WAITING phase doesn't seem to be adequate. WAITING phase seems to be used also for packages waiting for pickup from the sender.

Maybe this could be fixed with an additional check for the delivery status? Unfortunately I don't have any such package right now to get the status text but I have one bigger package from China coming and it likely will get stuck in customs. I can update the issue if/when that happens.

X509TrustManager vulnerability - deadline given, app removal warning

Security alert

Your app is using an unsafe implementation of the X509TrustManager interface with an Apache HTTP client, resulting in a security vulnerability. Please see this Google Help Centre article for details, including the deadline for fixing the vulnerability.

Vulnerable classes:

com.nitramite.courier.ArraPakettiStrategy$1
com.nitramite.courier.CainiaoStrategy$1
com.nitramite.courier.DHLActiveTrackingStrategy$1
com.nitramite.courier.DHLAmazonStrategy$1
com.nitramite.courier.DHLExpressStrategy$1
com.nitramite.courier.FedExStrategy$1
com.nitramite.courier.GlsStrategy$1
com.nitramite.courier.MatkahuoltoStrategy$1
com.nitramite.courier.PostNordStrategy$1
com.nitramite.courier.PostiStrategy$1
com.nitramite.courier.UPSStrategy$1
Please fix the issue before: 10/08/2020

Affects APK version 119.

"After the deadlines shown in your Play Console, any apps that contain unfixed security vulnerabilities may be removed from Google Play."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.