【发布时间】:2015-05-05 01:12:46
【问题描述】:
我正在android应用程序中开发paypal sdk并成功集成并使用paypal和信用卡进行支付。现在我想将card io集成到现有应用程序中。
我已经完成了如下添加的代码 -
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);
}
但它返回异常:
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.
我正在 android 4.4.4 上对其进行测试,并在我的项目的 lib 文件夹中添加了 paypal sdk - PayPalAndroidSDK-2.8.4 和 card.io-Android-SDK-4.0.2。
清单代码-
<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" />
我的代码有什么问题?
【问题讨论】: