The on boot complete android feature is tricky, it allows
very little in the actual callback and the strategy that works
best now is to make that callback schedule a single background
run, which will in turn plan the normal schedule.
Or insta-exit if the user had no wish to do background running.
This additionally also triggers on the my-package-replaced
signal in order to ensure that an upgrade doesn't disrupt the
background running schedule.
We re-introduced a checkbox to enable notifications.
We now have a second type of notification, one for incoming transactions
that may happen when the app isn't in the foreground.
The text now special cases several common occasions that gave confusing
texts.
We additionally fix the position of the "+" sign to be behind the
currency symbol, like it was always supposed to be.
The public methods have been changed to group the types of method
together.
There is a group for transaction properties, a group of other
properties, a group of utility functions and a group of wallet
management functions (for things like private keys and the like).
We remove the block notification feature, as that was nice but useless.
This instead introduces a way for a transaction we created to be marked
as needing monitoring and when a block comes in we create a notification
explaining it has been mined.
If the user closes the UI before the broadcast has completed, we would
stop broadcasting. Which is unfortunate and not what users expect.
As such we simply hold on to the object for a while (10 min) before we
delete it when it is quite likely already sent.
Notifications should have the opportunity to skip the OS layer and
simply be shown in-app instead in case the application has the users
attention anyway.
While knowing a notification should be sent to the system tray
otherwise.
This moves the fetching (by dns) of the servers to the launch of Pay
instead of at the start of the module.
This periodically removes punishment scores in order to reassess remotes
and have long health guarentee.
This also works harder to find any servers even if all have a higher
punishment somehow.
This adds the ability to paste an almost correct seed phrase, for
instance when the last word is cut off.
We also provide a new UI to propose words while typing the seed,
allowing the user to tap on the words instead of having to finish typing
them.
The group separtors (aka thousand-separtor) as used by the system locale
are used to format the string now, and we upgraded this to use UTF16 in
order to avoid problems when they are not ascii.
After setting, check if it was approved by the user, and if not
unset the checkbox again.
Bugfix:
On some Android implementations, setting this value opens a screen
even if the value is already set, while on many others that is a no-op
as you'd expect.
So for those phones we check first before we set.
This removes the Qt middle-man for requesting the camera permissions
and we just code this in our own Java class.
This solves the issue we observed where after the approval of the
user we didn't actually manage to start the camera on some phones.
This avoids using the Qt intermediate and just directly uses
the Android side, including some extra checks like "screen off".
Rework the various methods in a class.
This makes the various android support features be less hacky and instead
are based on a single class with Qt signals and slots.
We also remove the ping feature for checking online state, since Android
seems to throw a random exception (calling virtual method on null pointer
java.lang.String.size) somewhere in the OS libs when you call it the
second time.
This also implements the AIRPLANE_MODE_CHANGED listener to instantly turn
off internet the moment the user enables flight mode.
The power management turns off the network layer 90 seconds after
the application stops being in the foreground.
At least, that is what it is programmed to do. Unfortunately the
signals we listen to are not reliable across devices and many users
are reporting that this is triggered 90 seconds after start.
For now, turn off the saving feature in order to make sure that
the app operates normally for normal people.
In some locales the group separator is a unicode character that does not
fit in an 8 byte string, causing misrenderings.
We now assume that things fit in 16 bit characters which should fit all
living languages.
The Android system is so strict in its power management that a simple
request to have Pay run in the background at night for 20 seconds it is
required to completely turn off powermanagement for the app. An overkill
solution, but that is how it works now.
A nice history:
https://medium.com/its-tinkoff/android-background-restrictions-
b63e73fe508
Side-effect is that if the user granted the turning off of power
management we now have to add code to do it inside the app.
This commit checks when the app is hidden (screen turned off, other app
became front etc) then we wait for a timeout and then terminate
ourselves in order to avoid using more CPU.
This is the only useful notification type we have today,
but at least it allows the user to explicitly go and request
notifications from the Android OS.