question

kschemmel avatar image
kschemmel asked Raymond Lee Deactivated answered

Does ACTION_SECURE_PAY not work on emulator?

I have created an emulated Flex device (API 22), following the "Android Emulator Setup" page. I am now attempting to start a PAY action. My use case requires payment information to be returned, so I cannot use ACTION_CLOVER_PAY or ACTION_MANUAL_PAY, and must use ACTION_SECURE_PAY. My attempt is simple:

Intent intent = new Intent(Intents.ACTION_SECURE_PAY);
intent.putExtra(Intents.EXTRA_AMOUNT, 100L);
startActivityForResult(intent, 1);

My AndroidManifest.xml file contains the line:
<uses-permission android:name="clover.permission.ACTION_PAY"/>

When the activity is launched, nothing appears to happen on screen. The other two PAY intents launch the activity just fine. Logcat offers this ( 4282 are my debug logs):

07-20 11:12:41.913 D/clover  ( 4282): launching payment intent
07-20 11:12:41.914 I/ActivityManager( 1488): START u0 {act=clover.intent.action.START_SECURE_PAYMENT cmp=com.clover.payment.executor.station/.StationPayActivity (has extras)} from uid 10092 on display 0
07-20 11:12:41.916 V/WindowManager( 1488): addAppToken: AppWindowToken{2928e9e8 token=Token{fbe70b ActivityRecord{de3e6da u0 com.clover.payment.executor.station/.StationPayActivity t184}}} to stack=1 task=184 at 1
07-20 11:12:41.926 I/StationPayActivity( 3509): finish(CommonActivity.java:1364): @1112d122 finish
07-20 11:12:41.928 I/StationPayActivity( 3509): onCreate(CommonActivity.java:216): @1112d122 +onCreate: null
07-20 11:12:41.929 I/ServiceConnectorManager( 3509): connect(ServiceConnectorManager.java:59): com.clover.common2.appservices.ServiceConnectorManager@230797b3 +connect
07-20 11:12:41.933 I/ServiceConnectorManager( 3509): connect(ServiceConnectorManager.java:80): com.clover.common2.appservices.ServiceConnectorManager@230797b3 -connect rc: true
07-20 11:12:41.934 I/StationPayActivity( 3509): onCreate(CommonActivity.java:256): @1112d122 -onCreate
07-20 11:12:41.959 E/SettingsDefaults( 2013): getFallbackDefaultValue(SettingsDefaults.java:37): Error - fallback to defaults for BILINGUAL_PRIMARY_LANGUAGE_TAG
07-20 11:12:41.961 D/clover  ( 4282): returned from PAY activity
07-20 11:12:41.961 D/clover  ( 4282): resultCode: 0
07-20 11:12:41.961 D/clover  ( 4282): resultIntent: null
07-20 11:12:41.963 I/ServiceConnector( 3509): waitForConnection result: true, retryCount: 0
07-20 11:12:41.965 W/InputMethodManagerService( 1488): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@38b66371 attribute=null, token = android.os.BinderProxy@2a75237a
07-20 11:12:41.965 D/EmployeeConnector( 3509): on service success: ResultStatus{statusCode=OK, statusMessage=null}
07-20 11:12:41.979 I/StationPayActivity( 3509): onDestroy(CommonActivity.java:482): @1112d122 +onDestroy
07-20 11:12:41.980 I/ServiceConnectorManager( 3509): disconnect(ServiceConnectorManager.java:85): com.clover.common2.appservices.ServiceConnectorManager@230797b3 +disconnect
07-20 11:12:41.981 I/ServiceConnectorManager( 3509): disconnect(ServiceConnectorManager.java:90): com.clover.common2.appservices.ServiceConnectorManager@230797b3 -disconnect
07-20 11:12:41.981 I/StationPayActivity( 3509): onDestroy(CommonActivity.java:502): @1112d122 -onDestroy

My first point of confusion regards the fact that Station Pay is started instead of the Secure Pay I was expecting. However, after finding that Platform.Feature.SECURE_PAYMENTS is unsupported on the emulator, I am wondering if the result I was met with is expected under the circumstances. Is there something I am missing, or is ACTION_SECURE_PAY simply unusable on an emulated machine?
EmulatorIntents
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Raymond Lee avatar image
Raymond Lee Deactivated answered
Secure payments is a hardware specific feature, so it cannot be used from the emulator. You will need to purchase a Clover DevKit if you want to test secure pay.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community