Manual for Android SDK
Introduction
Voice Ads allow users to engage with ads using their voice. While listening to an audio ad or watchıng a video ad, users can speak various voice commands which will be introduced to users within ad creative.
When a user says any of the following: Skip it, Next, Cancel or Not Interested, Etc., the advertisement stops and the next one plays if there is one scheduled.
When the user engages with an ad, we perform the requested action, e.g. ‘open browser’ ‘playing successive message with more details’ etc.
User responses can be ‘positive’ when users want to ‘know more’ or ‘make a purchase’ or ‘negative’ when users say ‘no’, ‘I’m not interested’
To fully enable the App, microphone access permission needs to be activated to your App manifest. You can learn more about how to do this via the following link:
Please note that the application must be developed as a foreground service. And the foreground service must be launched while the activity is visible. Microphone access must be declared for foreground service as well. Please see the link below for reference:
For an actual example of foreground service, please click HERE
(Please turn off the AdBlocker to access the repository)
SDK Installation
Install the SDK from our repository as described below or use the open-source version. The open-source version of SDK can be found HERE
Please note, that any change in the code will affect the performance and revenue.
The most recent version of our SDK is 9.6.3
Please note, that the Demo project you can find in the open-source version shouldn't be used for integration. The aim of the project is to demonstrate the technology. It shouldn't be inserted into the application in any way.
Project Configuration
Code Example
Please find the basic integration example below:
Your ID will be specified by our support team. Please, note that ID 1249 is used for testing purposes only.
After the integration and testing, you will be supplied with the production ID and for those who use the global server, region GLOBAL should be used and for EU server region EUROPE should be used.
On-Device Recognition
On-device recognition feature is enabled by default for a limited amount of languages (see below). The rest of the languages will be processed via cloud-based recognition.
On-device recognition requires at least one active model to be specified.
If you want to add more models for on-device recognition, add one more VoiceRecognitionEmbedded::addModel with another model.
Click here to get on-device recognition models
List of available models (more to come):
If you can't find the desired language in the list or do not want to use the on-device recognition, you can remove all the related code and libraries.
Implementation Details
You need to call adman.sendCanShow() in any case when you suppose to play an ad, even if you haven't received any. This method should be called at any possible ad placement in the app. This is very important and will dramatically affect the revenue.
To preload an ad, the below method should be used:
In case of successful preload, you will receive AdmanEvent.Type.READY as a response. In case when there are no ads for a certain listener you will receive AdmanEvent.Type.NONE as a response.
In case of error or lost connection, you will receive AdmanEvent.FAILED as a response.
The basic construction for the ad playback will look as follows:
Please see our examples above for a more detailed snippet.
If you want to play an ad right after the preload, you can use the following solution:
After the ad playback, the listener should be returned to content and another ad should be requested for the next ad break.
Also, please note that you should manage AudioFocus when working with SDK according to this official documentation: https://developer.android.com/guide/topics/media-apps/audio-focus
You should grant AudioFocus when our SDK will be requesting it in order to ensure, that ads will not overplay the content. Please see our example above in order to see how it should work.
You can find the list of available methods HERE
The list of Adman player events can be found HERE
For frequently asked questions, please see our FAQ Page below
Voice Video Ads Implementation
Please skip this part if you are not going to add Voice Video Ads to your app.
Add the following to your build.gradle:
Add the view module for Video Ads:
To use both Voice Ads and Voice Video Ads, make sure you have both AdmanVideoView and AdmanView available.
Use the below parameters to configure the Voice Video Ad request:
The above ID can be used for testing purposes only.
If you need to switch between Voice Ads and Voice Video Ads, add the following when updating the request parameters. Update the parameters before preloading an ad.
Usage example:
You can use the same way to switch back to Voice Ads.
Click HERE for the demo app.
How to test the integration?
After the integration, you will be getting unlimited Voice Ads for all your ad requests. Please make sure that the ad is reacting to your commands in the way it's expected. Test for Positive, Negative, and Swear words (if needed), etc.
How to send bug reports?
If you encounter any bugs during testing, please report all bugs and reports to the following email support@instreamatic.com .
In the event of unusual behavior (wrong responses, advertisement skipping, etc.), please send all incidents along with a description of the incident and your advertising ID. This will allow us to analyze what happened and correct the issue. We do advise that for multiple incidents, to send them in one email so we can give you or full attention and address these incidents. Incidents sent to use one at a time may have a longer than normal response time. Incidences may be reported to the following email support@instreamatic.com .
In the event of a crash, please send all crash logs and/or reports to the following email support@instreamatic.com .
For frequently asked questions, please see our FAQ Page below
Why SDK?
Your decision to make Instreamatic Dialogue Ads available on your native mobile apps will provide a highly valuable and unique audio communication capability that makes audio or video ads “smart”. These ads are driven by Voice AI and allow the listener to respond to various scenarios with voice commands that drive target actions.
The Instreamatic SDK is the most simple and hassle-free way to integrate Dialogue ads to your app. There will be no need for complex coding or fine-tuning, just integrate our SDK by following this short manual and you are ready to go. The whole installation should only take an hour or so for a qualified tech professional and we will support your installation all through the process.
Is it safe?
Yes, our SDK is completely safe for your app and your users. Upon your request, we will share our tech specifications, so you can easily check for yourself that our SDK is completely safe for using it in your apps. You will have the full support from us during the integration process and even afterwards. Our SDK was tested on all Apple devices available in the market, so the possibility of a crash has been eliminated. You can implement in a test environment first to review with your QA team to become absolutely comfortable and again, we will support you through the entire process.
What kind of support can I expect?
Our support team is available by email during business hours on weekdays in most time zones. We also provide detailed installation manuals that provide clear instructions and answer most all questions. We will also answer the questions during the initial integration. Please note, that you should provide all the information regarding the issues during the integration if you need support from our side.
For frequently asked questions, please see our FAQ Page below
What to do if I do not want to use SDK?
You can contact your account manager or support team in order to get tech specifications of the protocol we are using. With our documentation, you will be able to build your own integration, but please keep in mind that you will need to perform some complex coding in order to build the integration. We will still provide support if you decide to take this option.
Feel free to contact our support at support@instreamatic.com
Last updated