Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Advertising Service

Reply
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR
Accepted Solution

Missing app files

Hello forum. I wanted to get my hands on the example on advertising service and cascades but the example is missing.

https://developer.blackberry.com/cascades/documentation/device_platform/advertising/integrating_ads_...

it says download to get a zip file but instead there is a link to cascades github but the adv app is nowhere there.

can i find it elsewhere?

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Missing app files

Hi there,

 

I reported the missing file to the docs team and they are working to fix the page with updated information that does not rely on the sample. If you have any issues getting Advertising working without the sample please let me know.

 

Cheers,

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR

Re: Missing app files

Not an expert in developing, so it is easier for me to understand how code works through a sample app. 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Missing app files

You don't need to be an expert with Cascades, the actual Banner implementation is very simplified and most of what you need is displayed right in the docs.

 

Have you used the Advertising Service for WebWorks or Java in the past? It's very similar.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR

Re: Missing app files

ok. I try to follow the directions in the documentation. After fixing a typo in the qml file, and after importing the library, and giving all permisions i get the following error when trying to run on the dev alpha.

Packaging failed:1
Error: Invalid asset path "libcascadesadvertisement.so"

any advice?

 

I am not familiar with the advertising sdk yet. just experimenting with this one.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Missing app files

How did you add the library file to your app? Have you modified your app's .pro file yet?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR

Re: Missing app files

app->configure->add library->Standard BlackBerry Platform Library->Blackberry Cascades Ad API

and then add the 

LIBS += -lbbcascadesadvertisement 

line in the pro file.

 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Missing app files


alexchristou wrote:

app->configure->add library->Standard BlackBerry Platform Library->Blackberry Cascades Ad API

 

 


You shouldn't do that, just add to the .PRO file

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Regular Contributor
alexchristou
Posts: 56
Registered: ‎03-02-2012
My Device: 9780 & Playbook 32GB & Dev Alpha
My Carrier: Vodafone GR

Re: Missing app files

ok. Done that but the app is stuck at splash screen for some time and then crushes. 

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Missing app files

Ok, one more thing, add the following line to your main.cpp file near the top of the main method:

qmlRegisterType<bb::cascades::advertisement::Banner>("bb.cascades.advertisement", 1, 0, "Banner");

 

This registers "Banner" so it can be used from QML. You will also need to add an include for Banner:

ex #include <bb/cascades/Banner>

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.