GithubHelp home page GithubHelp logo

coinbase-android-sdk's People

Contributors

aianus avatar lkorth avatar sds 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

coinbase-android-sdk's Issues

Manual build instructions fails with dex exception

The current manual build instructions throws a multiple dex files exception.

Build instructions:

Manual

You can copy this library jar and all its dependency jars to a folder as follows:

git clone [email protected]:coinbase/coinbase-android-sdk.git
cd coinbase-android-sdk
mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=$YOUR_JAR_DIRECTORY
mvn package
cp target/coinbase-android-sdk-1.0.1.jar $YOUR_JAR_DIRECTORY

Error seen:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lorg/apache/http/annotation/GuardedBy;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

The library that causes this error is httpclient-4.0.1.jar. The fix is to remove it:

rm $YOUR_JAR_DIRECTORY/httpclient-4.0.1.jar

Update jcenter with latest (1.0.2) build of sdk

The docs all point to using version 1.0.1, but building the sdk manually let's you use the updated library instead. Updating the lib at jcenter would let you use the up-to-date version via gradle.

Is this supposed to open up the Coinbase native app (if installed) when initiating OAuth authentication?

Because if so, it's not working for me. Nexus 7 with Android 5.1 as test device. Our app always redirects to coinbase.com in Chrome, even if the native Android Coinbase app is installed on the device.

I saw that the only open pull request (#2) is supposed to fix this, however, I've integrated those changes to no avail (still not opening in the native app). Any idea on the status of this situation? Is the PR bad? Is it something on my side? Thanks.

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/message/BasicNameValuePair

Exception is thrown while calling OAuth.beginAuthorization(...).
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/message/BasicNameValuePair; at org.apache.http.client.utils.URIBuilder.addParameter(URIBuilder.java:350) at com.coinbase.api.CoinbaseImpl.getAuthorizationUri(CoinbaseImpl.java:1135) at com.coinbase.android.sdk.OAuth.beginAuthorization(OAuth.java:36) at <...>.data.api.coinbase.CoinBaseAuth.startAuth(CoinBaseAuth.kt:17) at <...>.domain.login.LoginUserCase.startAuth(LoginUserCase.kt:18) at <...>.presentation.login.LoginViewModel.startAuth(LoginViewModel.kt:21) at <...>.presentation.login.LoginActivity$initView$1.onClick(LoginActivity.kt:28) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.message.BasicNameValuePair" on path: DexPathList[[zip file "/data/app/<...>-2MN8xvV_HTBANhsukPUwFg==/base.apk"],nativeLibraryDirectories=[/data/app/<...>-2MN8xvV_HTBANhsukPUwFg==/lib/x86, /system/lib]]

Android Mobile App

The send ETH confirmation screen in the Android app states the transaction is being broadcast to the Bitcoin blockchain

Error:Program type already present: org.apache.http.ContentTooLongException

Error:Program type already present: org.apache.http.ContentTooLongException

I get this error when I try to compile my app after importing the library (with nothing written in the code for coinbase).

`
AGPBI: {"kind":"error","text":"Program type already present: org.apache.http.ContentTooLongException","sources":[{}],"tool":"D8"}

FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
    `

redirect to app after email verification

i m redirecting to my app using intent filters after user has verified his email but query parameter state and code are missing in the redirect uri. Can anyone help me on this?

Mutiple dependencies of httpclient causes conflicts

From what I can tell we have two httpclients being packaged:

  1. The one from coinbase-java
  2. The android port used in this sdk: httpclient-android

This causes conflicts when building a project with android-gradle (used in Android Studio):

Warning:Dependency org.apache.httpcomponents:httpclient:4.3.6 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages

STR

  1. Create a blank Android project with Android Studio (current stable is 1.3.2)
  2. In the app/build.gradle add the coinbase android sdk as mentioned in the docs.
  3. Sync project to pull dependencies.
  4. Build.
  5. Observe the error output as seen above.
  6. (optional) Cry.

Error:Program type already present: org.apache.http.auth.AuthSchemeProvider

When I add the dependency into my project, i get the error

Error:Program type already present: org.apache.http.auth.AuthSchemeProvider

upon compiling.

Adding SDK using
compile ('com.coinbase.android:coinbase-android-sdk:1.0.1')

This occurs in the Android SDK Example As well

Does anyone have a fix for this?

Scope do not match the current API version.

Hi, I am using the Coinbase SDK for android.

My project dependency is:
compile('com.coinbase.android:coinbase-android-sdk:1.0.1') {
exclude module: 'httpclient' //by artifact name
exclude group: 'org.apache.httpcomponents' //by group
exclude group: 'org.apache.httpcomponents', module: 'httpclient' //by both name and group
}

I was unable to get Access token by using this statement:
OAuth.beginAuthorization(this, CLIENT_ID, "user", REDIRECT_URI, null);

Application crashes when the SDK tries to get Authorization URI using:
URI authorizationUri = coinbase.getAuthorizationUri(request);// code from sdk's Auth.java

I believe it was happening because we are passing the OAuthCodeRequest.Meta as null. Anyways I don't know the solid reason here.

So somehow I managed to create an access token by using this code manually:
String auth_url = "https://www.coinbase.com/oauth/authorize?" +
"client_id=" +CLIENT_ID +
"&redirect_uri=" + REDIRECT_URI +
"&response_type=code" +
"&scope=wallet:user:read";
Log.e("TAG", "onCreate: "+ auth_url );
URI authorizationUri = URI.create(auth_url);
Intent i = new Intent(Intent.ACTION_VIEW);
Uri androidUri = Uri.parse(authorizationUri.toString());
androidUri = androidUri.buildUpon().appendQueryParameter("state", getLoginCSRFToken(MainActivity.this)).build();
i.setData(androidUri);
startActivity(i);

It successfully returns me the access token. But finally when I try to get the user instance using this code snippet:
String token = tokens.getAccessToken();
Coinbase cb = new CoinbaseBuilder()
.withAccessToken(token)
.build();
Log.e("Email", "doInBackground: "+cb.getUser().getEmail());
It gives me this exception:

com.coinbase.api.exception.CoinbaseException: Bereiken komen niet overeen met de huidige API-versie.
OR
com.coinbase.api.exception.CoinbaseException: Scope does not match the current API version.

Can anybody help me in this?

Many Thanks!!

Sending Bitcoin Problem

Hello
I'm using this dependency compile ('com.coinbase.android:coinbase-android-sdk:1.0.1')
and current android sdk is 25

I'm trying to send bitcoin (after OAuth2 token)

using:

Transaction t = new Transaction();
t.setTo("emailAddress");
t.setAmount(Money.parse("BTC 0.001"));
t.setNote("notes to send");
cb = new CoinbaseBuilder().withAccessToken(tokens.getAccessToken()).build();
cb.sendMoney(t);
but it returns this java.io.FileNotFoundException: https://coinbase.com/api/v1/transactions/send_money

i also have set Internet Permission in Manifest, is there anything missing? i need to resolve this ASAP
Thanks

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.