Repository navigation
Intents
Sergio Daniel Moreno edited this page Feb 10, 2018
·
4 revisions
Below we provide samples on how to invoke different actions on VeeaPay.
Use this action when you want to check out and create a payment ticket in the key "vc.key.ticket". This intent call uses the VAL_TICKETconstant which is a String GSON representation of thecom.max2.veeaconnect.sdk.domain.entities.payments.Ticket class.
private static final String PACKAGE_NAME = "com.connect.max2.veeaconnect.dev";
private static final String ACTIVITY_NAME = "com.connect.max2.walla.ui.SplashScreenActivity";
private static final String ACTION_PAYMENTS = "com.connect.max2.walla.PAYMENTS";
private static final String KEY_BROADCAST_ACTION_NAME = "vc.originating.action.name";
private static final String VAL_BROADCAST_ACTION_NAME = "com.test.action.hello.World"
Intent intent = new Intent();
intent.setComponent(new ComponentName(PACKAGE_NAME, ACTIVITY_NAME))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
.setAction(ACTION_PAYMENTS)
.putExtra(KEY_TICKET, VAL_TICKET)
.putExtra(KEY_BROADCAST_ACTION_NAME, VAL_BROADCAST_ACTION_NAME);
startActivity(intent);Finally, the VeeaConnect SDK would return "vc.key.receipt" (or nothing) with string representation of Receipt model com.max2.veeaconnect.sdk.domain.entities.receipt.Receipt.