Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

4PX strategy and other fixes #23

Merged
merged 8 commits into from
Aug 6, 2020
Merged

Conversation

developerfromjokela
Copy link
Collaborator

  • Added 4PX strategy
  • Fixed bugs with CainiaoStrategy
  • CainiaoStrategy supports a status, when parcel hasn't been collected by post office. Added icon for that status
  • Fixed translations where they weren't present
  • Small fixes in update notifications

Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
This reverts commit ba9fb06

Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
 Changes to be committed:
	modified:   app/src/main/java/com/nitramite/courier/CainiaoStrategy.java
- Fixed bugs with CainiaoStrategy
- CainiaoStrategy supports a status, when parcel hasn't been collected by post office. Added icon for that status

Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
…tStyle for message, in order to see all of its contents by collapsing

Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
@norkator
Copy link
Owner

norkator commented Aug 5, 2020

I remember making fire warning app for fire departmen worker once but it was for old android os version. I was there able to receive SMS contents, sadly every each one of them as a privacy issue. I was somehow using broadcast receiver and some flag telling android os that this apps wants to receive sms.

@developerfromjokela
Copy link
Collaborator Author

Yes, I was reading somewhere that you can't set a Broadcast Receiver in Manifest because Android doesn't allow that.

@developerfromjokela
Copy link
Collaborator Author

What about the rest, 4PX? Is it fine?

@norkator
Copy link
Owner

norkator commented Aug 5, 2020

I need to go sleep now unfortunately so I review it tomorrow. :D obviously it will be great since your code has great all the time.

@developerfromjokela
Copy link
Collaborator Author

developerfromjokela commented Aug 5, 2020

Ok, good night 🌜

@developerfromjokela
Copy link
Collaborator Author

So how's the review going? 😁

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

Haha, I am still at my full time job, review starts after 5-6 pm today.

@developerfromjokela
Copy link
Collaborator Author

Oh, ok. I'll wait 🙂

@norkator norkator linked an issue Aug 6, 2020 that may be closed by this pull request
@norkator norkator added the enhancement New feature or request label Aug 6, 2020
norkator
norkator previously approved these changes Aug 6, 2020
Copy link
Owner

@norkator norkator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code ok

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

I tried with code found from aftership 420721289274890249338827578113 not sure does it work right

@developerfromjokela
Copy link
Collaborator Author

I can try in an moment

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

Aaa it works but cannot see events... got response:

{"result":1,"message":"操作成功","data":[{"channelTrackCode":null,"ctEndCode":"US","ctEndName":"America","ctStartCode":"CN","ctStartName":"China","duration":22.0,"queryCode":"420721289274890249338827578113","serverCode":"420721289274890249338827578113","shipperCode":"302744164149","status":1,"tracks":[{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1596587400000,"tkDesc":"Missent","tkLocation":"Bull Shoals,AR","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1596581640000,"tkDesc":"Arrival at unit","tkLocation":"Bull Shoals,AR","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1596054346000,"tkDesc":"Tendered for delivery","tkLocation":"Memphis,TN","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1596047727000,"tkDesc":"Dn received","tkLocation":"Memphis,TN","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1595909574000,"tkDesc":"Dn send","tkLocation":"Melrose Park,IL","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1595865650000,"tkDesc":"Encoded","tkLocation":"Melrose Park,IL","tkTimezone":null},{"tkCategoryCode":null,"tkCategoryName":null,"tkCode":null,"tkDate":1595865634000,"tkDesc":"Received","tkLocation":"Melrose Park,IL","tkTimezone":null},{"tkCategoryCode":"D","tkCategoryName":"","tkCode":"FPX_D_STPP","tkDate":1595692800000,"tkDesc":"In transit, it's progressing through post network","tkLocation":"ORD","tkTimezone":""},{"tkCategoryCode":"M","tkCategoryName":"","tkCode":"FPX_M_ATA","tkDate":1595587860000,"tkDesc":"Arrived at the destination airport","tkLocation":"ORD","tkTimezone":"UTC-06:00"},{"tkCategoryCode":"I","tkCategoryName":"","tkCode":"FPX_I_RCUK","tkDate":1595486280000,"tkDesc":"Released from customs: customs cleared.","tkLocation":"ORD","tkTimezone":"UTC+02:00"},{"tkCategoryCode":"M","tkCategoryName":"","tkCode":"FPX_M_DFOA","tkDate":1595445720000,"tkDesc":"Shipment departed from airport of origin country","tkLocation":"CAN","tkTimezone":"UTC+08:00"},{"tkCategoryCode":"M","tkCategoryName":"","tkCode":"FPX_M_AAHK","tkDate":1595245440000,"tkDesc":"Arrived at hong kong hub.","tkLocation":"ORD","tkTimezone":""},{"tkCategoryCode":"C","tkCategoryName":"","tkCode":"FPX_C_ADFF","tkDate":1595066029000,"tkDesc":"Depart from facility to service provider.","tkLocation":"Shenzhen,China","tkTimezone":"UTC+08:00"},{"tkCategoryCode":"C","tkCategoryName":"","tkCode":"FPX_C_SPLS","tkDate":1594797034000,"tkDesc":"4px picked up shipment.","tkLocation":"Shenzhen,China","tkTimezone":"UTC+08:00"},{"tkCategoryCode":"C","tkCategoryName":"","tkCode":"FPX_C_AAF","tkDate":1594797034000,"tkDesc":"Shipment arrived at facility and measured.","tkLocation":"Shenzhen,China","tkTimezone":"UTC+08:00"}]}],"tag":"14"}

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

image

@developerfromjokela
Copy link
Collaborator Author

Let me check where does that null pointer occur

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

Yes no problem! I go do other things, will get back soon again. I release update when all is fine.

@developerfromjokela
Copy link
Collaborator Author

Ok. Found out that those didn't have tkCodes. I've managed to extract what parcel's statuses mean, and now did "delivered" detection properly.

Meanwhile I also did the issue #24, commit coming shortly

@developerfromjokela
Copy link
Collaborator Author

And did this empty view in archive and main menu, because in my opinion, it's great user experience when you see the app telling that list is empty:
Screenshot_1596732546
Screenshot_1596732623

Signed-off-by: developerfromjokela <developerfromjokela@gmail.com>
@norkator
Copy link
Owner

norkator commented Aug 6, 2020

🥇 Two people here looking this "small" but really big user experience affecting change. I tested it out, very very nice addition. Also 4PX events are loading! 🥇 👍 super work!

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

image
nice!

@norkator norkator merged commit 0df2562 into norkator:master Aug 6, 2020
@norkator
Copy link
Owner

norkator commented Aug 6, 2020

Release is out.

@developerfromjokela
Copy link
Collaborator Author

Excited waiting the update become live in Google Play 😆

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

Mee too!

@developerfromjokela
Copy link
Collaborator Author

But why does the play store say that this app contains ads? Does it? I haven't seen so far any of them

@developerfromjokela
Copy link
Collaborator Author

Kuvakaappaus 2020-08-06 23-06-31

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

There was ads long time ago till decided to remove them because too annoying for app like this. I updated developer console details and set it not to have ads.

@developerfromjokela
Copy link
Collaborator Author

Ok.

@ristomatti
Copy link
Collaborator

Great work! The new "empty" screens make a lot more polished look and improve user experience. 👍

@ristomatti
Copy link
Collaborator

But why does the play store say that this app contains ads? Does it? I haven't seen so far any of them

There used to be this "view an ad" button on the about view (or menu). I'm too lazy to check if it's still there but if it is, I'd assume that'd cause Play Store to display the message. Or maybe it's in the XML manifest or similar? Although I'm a long time Java developer I don't have direct Android experience, only through React Native...

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

But why does the play store say that this app contains ads? Does it? I haven't seen so far any of them

There used to be this "view an ad" button on the about view (or menu). I'm too lazy to check if it's still there but if it is, I'd assume that'd cause Play Store to display the message. Or maybe it's in the XML manifest or similar? Although I'm a long time Java developer I don't have direct Android experience, only through React Native...

Those are deleted and soon play store should not show that because I had toggle on contains ads at play store.

@ristomatti
Copy link
Collaborator

That might even boost interest. Especially as Posti's own app has started displaying inline adds between tracked packages which I find quite annoying. Especially as a new ad sometimes appears when refreshing the statuses if the previous one has been cleared...

@norkator
Copy link
Owner

norkator commented Aug 6, 2020

That might even boost interest. Especially as Posti's own app has started displaying inline adds between tracked packages which I find quite annoying. Especially as a new ad sometimes appears when refreshing the statuses if the previous one has been cleared...

That is good news that they first create great app and now kill it slowly with ads

@ristomatti
Copy link
Collaborator

Yep but it still has some advantages that I doubt can be implemented by a third party unfortunately. For example on home delivery packages they'll inform you through the app day or two before and allow selecting if you want the package delivered home or to a Posti pickup point of your choosing.

Another less important but also useful feature is that you'll see some of the tracked packages appearing automatically. Occasionally when buying something from let's say AliExpress, the tracking code might change midway without the seller knowing about it. I doubt they offer an API for this either?

These reasons are why I have the app installed although I primarily use PS for tracking (not to mention logging/archiving and support for other couriers).

@developerfromjokela
Copy link
Collaborator Author

"For example on home delivery packages they'll inform you through the app day or two before and allow selecting if you want the package delivered home or to a Posti pickup point of your choosing."

Is this possible to do in their website or outside their app? And does that require some kind of authorization?

@ristomatti
Copy link
Collaborator

ristomatti commented Aug 7, 2020

Is this possible to do in their website or outside their app? And does that require some kind of authorization?

I believe there might be just a simple SMS if I wasn't registered on their app actually. Definitely there has to be another way to pick the location. Might be possible to do also in Netposti site which is pretty much the same as the app but haven't looked as it's more convenient from the push notification...

For my second point the alternative to new packages appearing automatically (strangely happens only with some deliveries) would be to wait for the paper note to arrive when the package can be picked. As we all probably know it will often delay things for one day.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4PX Express support
3 participants