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
smartek
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2

How to show the Application Menu in Ripple?

Is it possible to show the Application Menu via Ripple? (Or to simulate the gesture)

I can not simulate the scrolling down form the bottom of the device.

Plase "+Like" my post if it was helpful.
Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: How to show the Application Menu in Ripple?

Yes you can emulate the swipe down event:

 

  1. Ensure that BlackBerry 10 is the active platform.
  2. Expand the Events panel on the right side of Ripple.
  3. Choose the blackberry.event.swipedown option
  4. Press the Fire Event button 

If your code is correct, you should see your application respond to this event and the application menu appear.

 

If not, I'd suggest opening Web inspector to find out why

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
smartek
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2

Re: How to show the Application Menu in Ripple?

okay thank you. It does not work very well for me.

 

The screen gets dimmed a bit but I dont see the menu. On the DavAlphaC its working.

screen.PNG

Plase "+Like" my post if it was helpful.
Please use plain text.
New Developer
Greg311
Posts: 9
Registered: ‎04-23-2013
My Device: Don't have BB :(
My Carrier: Orange PL

Re: How to show the Application Menu in Ripple?

This is not working in Ripple. I tested it too.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: How to show the Application Menu in Ripple?

Are you using any particular UI framework? I tested with BBUI.js and the Ripple invocation of the event does properly trigger the application menu. If you're not using a UI framework, the event should fire and any subsequent actions would need to be dictated by your application.

 

If the screen is dimming, that's a good indication that the event has actually fired, but the framework being used may be having some issues. Does the Web Inspector consoel report anything?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Developer
smartek
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2

Re: How to show the Application Menu in Ripple?

No I dont. Even when I use the sampes from the newest bbUI release, I don't see the menu, just the screen is dimming.

 

But anyway on the phone its working, but it would be nice for the ppl who dont have a phone, to run it via ripple

Plase "+Like" my post if it was helpful.
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: How to show the Application Menu in Ripple?

Just for reference, I put together a really basic BBUI.js project as follows.

 

index.html

 

<!DOCTYPE html>
<html>
	<head>
		<title>Swipe Sample</title>
		<link type="text/css" rel="stylesheet" href="bbui.css" />
	</head>
	<body>
		<script type="text/javascript" src="local:///chrome/webworks.js"></script>
		<script type="text/javascript" src="bbui.js"></script>
		<script type="text/javascript">
			/*global blackberry, bb */

			window.addEventListener('DOMContentLoaded', function () {
				document.addEventListener('webworksready', function () {
					bb.init();
					bb.pushScreen('main.htm', 'main');
				}, false);
			}, false);
		</script>
	</body>
</html>

 

main.htm

 

<div data-bb-type="screen">
	Hello
	<div data-bb-type="menu">
		<div data-bb-type="menu-item" data-bb-img="icon.png" data-bb-selected="true">Foo</div>
		<div data-bb-type="menu-item" data-bb-img="icon.png">Bar</div>
	</div>
</div>

 

Triggering the blackberry.event.swipedown event from Ripple's Events console, I do successfully see the menu displayed.

 

Untitled.png

 

This is true for both the Z10 and Q10 emulation. If it works on the device, awesome, but I still believe you should be able to get this working in Ripple as well; if it is not currently working, it seems that there is something else in the app that is interfering, not specifically just because you're using Ripple.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Developer
smartek
Posts: 281
Registered: ‎05-31-2012
My Device: Playbook
My Carrier: o2

Re: How to show the Application Menu in Ripple?

Now working for me. I hope the next release of Ripple will fix it.

Plase "+Like" my post if it was helpful.
Please use plain text.