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

Web and WebWorks Development

Reply
Highlighted
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel
Accepted Solution

activity indicator Api in extensions

Hello, 

i am trying to achieve native look and feel of activity indicator(spinner) to indicator any loading activity with extensions, using C++ code.

Can anyone guide me which API to use for the same?

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: activity indicator Api in extensions

anyone has idea please let me know

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: activity indicator Api in extensions

Hi lathajagan,

 

Look at the async sample here: https://github.com/blackberry/WebWorks-Community-APIs/blob/master/BB10/Template

 

The async function to the extension will trigger your callback function when it returns from C++, so you can show and hide the spinner using HTML/CSS as such:

 

//show spinner
spinner.show();
//call extension
community.templateExt.testAsync(function(results){
    //extension returns, so hide the spinner
    console.log('results:'+ results);
    spinner.hide();
});

 

 

Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: activity indicator Api in extensions

hello anzor_b, thanks for the reply, so this spinner.show() will show is a native API of blackberry10 which is used across native apps like contacts, messaging ? can u please confirm?
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: activity indicator Api in extensions

No, that is pseudo code for your own spinner function. In WebWorks, you either have to create the spinner yourself, or use one of the frameworks that provide this, such as BBUI.js https://github.com/blackberry/bbUI.js

 

I was just showing a way you can time your own spinner so it shows and hides when you get data back from the native layer.

 

There is no API to show the native spinner in WebWorks as most of the UI is done in HTML5/WebWorks.

Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: activity indicator Api in extensions

using bbui.js, how to add spinner in my html5 ,non-webworks application page, can u please explain me how to do that?
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: activity indicator Api in extensions

Which SDK are you using?

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: activity indicator Api in extensions

its all about css and div tag of the html. you can't create activity indicator as native plugin but you can play with the C++ and Css code togather. always show and hide css built spinner with the help of c++ code.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: activity indicator Api in extensions

i have done that already now, it looks very cool now after resizing the image we are using for bb10
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev