question

odizeuz avatar image
odizeuz asked Greg commented

Implementing Custom Activity on Clover Mini

I'm trying to launch an Activity from an app that I've installed on a Clover Mini. For this task, I'm using the .Net SDK

https://docs.clover.com/build/custom-activities-for-clover-mini

I've followed the steps, but the Activity never gets launched. Inspecting Logcat I've found the following error:

I/AsyncRemoteMessageConduit( 1667): sendACK(RemoteProducerUtil.java:38): sendACK: message = RemoteMessage{id='2', type=COMMAND, packageName='com.clover.remote.protocol.usb', method='ACTIVITY_REQUEST', payload='{"version":1,"action":"com.mycompany.TestActivity","payload":"","nonBlocking":false,"forceLaunch":false,"method":"ACTIVITY_REQUEST"}', remoteSourceSDK='com.clover.cloverconnector.windows_CloverSDK|USB:1.4.1', remoteApplicationID='MY_SECRET_CODE'}

I/ ( 1667): onMessageReceived: message = RemoteMessage{id='2', type=COMMAND, packageName='com.clover.remote.protocol.usb', method='ACTIVITY_REQUEST', payload='{"version":1,"action":"com.mycompany.TestActivity","payload":"","nonBlocking":false,"forceLaunch":false,"method":"ACTIVITY_REQUEST"}', remoteSourceSDK='com.clover.cloverconnector.windows_CloverSDK|USB:1.4.1', remoteApplicationID='MY_SECRET_CODE'}

I/RemoteTerminalKioskActivity( 4153): unsafeOnReceive(RemoteControlClient.java:101): Received Intent { act=com.clover.remote-terminal.remotecontrol.action.V1_ACTIVITY_REQUEST flg=0x20000010 (has extras) } Bundle[com.clover.remote.terminal.remotecontrol.extra.EXTRA_PAYLOAD=, com.clover.remote.terminal.remotecontrol.extra.REMOTE_SOURCE_SDK_VERSION=1.4.1, com.clover.remote.terminal.remotecontrol.extra.REMOTE_TRANSPORT=usb, com.clover.remote.terminal.remotecontrol.extra.ACTION=com.mycompany.TestActivity, com.clover.remote.terminal.remotecontrol.extra.EXTRA_NON_BLOCKING=false, com.clover.remote.terminal.remotecontrol.extra.REMOTE_PAY_VERSION=1.0-199, com.clover.remote.terminal.remotecontrol.extra.EXTRA_FORCE_LAUNCH=false, com.clover.remote.terminal.remotecontrol.extra.REMOTE_APPLICATION_ID=MY_SECRET_CODE, com.clover.remote.terminal.remotecontrol.extra.REMOTE_MESSAGE_ACTION=activity_request, com.clover.remote.terminal.remotecontrol.extra.CUSTOM_ACTIVITY=com.mycompany.TestActivity, com.clover.remote.terminal.remotecontrol.extra.REMOTE_SOURCE_SDK=com.clover.cloverconnector.windows_CloverSDK|USB]

I/KioskStateMachine( 4153): transitionToState(KioskStateMachine.java:647): state transition: IDLE -> ACTIVITY_REQUEST

I/RemoteTerminalKioskActivity( 4153): sendRemoteTerminalBroadcast(RemoteControlClient.java:832): Sending Intent { act=com.clover.remote.terminal.remotecontrol.action.V1_UI_STATE (has extras) } Bundle[com.clover.remote.terminal.remotecontrol.extra.UI_DIRECTION=ENTER, com.clover.remote.terminal.remotecontrol.extra.UI_TEXT=com.mycompany.TestActivity, com.clover.remote.terminal.remotecontrol.extra.INPUT_OPTIONS=[], com.clover.remote.terminal.remotecontrol.extra.UI_STATE=STARTING_CUSTOM_ACTIVITY]

E/SettingsDefaults( 1775): getFallbackDefaultValue(SettingsDefaults.java:37): Error - fallback to defaults for BILINGUAL_PRIMARY_LANGUAGE_TAG

I/RemoteTerminalKioskActivity( 4153): onActivityRequest(RemoteTerminalKioskActivity.java:1234): Starting Custom Activity. Intent = Intent { act=com.mycompany.TestActivity cat=[com.clover.cfp.ACTIVITY] (has extras) } Bundle[com.clover.remote.terminal.remotecontrol.extra.EXTRA_PAYLOAD=, com.clover.remote-terminal.remotecontrol.action.V1_MESSAGE_TO_ACTIVITY=com.mycompany.TestActivity.MessageToActivity, com.clover.remote-terminal.remotecontrol.action.V1_MESSAGE_FROM_ACTIVITY=com.mycompany.TestActivity.MessageFromActivity]

I/ActivityManager( 867): Resuming app switches, calling UID: 10077, calling PID: 4153

I/ActivityManager( 867): Resuming app switches for requesting UUID: 10077

I/RemoteTerminalKioskActivity( 4153): startCustomActivityForResult(RemoteTerminalKioskActivity.java:1062): startCustomActivityForResult, requestCode = 501

I/ActivityManager( 867): START u0 {act=com.mycompany.TestActivity cat=[com.clover.cfp.ACTIVITY] (has extras)} from pid 4153

I/TerminalUsbAccessoryService( 1667): onUiState(RemoteMessageControlService.java:1255): ui state: STARTING_CUSTOM_ACTIVITY, ui name: com.mycompany.TestActivity, ui direction: ENTER, input options: []

I/RemoteTerminalKioskActivity( 4153): startCustomActivityForResult(RemoteTerminalKioskActivity.java:1083): startCustomActivityForResult, Exception

I/RemoteTerminalKioskActivity( 4153): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.mycompany.TestActivity cat=[com.clover.cfp.ACTIVITY] (has extras) }


I/RemoteTerminalKioskActivity( 4153): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)

I/RemoteTerminalKioskActivity( 4153): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)

I/RemoteTerminalKioskActivity( 4153): at android.app.Activity.startActivityForResult(Activity.java:3439)

I/RemoteTerminalKioskActivity( 4153): at com.clover.remote.terminal.kiosk.RemoteTerminalKioskActivity.startCustomActivityForResult(RemoteTerminalKioskActivity.java:1078)

I can confirm that the mentioned activity can be launched by other android apps installed on the device.

Has anybody work with this before?

Thank you very much for your help.
Clover Android SDKClover Mini
1 comment
10 |2000

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

Greg avatar image Greg commented ·

Hi @odizeuz,

Happy to look into your issue with Custom Activities on the windows SDK. Please fill out https://goo.gl/forms/xIWnym9wwdZhiEYw1 so we have an idea of your setup and can provide better support moving forward.

For this particular setup, can you please share how you are calling the Custom Activity? The exception is saying it cannot find the activity. Do you have that package installed on the device?

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community