Android SDK (24.2.0-beta1)
Introduction
This guide only includes features introduced in beta versions. For a full SDK guide of the latest stable version, see the Android SDK guide.
The current beta release is 24.2.0-beta2.
The current stable release is 24.2.0.
Accessing the demo App
The Atomic Demo App is where you can view test cards. To run the latest beta version of Atomic Demo app, join the Atomic Connect beta - Play Store.
There is also a stable version of the Atomic Android Demo app. Read more in the Introduction to the workbench.
Installation
The beta SDK can be installed using Gradle. See here. The version number will match the beta release version from above.
For example:
dependencies {
implementation 'io.atomic.actioncards:aacsdk:24.2.0-beta2'
}
Custom Icons (Preview feature, Introduced in 24.2.0-beta1)
See the card element reference for supported SVG features in custom icons.
In 24.2.0-beta1, we've added support for custom icon integration with the SDK
- Components such as Buttons, Category, Text and Headline now supports custom icons in SVG format
- Custom themes for color and opacity are now supported.
- All icons will be displayed with the colors as dictated in the SVG file.
- Black is used if no colors are specified in the SVG file.
- Where a currentColor value is used in the SVG file, the following hierarchy is applied:
- Use the icon theme color and opacity if this has been supplied.
- Use the color of the text associated with the icon.
- Use a default black color.
- Opacity will be applied to icons when the workbench theme is applied.
- If an SVG is unsupported, invalid, or the URL is inaccessible due to network issues or certificate pinning:
- Fallback to the FontAwesome icon specified in the workbench's icon property.
- If no FontAwesome icon is specified, a default placeholder will be displayed.
Submit button name property in analytics events (Introduced in 24.2.0-beta1)
In version 24.2.0-beta1, we've introduced a new mandatory field called submitButtonName
in the API driven card actions during submit.
This parameter will be used as a property in analytics events to identify the name of the submit button used to submit
- Java
- Kotlin
// Here we retrieve the button name from our nodes.
// Then we use this as parameter as part of the
// new mandatory requirement for submit action
String buttonName = "";
for (Node node : card.getDefaultView().getNodes()) {
for (Node child : node.getChildren()) {
if (child.getType().equals("submitButton")) {
buttonName = child.getAttributes().get("name").toString();
}
}
}
Map<String, Object> params = new HashMap<>();
params.put("myString", "kwl");
params.put("myBool", true);
params.put("myInt", 33);
params.put("myDouble", 3.14);
AACCardAction.submit(card, buttonName, params);
// Here we retrieve the button name from our nodes.
// Then we use this as parameter as part of the
// new mandatory requirement for submit action
var buttonName = ""
card.defaultView.nodes.forEach {
it.children.forEach { child ->
if (child.type == "submitButton") {
buttonName = child.attributes["name"].toString()
}
}
}
AACCardAction.Submit(card, buttonName, mutableMapOf("myString" to "kwl", "myBool" to true, "myInt" to 33, "myDouble" to 3.14))
Image and video display height (Preview feature, Introduced in 24.2.0-beta2)
In 24.2.0-beta2 we've added support for a new preview feature, image and video display height. This feature adds support for customizing the height of inline image and video elements, along with banner image and video elements to four different display heights. These are,
- "Tall" the image or video is 200 display pixels high, with the spanning the whole width and cropped as necessary. This is the default value and matches existing image and video components.
- "Medium" the same as tall, but only 120 display pixels high.
- "Short" the same as tall but 50 display pixels high. Not supported for inline or banner videos.
- "Original" the image will maintain it's original aspect ratio, adjusting the height dynamically based on the width of the card to avoid any cropping.
When using these new layouts be mindful that customers using older versions of the SDK will default to the "Tall" layout.