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
Posts: 90
Registered: ‎04-03-2012
My Device: 9100
My Carrier: movilnet

try extend HTTPFILTERDEMO

hi there i want to try make and extension of the HTTPFILTERDEMO where  i can register a url and then whe browser read that url launch a app installed in the OS. but i as see  that look incompatible see the code below.

 

 public static void main(String[] args) 
    {
        try
        {
            HttpFilterRegistry.registerFilter("na.blackberry.com", "com.rim.samples.device.httpfilterdemo.precanned", true);
            HttpFilterRegistry.registerFilter("www.rim.com", "com.rim.samples.device.httpfilterdemo.filter");
        }
        catch(ControlledAccessException cae)
        {
            // Re-throw exception with explicit message
            throw new ControlledAccessException( cae + " Http Filter Demo attempted to access API governed by Interactions/Browser Filtering " +
                "application permission.  Please set this permission to 'allow' under Options/Security Options/Application Permissions");
        }
    }

 in this class named packed manager i call a method who recive the url to be registed and the compled full name package of the class what do the "magic"  , open other app.  HttpFilterRegistry.registerFilter (" URL, com.device.httpfilterdemo.precanned ").

 

well is obvious i can make that magic funcionality in java but mi entire proyect is make in works, soo my boss dont want have to make 2 apps for this.