-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android app? #4216
Comments
There is no reason you couldn't use XChange for an Android app. In fact, there is even a discussion somewhere here about migrating to java version>8, but people raised concerns about Android compatibility. If you want to develop an Android app and bring your experience here, it would be more than welcome. |
I see, I just read #2945 |
I do not know if it is the right place to post my question regarding an error I have been facing when trying to simply extract the ticker info from Kraken in my Android application. I am quite new in the Android world and might also have incorrectly imported the library but still thought it could be worth posting my issue here, as I have read that some incompatibilities have been faced with Java 11 (my application is based on a JDK 8). My import:
build.gradle (APP_NAME):
I have read your explanations regarding the dependencies to add in the My simple test code:
The error:
The error seems to be caused by the use of Is there anyway Please feel free to let me know if a new post should be created for my issue, if you would rather want me to post it on stackoverflow or would simply want me to delete it if it is a misunderstanding from my side. |
I haven't been playing with xchange and android for a while, but I see minsdk 23 and that is also API level of the device I was using for testing. It was working fine for me. I believe you are just missing desugaring, that deals with issues like this. |
Thank you for mentioning dependencies: compileOptions: This section helped me properly import |
Trying to create my Kraken instance of the Exchange object with a user name, API key and secret key, I got stuck with another problem apparently linked to the use of a java library which is not supported by Android API levels < 26. My code:
The returned error:
It appears that the library Since XChange has not been developed specifically for Android, I suspect I might face many similar issues. The easiest solution would be to directly modify the unsupported libraries, but I currently cannot do so, as I have imported XChange directly from Maven. Have you faced similar issues in the past ? Would you suggest to clone XChange instead and to import it as a module to be able to directly replace the unsupported library manually (this solution would require more work to update the library) ? Or am I still missing some essential libraries as for |
The only solution I found so far is to use a version of XChange prior to the use of |
From my experience I must say the best is to setup whole xchange project, build the latest snapshot on your local and set it as a dependency. Maven/gradle make it very easy to setup and then you can experiment with code changes within xchange itself. It was just way too often when I had to modify xchange code to get it working on android. You can also then easily submit pull request when it makes sense and to make the whole library more compatible with android. |
I am just wondering, why is there no android app using xchange on google play? Are there any legal or technical reasons why I cannot do that?
I'd like to use an app with this simple interface even if I have to make one, but in that case I might as well share it with the world :-)
The text was updated successfully, but these errors were encountered: