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
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700
Accepted Solution

Ripple not working for push API

Hi, for some reason my openBISPushListener is always undefined in Ripple.

 

Here is my config.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<!--
  Widget Configuration Reference:
    http://docs.blackberry.com/en/developers/deliverables/15274/
-->

<widget xmlns="http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
		version="1.0.0.0">

	<name>Appy</name>

	<description>AppyApp</description>

	<feature id="blackberry.system" 	required="true" version="1.0.0.0" />
	<feature id="blackberry.app" 		required="true" version="1.0.0.0" />
	<feature id="blackberry.invoke" 	required="true" version="1.0.0.0" />
	<feature id="blackberry.push" 		required="true" version="1.0.0"/>
	<feature id="blackberry.identity" 	required="true" version="1.0.0"/>
	<feature id="blackberry.utils" 		required="true" version="1.0.0.0" />

	<access subdomains="true" uri="file:///store/home" />
	<access subdomains="true" uri="file:///SDCard" />

	<!-- Expose access to all URIs, including the file and http protocols -->
	<access subdomains="true" uri="*" />

	<icon rim:hover="false" src="resources/icon.png" />
	<icon rim:hover="true" src="resources/icon_hover.png" />

	<rim:loadingScreen backgroundColor="#333333"
					 foregroundImage="resources/loading_foreground.png"
					 onFirstLaunch="true">
	<rim:transitionEffect type="fadeOut" />
	</rim:loadingScreen>

	<rim:allowInvoke Params="true" />

	<rim:connection>
		<id>TCP_WIFI</id>
		<id>BIS-B</id>
		<id>MDS</id>
		<id>WAP2</id>
		<id>TCP_CELLULAR</id>
		<id>WAP</id>
	</rim:connection>  

	<content src="index.html" />

</widget>

 

And my code to call it is just the provided sample from https://bdsc.webapps.blackberry.com/html5/apis/blackberry.push.html#.openBISPushListener

 

It seems the app can't find the WebWorks Javascript extension or something.

 

Any ideas?

Retired
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold

Re: Ripple not working for push API

Hi 

 

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: Ripple not working for push API

 

Hi,

 

Thanks for the response, I'm glad I'm not crazy.

 

One suggestion, maybe:

 

On the most obvious part of the API doc, it states:

Feature IDOS 5.0OS 6.0OS 7.0PlayBookRipple
<feature id="blackberry.push" /> Y Y Y   Y

 

 

You have to click the little (easy to miss) link "View Supported Platform Table" to view the actually supported platforms:

 

APIOS 5.0OS 6.0OS 7.0PlayBookRipple
blackberry.push.closePushListener Y Y Y   Y
blackberry.push.openBESPushListener Y Y Y    
blackberry.push.openBISPushListener Y Y Y    
blackberry.push.openPushListener Y Y Y   Y

 

 

The latter case was easy to miss. It would be useful to have that more apparent in the docs.

 

Retired
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold

Re: Ripple not working for push API

Thanks for the suggestion but the problem is some classes have a lot of methods so the table is quite large.

 

You'll note the information is also present on the actual function description

 

 

blackberry.push.openBISPushListener


static void openBISPushListener(options : Object, onData : function, onRegister : function, onSimChange : function)

 

Supported Platform(s)

 - BlackBerry OS 5.0+ 

Description

Opens the push listener to allow an application to listen for BIS pushes. Only one port can be opened at a time if openBESPushListener or openBISPushListener functions are used. 
If calling openBISPushListener on a page where the port is already open, the callbacks will be updated to use the latest one passed in. The queue size and wake up page will not be updated. 
If an application registered to BIS push is closed and a push message arrives, the application will be launched in background and the wake up page is displayed. rim:allowInvokeParams="true" attribute must be specified in the content element of config.xml.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: Ripple not working for push API

Any possibility of adding that to the next milestone? (issue here https://github.com/blackberry/Ripple-UI/issues/96)