Ravi Bhandari
Ravi Bhandari

Reputation: 4698

Paypal CardIO returns exception

I am working on paypal sdk in android app and integrated successfully and working for payment with paypal and creditcard.Now i want to integrate card io in existing app.

I have done code as added below -

    public void onScanPress(View v) {
        Intent scanIntent = new Intent(this, CardIOActivity.class);

        // customize these values to suit your needs.
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true); // default: true
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, false); // default: false
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false); // default: false

        // MY_SCAN_REQUEST_CODE is arbitrary and is only used within this activity.
        startActivityForResult(scanIntent, MY_SCAN_REQUEST_CODE);
    }

but it return exception :

Failed to load native library: Couldn't load cardioDecider from loader dalvik.system.PathClassLoader
Processor type is not supported
ERROR_NO_DEVICE_SUPPORT: This device cannot use the camera to read card numbers.

I am testing it on android 4.4.4 and added paypal sdk - PayPalAndroidSDK-2.8.4 and card.io-Android-SDK-4.0.2 in lib folder of my project.

manifest code -

   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.INTERNET"/>

   <uses-permission android:name="android.permission.CAMERA" />

   <!-- Permission to vibrate - recommended, allows vibration feedback on scan -->
   <uses-permission android:name="android.permission.VIBRATE" />

    <!-- Camera features - recommended -->
    <uses-feature android:name="android.hardware.camera" android:required="false" />
    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
    <uses-feature android:name="android.hardware.camera.flash" android:required="false" />

   <activity 
        android:name="io.card.payment.CardIOActivity" 
        android:configChanges="keyboardHidden|orientation" />

    <activity 
        android:name="io.card.payment.DataEntryActivity" />

What the problem in my code?

Upvotes: 1

Views: 705

Answers (2)

Jeff Brateman
Jeff Brateman

Reputation: 3277

Jeff from card.io here. The latest PayPalAndroidSDK (2.8.7) already has card.io 4.0.1 bundled within it. Including the card.io library will result in problems building when two card.io classes with the same name conflict.

All you need to do is integrate the latest PayPalAndroidSDK, and then use the card.io API as you normally would.

Upvotes: 1

Guess
Guess

Reputation: 238

In your lib folder you have to add more dependency -

armeabi
armeabi-v7a
mips
x86

for more info check this on GIT.

Hope it will solve your problem.

Upvotes: 3

Related Questions