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

Adobe AIR Development

Reply
Developer
Ebscer
Posts: 867
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
Accepted Solution

Invoke native applications

Does anyone know how we can invoke native applications such as the browser, email client, or AppWorld? I have seen other applications invoke the broswer and email, so I know that it is possible, but I can't find anything in the AIR documentation.


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Invoke native applications

[ Edited ]

@Ebscer, there are likely several ways which work, one of which is using navigateToURL() with an appropriate "scheme".

Using "file:", "http:", "https:" and possibly others should open the browser.

I'm not sure if the others have been documented yet. I saw either "app:" or "appworld:" in the simulator (down in the /pps tree somewhere under "navigator") but I'll need to get my tablet before I can experiment further with any of that as the simulator, of course, is nearly useless for such things.

There were also several other techniques listed near the start of this thread: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/PDF-word-and-xls-support-in-playb...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Invoke native applications

QNXApplication.openFile( path) is suppose to work. There is a concept of registered or default application for a particular file extension/mime type, but I yet to see an API that defines or registers an application as the default application for a file extension and a UI to change that. An application can define a file type in the -app.xml file that it can manage, but that alone does not make the app the default app for it. Try creating a file with an arbitrary extension that is in an apps file type registry. It will not open that app for that file. Bug?
Please use plain text.
Developer
Ebscer
Posts: 867
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha

Re: Invoke native applications

I have just tested this on device, and gotten navigateToURL() to work for both launching the browser and email client.

 

 

import flash.net.navigateToURL
import flash.net.URLRequest 

private function email(event:MouseEvent):void
{
	navigateToURL(new URLRequest("mailto:eric@ebscer.com"));
}
		
private function website(event:MouseEvent):void
{
	navigateToURL(new URLRequest("http://news.ebscer.com"));
}

 

 


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Invoke native applications

What about a file? Like an CSV file or something?
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Invoke native applications

[ Edited ]

Reviving this ancient thread to close the loop a bit.

 

As of 2.0 final, we can now use navigateToURL() for some more interesting things.

 

Apparently everything listed in the NDK navigator_invoke() docs should work fine.

 

JohnP just tested with mailto:user@example.com and it opens the native Messages app with a new message and the To address filled out. The settings://security form also worked.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
JohnPinkerton
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)

Re: Invoke native applications

I was even able to pass ?subject=peter9477 smells?body=badly and it worked.
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: Invoke native applications

Badly missing: ability to attach files...

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
JohnPinkerton
Posts: 350
Registered: ‎01-21-2011
My Device: Curve 8900 (Personal) / Bold 9650 (Work)

Re: Invoke native applications

Psh. Who would want to do that?! You're crazy.

Please use plain text.
Contributor
joeljesudossj
Posts: 10
Registered: ‎02-15-2013
My Device: BlackBerry Curve 9330

Re: Invoke native applications

Hi

I need to send an attachment via e-mail client programatically in playbook webworks

I had implemented it in BlackBerry Curve using Java Extension.

But Jave Extension is not getting recognized in PlayBook webworks

Also I went through this post,


But there is no solution to add mail attachment

 

Also is it possible to use AIR extension for the mail attachment in PlayBook webworks
http://diadraw.com/e-mail-native-extension-updated-for-adobe-air-3-4-and-ios-6-0/

 

If there is anyother way to send mail attachment please share.

Regards
joel

Please use plain text.