Giter VIP home page Giter VIP logo

kin-ecosystem-android-sdk's Introduction

Kin Ecosystem Android SDK

What is the Kin Ecosystem SDK?

The Kin Ecosystem SDK allows you to quickly and easily integrate with the Kin platform. This enables you to provide your users with new opportunities to earn and spend the Kin digital currency from inside your app or from the Kin Marketplace offer wall. For each user, the SDK will create wallet and an account on Kin blockchain. By calling the appropriate SDK functions, your application can performs earn and spend transactions. Your users can also view their account balance and their transaction history.

Usage and Installation

For full details, visit the documentation on our web site:

Documentation

License

The kin-ecosystem-android-sdk library is licensed under the MIT license.

kin-ecosystem-android-sdk's People

Contributors

aliasadi avatar doc999tor avatar doodyparizada avatar liorama avatar nitzantomer avatar orenzak avatar shayb avatar yohaybar avatar yosriz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kin-ecosystem-android-sdk's Issues

Question about the getUserLoginState, setJWT and logout methods

Hi @OrenZak , I have a question about the getUserLoginState, setJWT and logout methods

In Kin.login(JWT) method, you use AuthRepository.getInstance().getUserLoginState(JWT) to check the loginState. If the input user_id or device_id in jwt are different with the cached data, the logout method will be invoked.

But the cached data will not be clear if Kin SDK is not logged in before because the result of isAccountLoggedIn.compareAndSet(true, false) is false in logout method.

For example, user use user_id_1 to get jwt_1 and auth_token_1 and login Kin Successfully, then he logout app without call Kin#logout(developers forget to call Kin.logout when logout app's account) and kill app. In next time he use user_id_2 to try to login, but SDK will use user_id_1's authToken to try log in because user_id_1's authToken is not expired.

Native Earn

Native earn option throws following exception

com.kin.ecosystem.common.exception.ServiceException: The Ecosystem server returned an error. See underlyingError for details

kin sdk conflicts with com.android.support:gridlayout-v7

simply adding
implementation ('com.github.kinfoundation.kin-ecosystem-android-sdk:sdk:0.1.+')
causes the following when compiling my app
AAPT: error: duplicate value for resource 'attr/orientation' with config
AAPT: error: resource previously defined here.
(with a reference to a gradle cache file containing the definition of KinEcosystemDashView

:-(

update: it's a conflict with
implementation ("com.android.support:gridlayout-v7:27.1.1")

NPE in Kotlin branch

If you click the Transaction History when the spend offers is not loaded, it will occurs KotlinNullPointerException.

See the log below:

kotlin.KotlinNullPointerException
    at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter.syncOffers(MarketplacePresenter.kt:235)
    at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter.access$syncOffers(MarketplacePresenter.kt:32)
    at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter$getOffers$1.onResponse(MarketplacePresenter.kt:205)
    at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter$getOffers$1.onResponse(MarketplacePresenter.kt:202)
    at com.kin.ecosystem.core.data.offer.OfferRepository$2.onResponse(OfferRepository.java:78)
    at com.kin.ecosystem.core.data.offer.OfferRepository$2.onResponse(OfferRepository.java:73)
    at com.kin.ecosystem.core.data.offer.OfferRemoteData$1$2.run(OfferRemoteData.java:57)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5254)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Location tracking app earn opportunities

I would like to add my Android app to the Kin Ecosystem. I have read the documentation for the Kin Ecosystem Android SDK. I want to make sure I am on the right track. My app tracks user location outdoor/indoor and performs location analytics on user location history. Unlike other LBS apps no user location data leaves the device (phone). The app does not rely on the cloud to do its work.

My initial thought is to offer users of my app kin earn opportunities if they allow my app to track their location, and additional kin earn opportunities if they allow the app to perform location analytics on their location information. Does this make sense? Are there other earn opportunities related to location data and analytics?

It's not clear to me how I would add to my app the function to let users sell their location data and analytics in the Kin Ecosystem. I would appreciate thoughts on this.

I would also appreciate it if anyone would let me know about other location related applications currently in the Kin Ecosystem.

Thanks,

Alex Donnini

P.S. I posted this question on Stack Overflow too

Questions about the SDK

Hi,

We were wondering what exactly is included in the SDK. Does it provide UI components for things like user balance and transactions?

We're looking to use this package in a React Native app and are wondering how much work it would be for us to rewrite it in Javascript. Can all actions be accomplished via API calls to the server? What does this package add beyond that?

FileProvider conflicts with other SDKs

I am having issues with the current FileProvider implementation in your SDK when another SDK uses FileProvider too:

:app:processDebugManifest

> Manifest merger failed with multiple errors, see logs

......./android/app/src/main/AndroidManifest.xml:15:13-60 Error:
	Attribute provider#android.support.v4.content.FileProvider@authorities value=(com.troutloud.dvel.provider) from [:react-native-image-crop-picker] AndroidManifest.xml:15:13-60
	is also present at [com.github.kinfoundation.kin-ecosystem-android-sdk:recovery:0.2.0] AndroidManifest.xml:14:13-61 value=(com.kin.ecosystem.recovery).
	Suggestion: add 'tools:replace="android:authorities"' to <provider> element at AndroidManifest.xml:13:9-21:20 to override.
......./android/app/src/main/AndroidManifest.xml:20:17-55 Error:
	Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:react-native-image-crop-picker] AndroidManifest.xml:20:17-55
	is also present at [com.github.kinfoundation.kin-ecosystem-android-sdk:recovery:0.2.0] AndroidManifest.xml:19:17-60 value=(@xml/file_provider_paths).
	Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.

I created a fix, PR is on its way.

NPE when click "Kin Balance" in MarketPlace

If you click "Kin Balance" quickly in MarketPlace when "Earn/Spend" is not displayed, kin will crash. Here is the log:

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.kin.ecosystem.marketplace.view.SpendRecyclerAdapter.setEmptyView(android.view.View)' on a null object reference
at com.kin.ecosystem.marketplace.view.MarketplaceFragment.setupEmptyItemView(MarketplaceFragment.java:125)
at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter.setupEmptyItemView(MarketplacePresenter.java:245)
at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter.access$100(MarketplacePresenter.java:43)
at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter$2.onResponse(MarketplacePresenter.java:230)
at com.kin.ecosystem.marketplace.presenter.MarketplacePresenter$2.onResponse(MarketplacePresenter.java:227)
at com.kin.ecosystem.core.data.offer.OfferRepository$2.onResponse(OfferRepository.java:78)
at com.kin.ecosystem.core.data.offer.OfferRepository$2.onResponse(OfferRepository.java:73)
at com.kin.ecosystem.core.data.offer.OfferRemoteData$1$2.run(OfferRemoteData.java:57)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

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.