How do to call the BlackBerry menu form share an Adobe Air application?
Hello
I'm looking for a tutorial or demo code that describes how to call the BlackBerry menu sharing an Adobe Air based application.
I found a tutorial of waterfalls for it - there's one for Adobe Air too?
- http://bbcascadescode.tumblr.com/post/38998702671/invoke-share-for-bb10
This is a screenshot of the Action menu:
Advice welcome!
Here you go:
package com.lib.playbook.invocation { import com.lib.playbook.controls.List; import com.lib.playbook.pages.TitlePage; import com.lib.playbook.renderers.IconListRenderer; import flash.events.Event; import flash.events.IEventDispatcher; import qnx.events.InvokeEvent; import qnx.events.InvokeQueryTargetEvent; import qnx.fuse.ui.core.Action; import qnx.fuse.ui.events.ActionEvent; import qnx.fuse.ui.events.ListEvent; import qnx.invoke.ActionQuery; import qnx.invoke.InvokeManager; import qnx.invoke.InvokeRequest; import qnx.invoke.InvokeTarget; public class InvokeSearchPage extends TitlePage { private var request : InvokeRequest = null; private var targets : List = new List(); ///////////////////////////////////////////////////////////////////////////////////////// public function InvokeSearchPage() { super(); this.title = 'Search With'; this.titlebar.dismissAction = new Action( 'Cancel', null, {id:'cancel'} ); this.titlebar.addEventListener(ActionEvent.ACTION_SELECTED, ActionSelected ); this.targets.cellRenderer = com.lib.playbook.renderers.IconListRenderer; this.targets.addEventListener(ListEvent.ITEM_CLICKED, TargetSelected ); this.targets.rowHeight = 140; this.addChild( this.targets ); } /////////////////////////////////////////////////////////////////////////////////////////// public function filter( request :InvokeRequest ) : void { this.targets.removeAll(); this.request = request; //trace( 'filter ' + request.mimeType ); InvokeManager.invokeManager.addEventListener( InvokeQueryTargetEvent.SUCCESS, TargetsFound ); InvokeManager.invokeManager.queryInvokeTargets( request.mimeType, request.uri, request.action, request.targetOptions ); } /////////////////////////////////////////////////////////////////////////////////////////// private function TargetsFound( event : InvokeQueryTargetEvent ) : void { InvokeManager.invokeManager.removeEventListener(InvokeQueryTargetEvent.SUCCESS, TargetsFound ); //trace( 'TargetsFound' ); var action : ActionQuery; var target : InvokeTarget; for each( action in event.actions ) { for each( target in action.targets ) { this.targets.addItem( { data : target.target, label : target.label, icon : 'file://' + target.icon } ); } } } //////////////////////////////////////////////////////////////////// private function TargetSelected( event :Event ) : void { if( this.targets.selectedIndex >= 0 ) { this.request.target = this.targets.selection; InvokeManager.invokeManager.invoke( this.request ); } } //////////////////////////////////////////////////////////////////// private function ActionSelected( event :ActionEvent ) : void { switch( event.action.data.id ) { case 'cancel' : this.dispatchEvent( new Event( Event.CANCEL ) ); break; } } ////////////////////////////////////////////////////////////////////// override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList( unscaledWidth, unscaledHeight ); this.targets.setPosition( 10, this.top + 10 ); this.targets.setActualSize( unscaledWidth - 20, unscaledHeight - this.targets.y - 10 ); } } }
And the rendering engine:
package com.lib.playbook.renderers { import qnx.fuse.ui.display.Image; import qnx.fuse.ui.listClasses.CellRenderer; public class IconListRenderer extends CellRenderer { private var icon :Image = new Image(); ///////////////////////////////////////////////////////////////////////// public function IconListRenderer() { super(); } /////////////////////////////////////////////////////////////// override protected function onAdded():void { super.onAdded(); this.addChild( this.icon ); } /////////////////////////////////////////////////////////////// override protected function onRemoved():void { super.onRemoved(); this.removeChild( this.icon ); } ///////////////////////////////////////////////////////////////////////////////////// override protected function drawLabel(unscaledWidth:Number, unscaledHeight:Number):void { super.drawLabel( unscaledWidth, unscaledHeight ); if( this.data ) { if( this.data.hasOwnProperty( 'icon' ) && this.data.icon != null ) { this.icon.setImage( this.data.icon ); this.icon.setPosition( 10, 15 );//( unscaledHeight - this.icon.height ) / 2 ); } else { this.icon.setImage( null ); } } this.label.x = 140; this.label.width = unscaledWidth - this.label.x - 20; } } }
references com.lib.playbook our our inner classes, but you should get the approach to apply.
Tags: BlackBerry Developers
Similar Questions
-
When in the form of help on how to get my installed LSB file, the link behind the "BlackBerry Tablet OS SDK for Adobe AIR via a command prompt" appears to be down.
someone else?
Why not to use FB to install the key of LSB
-
How to record the date in Sqlite in an Adobe Air application
Hi friends,
I make a flex Application Adobe AIR with SQLITE database, what I want save the Date in the following format DD/MM/YYYY text but in my TABLE, I gave the data type is DATE.
It store the value as this Sun Dec 2 00:00:00 GMT + 0530 2012 I want to store the value in MM/DD/YYYY. How to do this?
looking for a useful suggession.
See you soon,.
B.Venkatesan.
Oops, didn't check my email several days who have not noticed your answer
not to get a Flash Builder in my desktop
But it should be:
private var Totaldays:int;
TotalDays = Math.Floor (Math.abs (date1. valueOf() -date2. valueOf()) / (24 * 60 * 60 * 1000))
Beware of the date1.valueOf () returns the number of milliseconds since midnight January 1, 1970
If you really want Totaldays to become a chain, then:
TotalDays =String (Math.floor (Math.abs (date1. valueOf() -date2. valueOf()) / (24 * 60 * 60 * 1000)))
-
How to call the setting menu of the BIOS on HP DV4 1540us netbook?
Hi all
How to call the setting menu of the BIOS on HP DV4 1540us netbook?
F2 does NOT an on-screen BIOS setting.
Is there another trick? Or, perhaps, defining the procedure step by step to start the BIOS?
TIA
Power on the laptop and all logo HP being displayed, press F10.
-
In Media Center Chess Titans, how can I remove the 3 Menu buttons up (game vs man, play Vs computer, exit) while I'm playing?
While I play Chess Titans (Media Center Version, full screen), there are 3 buttons on the top while I play (game vs man, play Vs computer, exit). These buttons are boring because there is no need of them. Make a right click on the screen offers these options. In addition, when you regularly play Chess Titans (not the Version of Media Center and windowed screen), these 3 buttons do not exist.
Hi Shpati,
Thanks for posting this question in the Microsoft Community.
Windows media center is normal and it is not possible to remove or deactivate form here.
It will be useful. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.
-
In Windows Mail how can I get the answer, menu forward on top of the menu bar on the emails?
I don't think that you can move the toolbar above the Menu bar. Or is the toolbar missing? If it is not present, right-click on an empty spot on the menu bar and check the toolbar. -
How can I delete the Favorites menu in the menu drop down address bar in IE8?
How can I delete the Favorites menu in the menu drop down address bar in IE8?
Hello
Because you used the nickname 'DaddyJeff' do you need to remove the access of all to Favorites? Otherwise, please
describe in more detail what you need to do.I think that you should use the Parental control or group policies (GPedit if you have professional, company,
(or Ultimate).See this and the 'related links '.
How to install and use Parental controls in Vista
http://www.Vistax64.com/tutorials/95139-parental-controls-Setup-use.htmland these:
Setting up Windows Vista's Parental control
http://www.bleepingcomputer.com/tutorials/tutorial139.htmlSet up Parental controls
http://Windows.Microsoft.com/en-us/Windows-Vista/set-up-parental-controlsI hope this helps.
Rob - bicycle - Mark Twain said it is good. -
How can I make the start menu bigger?
How can I make the start menu bigger? GO BROWNS!
What do you mean largest? More Articles?
If so, right click on the ORB start and select Properties.
Click Customize, and then down, to increase the number of programs to display.
-
How can I change the backgrounds menu for several pages?
Hello
How can I change the backgrounds menu for several pages in yet? I want a single image appears on several pages in the background.
Thank you.
You must do this for each menu page.
If the rest of the etc button style will be the same, just add the background you want and duplicate this menu before you change the titles, button names, linking.
-
How can I make the page of form for the Yahoo host?
How can I make the page of form for the Yahoo host?
I guess you want a contact form that sends data to your e-mail account.
- Find out if your hosting plan supports PHP code and the PHP mail() function.
If so, try this tutorial into 3 parts:
ALT-Web Design & Publishing: sensitive Contact form with 3.2 Bootstrap and PHP (part 1) - If your hosting plan does NOT support scripts, you will need to use a 3rd party like Wufoo.com service. They host the form processing scripts on their own servers for you.
Nancy O.
- Find out if your hosting plan supports PHP code and the PHP mail() function.
-
How do you find the number on a mid 2009 MacBook AIR
How do you find the number on a mid 2009 MacBook AIR
Serial number? Model number?
-
How can I change the time to download files using Adobe send? Adobe SendNow had a lot more options. I see not nay with Adobe send.
It is not a feature in Adobe send for the establishment and the date of end of availability of a file. At any time, you can unshare the file, however.
-
How can I install the free version of Illustrator to adobe on a PC with Windows Vista?
How can I install the free version of Illustrator to adobe on a PC with Windows Vista? When I try the program says that I have not adapted to the system requirements
There is no free version.
do you mean you want to try the trial version 30? If so, you must upgrade your operating system or use an older version of AI.
-
How can I change the 'Submit' button States in muse adobe?
How can I change the 'Submit' button States in muse adobe? Currently, I can only change the color, text, and the outline of the button, but I can't customize it as I have the other buttons in the tool.
Use your images as a background the button fill
-
How can I update the patch of dps to my Adobe CS6 class
How can I update the patch of dps to my Adobe CS6 class
http://helpx.Adobe.com/Digital-Publishing-Suite/help/installing-digital-publishing-tools.h tml
Neil
Maybe you are looking for
-
Photos in some emails do not appear they will be with live mail
Some emails do not download photos and these photos do not come in attachments, they are part of the original email. I checked that the pictures were sent in live mail I want to get away from of. He did not have much. I don't see any difference with
-
ZBook 15: ZBook HP 15 upgrade question
Hello I have a HP Zbook 15 G2 and I want to upgrade my laptop. The vehicle currently has a 256 GB SSD and 8 GB of RAM DDR3L. I would like to insert an additional SSD and possibly another 8 GB of RAM if it is possible. I have no idea how to do that we
-
Satellite U400: webcam does not work with MSN - it is used by another prog
My chicony webcam will not work on windows live messenger I want to use it for video chat. An error message appears saying 'we couldn't start your camera. Please check that your camera is not currently being used by another program, and then try agai
-
How to stop piracy of your contact list?
-
How to add or remove a white screen on the Dell site?
My Tablet has OS: Android 4.2.2 with pinch zoom turned on in the settings. But the pinch on the House or any screen action brings to the top of the screen to change to the add form or deleting.