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
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
Accepted Solution

Custom BB Webworks/Phonegap plug-in for BB10

Hi

Can you please help me how to write Custom BB Webworks/Phonegap plug-in for BB10? I knew for BB Java Smartphone (phonegap-plugins).

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
BlackBerry Development Advisor
bryanhiggins
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3

Re: Custom BB Webworks/Phonegap plug-in for BB10

Hi,

 

We're working on building full support for cordova plugins, but for now you should build a WebWorks extension and import it to the www folder of your PhoneGap project.

 

Here is a template to get you started:

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/Template

 

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Custom BB Webworks/Phonegap plug-in for BB10

I have gone through this link. I have created my own plug-in.  When I introduce cascade related work (trying to use any API inside the bb) than problem start arising.

 

I am getting bbndk/target_10_0_10_672/qnx6/usr/include/bb/core/global.hpp:10:20: fatal error: QtGlobal: No such file or directory

But that file is there.


i need to send SMS and play with contact API in my plugin code.

 

any help

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Custom BB Webworks/Phonegap plug-in for BB10

You cannot use Cascades code/libraries inside of a WebWorks extension.  You can only use native C/C++ or Qt code.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Custom BB Webworks/Phonegap plug-in for BB10

@

 

i need to send SMS and access contact (phonelog and calllog api) in my webworks application. How I can achieve this. I have tried to use webworks API  but I think it supported only JAVA based Smartphone. Following is the URL

http://supportforums.blackberry.com/t5/BlackBerry-WebWorks/SMS-in-BB10-Webworks/m-p/2216173#M487

 

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Custom BB Webworks/Phonegap plug-in for BB10

[ Edited ]

We have used the invoke api. it is sending the sms.  We are unable to close the window once the sms has sent i.e window should automatically close after successfully sent the sms.


 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/blackberry-invoke-invoke-Text-Me...

 

 

 

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

Re: Custom BB Webworks/Phonegap plug-in for BB10

how to make a basic plugin , let me know, i must be able to expose basic navitve apis to my application

--------
- 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
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10

Re: Custom BB Webworks/Phonegap plug-in for BB10

@lathajagan

 

Explore the following links it has all the information.

 

http://developer.blackberry.com/html5/documentation/creating_extensions_for_bb10_apps.html

 

Root link is

 

http://developer.blackberry.com/html5/documentation/creating_custom_extensions.html

 

 

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
New Developer
Ashwini-P
Posts: 3
Registered: ‎11-11-2013
My Device: BB Z10

Re: Custom BB Webworks/Phonegap plug-in for BB10

[ Edited ]

I have to develop phonegap app that can add, update, and delete events in native calendar for Blackberry 10.

 

I tried creating my plug-in for the same but while building cascade project getting error: D:/bbndk/target_10_0_10_822/qnx6/usr/include/bb/pim/Global.hpp:11:20: fatal error: QtGlobal: No such file or directory

I am using bb/pim/calendar/CalendarEvent.h API in cascade part.

 

And I had also tried to integrate HTML5 webwork pimcalendar project (https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/pimcalendar) into my BB10 phonegap app (Copied the html5 webwork project into www folder of my PhoneGap project) but it is also not working.

 

Please let me know how can I do this ASAP? 

BlackBerry Development Advisor
bryanhiggins
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3

Re: Custom BB Webworks/Phonegap plug-in for BB10

Hi,

 

You need to add the BB10 Calendar plugin to your PhoneGap project to access the APIs. Assuming phonegap 3.1, you can run this command:

 

    phonegap plugin add com.blackberry.pim.calendar

 

That should fetch and install the plugin from here:

http://plugins.cordova.io/#/com.blackberry.pim.calendar

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins