Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopsaheysa committed Mar 8, 2024
1 parent dee64bb commit a661390
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 7 deletions.
5 changes: 5 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.10.0
- Removed currentServerTime() method [(#139)](https://github.com/wultra/mtoken-sdk-android/pull/139)
- Improved operations handling [(#138)](https://github.com/wultra/mtoken-sdk-android/pull/138)
- Added Huawei notification support [(#136)](https://github.com/wultra/mtoken-sdk-android/pull/136)

## 1.9.0 (Jan 25, 2024)

- Added possibility for custom reject reason [(#130)](https://github.com/wultra/mtoken-sdk-android/pull/130)
Expand Down
46 changes: 46 additions & 0 deletions docs/Migration-1.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 1.9.x to 1.10.x

This guide contains instructions for migration from Wultra Mobile Token SDK for Android version `1.9.x` to version `1.10.x`.

## 1. Current Server Date

### Removed Functionality

The following calculated property was removed from the `IOperationsService` interface:

```kotlin
fun currentServerDate(): ZonedDateTime?
```

The `currentServerDate()` method provided a calculated property based on the difference between the phone's date and the date on the server. However, it had limitations and could be incorrect under certain circumstances, such as when the user decided to change the system time during the runtime of the application.

### Replace with

The new time synchronization directly from `PowerAuthSDK.timeSynchronizationService` is more precise and reliable.

Here is the updated test method for reference:

```kotlin
/** currentServerDate was removed in favour of PowerAuthSDK timeSynchronizationService */
@Test
fun testServerTime() {
var currentTime: ZonedDateTime? = null
val timeService = pa.timeSynchronizationService
if (timeService.isTimeSynchronized) {
val instant = Instant.ofEpochMilli(timeService.currentTime)
val zoneId = ZoneId.systemDefault()
currentTime = ZonedDateTime.ofInstant(instant, zoneId)
}
Assert.assertNotNull(currentTime)
}
```

## 2. Operations handling

API unified with iOS implementation. Instead of replacing list of operations every time `getOperation()` is called OperationsRegister is implemented to keep last fetched operations list and update it when necessary.


### Removed Functionality
`fun operationsLoaded(operations: List<UserOperation>)`
### Replace with
`fun operationsChanged(operations: List<UserOperation>, removed: List<UserOperation>, added: List<UserOperation>)`
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Remarks:
If you need to upgrade the Wultra Mobile Token SDK for Android to a newer version, you can check the following migration guides:

- [Migration from version `1.4.x` to `1.5.x`](Migration-1.5.md)
- [Migration from version `1.9.x` to `1.10.x`](Migration-1.10.md)


<!-- begin remove -->
Expand Down
14 changes: 7 additions & 7 deletions docs/SDK-Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

- `minSdkVersion 19` (Android 4.4 KitKat)
- `minSdkVersion 21` (Android 5.0 Lollipop)
- [PowerAuth Mobile SDK](https://github.com/wultra/powerauth-mobile-sdk) needs to be available in your project.

## Gradle
Expand All @@ -21,11 +21,11 @@ implementation "com.wultra.android.powerauth:powerauth-sdk:1.x.y"

## PowerAuth Compatibility

| WMT SDK | PowerAuth SDK |
|-------------------|---|
| `1.0.x` - `1.2.x` | `1.0.x` - `1.5.x` |
| `1.3.x` - `1.4.x` | `1.6.x` |
| `1.5.x` - `1.7.x` | `1.7.x` |
| `1.8.x` - `1.9.x` | `1.8.x` |
| WMT SDK | PowerAuth SDK |
|--------------------|---|
| `1.0.x` - `1.2.x` | `1.0.x` - `1.5.x` |
| `1.3.x` - `1.4.x` | `1.6.x` |
| `1.5.x` - `1.7.x` | `1.7.x` |
| `1.8.x` - `1.10.x` | `1.8.x` |


0 comments on commit a661390

Please sign in to comment.