Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.settings
SmaatoSDK
assets
src
translations
.cproject
.project
LICENSE
Makefile
Readme.md
SmaatoTest.pro
bar-descriptor.xml
config.pri
icon.png
precompiled.h

Readme.md

SmaatoSDKSample

The purpose of this application is to demonstrate how to use Smaato's Mobile Advertising SDK for BlackBerry 10.

The Smaato static library included within the sample is from Smaato SDK for BlackBery 10 v1.1.2. To ensure you are running the latest, please download the latest SDK for Smaato's website and replace the SmaatoSDK folder within the project.

The Smaato SDK is covered under these terms

The sample code for this application is Open Source under the Apache 2.0 License.

Applies To

Author(s)

Release History

  • v1.0.0 - Initial release

Known Issues

  • None

Dependencies

  1. BlackBerry Device Software **10.x ** and greater
  2. Smaato SDK v1.1.2
  3. Smaato Publisher ID. Sign up for free at http://www.smaato.com
  4. Smaato Ad Space ID. Create an Ad Space for your sample after registration.

How to Build SmaatoSDKSample

Simply Import the project into a workspace in your NDK.

The SmaatoSDKSample application demonstrates how to integrate ads from Smaato using QML and C++.

Using SSmaatoAdView in QML

SSmaatoAdView {
    id: adView
    adSpaceId: "0"  
    publisherId: "0" 
    preferredWidth: 768
    preferredHeight: 128
    viewSize: SSmaatoAdView.AdViewSizeNormal
    format: 1
    coppa: 0
    age: 30
    gender: SSmaatoAPI.Male
    tags: "sports,news"
    zip: "M17 1LB"
    autoRefreshPeriod: 30
    onAdUpdated: {
        if(success) {
        // code for success update
        } else {
        // code for failed update
        }
    }
}

Using SSmaatoAdView in C++

SSmaatoAdView* _adView = new SSmaatoAdView();
	_adView->setAdSpaceId("0");
	_adView->setPublisherId("0");
	_adView->setAdViewSize(SSmaatoAdView::AdViewSizeNormal);
	_adView->setFormat(1);
	_adView->setCoppa(0);
	_adView->setGender(SSmaatoAPI::Male);
	_adView->setAge(35);
	_adView->setZip("90210");
	_adView->setTags("News,Sports,Travel");
	_adView->setAutoRefreshPeriod(30);
    _adView->setScale(2.4,2.4);
    _adView->setPreferredWidth(720);
    _adView->setTranslationY(40);
	_adView->updateAd();
	mainContainter->add(_adView);

Getting Real Ads

You need to replace the Publisher ID and AdSpace ID with your own to get real ads. Leaving them at 0 will get you Smaato's test ad.

Refer to the Smaato documentation included within the Smaato SDK for further details on supported parameters.

Contributing Changes

To contribute code to this repository you must be signed up as an official contributor.

Please see the README of the Cascades-Community-Samples repository for instructions on how to add new Samples or make modifications to existing Samples.

Bug Reporting and Feature Requests

If you find a bug in a Sample, or have an enhancement request, simply file an Issue for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an Issue.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.