BookmarkSubscribeRSS Feed

Configuring Mobile Spots on Android Applications using the SAS Customer Intelligence 360 Mobile SDK

Started 4 weeks ago by
Modified 4 weeks ago by
Views 171

In earlier blogs I provided step by step instructions on how mobile app developers can install and initialize the mobile SDK on Android applications and configure mobile events on an Android application. The purpose of this blog is to provide instructions on how to show spots in an Android application. Future blogs will discuss topics such as how to set up mobile messages and how to handle navigation within a mobile application.

 

A spot is the place on a mobile app where a task delivers HTML content. The content that is going to be displayed is created in SAS Customer Intelligence 360. In this example I create the following ad that I want to be showed in my mobile application:

 

jf_1_spots-1_border.png

 

 Select any image to see a larger version.

Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

In addition to the creative that is used to create the ad a Spot ID is specified in SAS Customer Intelligence 360 which will be passed into my application:

 

jf_2_spots-2.png

 

In the mobile application use the user interface component com.sas.mkt.mobile.sdk.ads.SASCollectorAd in your layout XML or programmatically in your Activity or Fragment class to show a mobile spot.

 

For example, in my mobile application, I want to add a spot to the accommodations page. To do this, in the accommodations XML page I add a com.sas.mkt.mobile.sdk.ads.SASCollectorAd component.

 

jf_3_spots-3.png

 

The ID that you specify in this component will be referenced later in your application. You can also specify characteristics of the spot in this component such as the height and width.

 

When you are ready to display the spot content, load the desired spot ID into the spot. The load occurs asynchronously, so this method returns immediately.

 

First, create the spot by using SASCollectorAd and adding the name that you want. In this example, I call it myAd.

 

jf_4_spots-4.png

 

Next reference the spot that was created in the XML file as it applies to your application. In my example app, I have used fragments:

 

jf_5_spots-5.png

 

Next, I load the created spot and specify the ID of the spot that has been created in SAS Customer Intelligence 360. In this example, it is called testspot:

 

jf_6_spots-6.png

 

Note: In this example, tags is set to Null, but a map of name-value pairs can be created to support the ad request.

 

The Ad Delegate provides the means to notify you when certain actions occur (for example, when a spot loads, fails, closes, expands, resizes, begins, or ends an action). To receive notifications about asynchronous loads, failures to load, and user interactions with the spot, assign an implementation of the com.sas.ia.android.sdk.AdDelegate class to the spot. See SAS Help Center: Working with Spots for more detail on using the ad delegate.

 

It is possible to include a link in the spot that can direct users to a different part of the application or direct them to a web browser. It is the responsibility of the mobile app developer to design the app to be flexible to handle navigation to other parts of the application. Future blogs will give examples of ways that this can be accomplished in android applications.

 

For more details about how to load mobile spots in an Android application see SAS Help Center: Working with Spots. Additionally, more details can be found in the SAS Customer Intelligence 360: Mobile SDK course included in the SAS Customer Intelligence Learning subscription.

Version history
Last update:
4 weeks ago
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags