Releases: kinecosystem/kin-ecosystem-android-sdk
Gifting API
- We added a new Gifting API that allows you to open a gifting dialog and send a gift to another user, see more here.
- New page - not enough page will appear if the user clicks on an offer he could not afford at the moment.
- Fix for letter spacing on marketplace offers.
Reliability Improvements
- Update
kin-migration-module
to the latest version 1.0.8 - this version introduced a new header on all of the internal requests. - Minimize BI events with "blank"/"null" error reasons.
New API and New Backup&Restore UI
New API - Kin.addAllNativeOffers(List<NativeOffer>)
Now you can add multiple offers with one API call, this will allow you to add a bulk of offers right away.
As we built this API, we added to NativeOffer
a new parameter: dismissOnTap
.
This value represents the same meaning as before on Kin.addNativeOffer(nativeOffer, dismissOnTap)
, whether we should close the Marketplace after current nativeOffer
was clicked or not.
Kin.addNativeOffer(nativeOffer, dismissOnTap)
is deprecated and you can use: Kin.addNativeOffer(nativeOffer)
.
We also changed the offers serving order in the marketplace(MP) as follows:
- MP tutorial is first (if it exists), before the native offers
- Native offers are displayed before MP offers (polls/quizzes)
- MP earn offers (polls/quizzes) are ordered by price (high to low)
- All native offers will be displayed by the order you add them.
- Regardless if the offers are added one by one or as a list the offer/list will be pushed to the top.
- If the offer already exists and you add it again, the original offer will be kept at the same position and will be updated with the new data.
New Backup&Restore UI
We updated the UI according to the new Kin guidelines.
This module supports the new KinTheme
also includes a LIGHT
and DARK
mode. It will be applied as you will choose the theme to the SDK on Kin.initialize(Context, KinTheme)
.
Stability Improvements
- Onboarding and Marketplace empty state illustrations were updated
- Small UI bugs fixes
- The new UI BI was Updated
- Crash fixes:
- EcosystemActivity
setTheme(...)
after process restart - Initialize navigator after process restart
- EcosystemActivity
Stability Improvements
Crash fixes:
- Marketplace recycler adapter inconsistency
- Activities orientation on Android O
Improvements:
- Remove offer image background placeholder after the image was loaded.
New UI
Updated the overall UI according to the new KIN brand guidelines.
We added support for a dark theme. You can set the theme when initializing the SDK.
Kin.initialize(context, KinTheme.DARK)
This version supports the new Kin blockchain and includes the migration module
Kin Blockchain Migration
Added support to both KIN2 and KIN3 as well as the migration module that helps switch between them.
Once you implement the SDK we will decide together on migration date.
Until we switch to KIN3 the SDK will work as it does today on KIN2.
Once we switch to KIN3, we ask that you provide a wallet that will be the target for all spend offers.
The migration will be triggered remotely on a specific date.
The client will be updated about the new blockchain version in two possible ways:
- For most users, the migration will happen in the background, on the next call to
Kin.login
. - For users who have already logged-in, and the SDK’s
Kin.login
isn’t called, The migration will be triggered on access to any SDK function. The SDK will start the migration and at the same time, an error will return to the callback (BLOCKCHAIN_ENDPOINT_CHANGED
).
When you will retry again after a few seconds the function will succeed using the newly migrated wallet.
Stability Improvements
- Added new native earn BI events
- Updated BI endpoint to support China.
- Move KIN between apps,
AccountInfoActivity
crash fix.
Backup and Restore Deeplink
Launch Backup and Restore Flows
We added the option to open backup and restore flows directly without showing the marketplace.
See more information on how to launch the backup and restore experience
Account's Wallet Ready
Up until now, the Kin.login(…)
API would have returned a successful response before the account's wallet was created.
From now on the successful response will return only once the account's wallet is ready to be used.
Bug Fixes and Improvments
- Check if
device_id
was changed duringKin.login(…)
- Added backup failed BI event
- Updated
ServiceErrorCodes
:USER_NOT_FOUND = 5004
is handled correctly now. Added new oneUSER_HAS_NO_WALLET = 5006
.
NowKin.payToUser(…)
API will returnUSER_NOT_FOUND
as an error code if the account is not found, and you can skip the call toKin.hasAccount(…)
and handle the exception on the callback.
Multiple wallets, users and devices support
Multiple Users
In order to support multiple users, we made minor changes to the JWT structure you provide on the SDK API's.
Under the Payload
section, the JWT should also include a device_id
, also user_id
is no longer optional.
See more on :
- Generating the JWT Token
- Creating a User’s Kin Account - login and logout.
- Requesting Payment for a Custom Earn Offer - custom native earn offers.
- Creating a Custom Spend Offer - custom native spend offers.
- Creating a Pay To User Offer - p2p transactions.
How it works
We create a map between kin_user_id
and all of his used wallets.
If user A is logged in and there are no wallets on his device, we will create a new one for him and add it to the mapping.
If user A is logging out and user B is logging in instead, the same will happen, if there are any wallets related to this user, we will load the last one used.
In order to support this behavior, you should call to Kin.logout()
if you want to log out from the current user.
This allows you to switch between users, so each will have their own wallets and not share one across users.
Support receiving Kin from external apps
SDK includes a target activity that can be open by other external apps using an explicit intent.
The user must approve accepting Kin from the external app.