开发者

Invoking native applications on Blackberry

开发者 https://www.devze.com 2023-03-25 05:46 出处:网络
I am trying to invoke the native application for MEDIA content, so I can view the pictures in the device, and when the user selects an image, the selected one will be loaded into the application. Well

I am trying to invoke the native application for MEDIA content, so I can view the pictures in the device, and when the user selects an image, the selected one will be loaded into the application. Well I am invoking the Media content by the following code:

final Registry registry = Registry.getRegistry(com.UiApp.class.getName());
final Invocation invocation = 
    new Invocation(null, null, 
        BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER, false,
        ContentHandler.ACTION_OPEN);
invocation.setArgs(new String[] { 
    BlackBerryContentHandler.MEDIA_ARGUMENT_VIEW_PICTURES});
try { 
    registry.invoke(invocation); 
} catch (Exception ex) { }

The Invocation opens successfully, But when pressing the menu key and holding to see the running applications, I noticed that this invoke is running in a seperate application from my app.

I want to invoke the media application within my application and without having another application running. How to do that?

Thanks...


For example let's take an application called called Whats app. you can see clearly that they are invoking the native API of the gallery into their application without having any other icon for running applications, and when you enter the gallery straight from the phone, you will not open the one for the application but a different one!! So that made me sure that a way exists to run the native applications as a part or my app.

You can see what I meant by choosi开发者_JAVA技巧ng to send an image in the whatsapp application for OS 6.0 and above


I'm fairly certain this is not possible. Probably a security thing... unless a native app is exposed as a field (e.g. the MapField, it cannot be embedded within other apps.


There is no way to do that. These applications are different application and invocation API does not make them as a part of your application. It just allows you to run a native app at your choice with the specified params. And nothing more.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号