Register ContentHandler

I try to use the demo CHAPTER code as in

http://www.BlackBerry.com/developers/docs/4.7.0api/app-integration-summary.html

And when I run the program, it fails with ClassName is not implemented (Exception) as the following code snippet.

My question is how do I save an application? The call of Registry.getRegistry (CLASSNAME); expected class name is already registered, but I don't see how to do that no matter what document/example.

The Registry class is quite strange because it does not have a constructor(). Basically, I expect to have something like first to save my class, so I can get the registry. Rather than get the registry then register as in the following excerpt. Am I wrong?

For example:

Register regobj = new Registry();

RegObj. Register (...);

Other than what's in the chiapi demo:

Register regobj = Registry.getRegistry (CALSSNAME);

RegObj. Register (...);

bbcoder

      /**        *  Registers this application with specified types, suffixes, actions        *  and classname.  This method will run on  startup.        */        static void registerApp()       {            try            {                // This app will be a handler for csv files and will be invoked                // with ACTION_OPEN.                String[] types = {"text/csv"};                String[] suffixes = {".csv"};                            String[] actions = {ContentHandler.ACTION_OPEN};   

                // Get access to the registry and register as a content handler.                 Registry registry = Registry.getRegistry(CLASSNAME);                        registry.register(CLASSNAME,types,suffixes,actions,null,ID,null);

            }            catch (ContentHandlerException che)            {                   System.out.print(che.toString());            }           catch (ClassNotFoundException cnfe)            {                        System.out.print(cnfe.toString());            }       } 

Never mind. ClassName is case-sensitive. I got it to work.

Tags: BlackBerry Developers

Similar Questions

  • ContentHandler.ACTION_SEND

    Hi all

    The JDE 4.7.0 demo app app ContentHandler.ACTION_SEND works very well.  'S called it SendMediaDemo.  But when I try to set up something similar to 4.6.0 (4.3.0) I do not see the menu option 'Send to app demo' appears in the media application.

    I tried a stripped down version of the demo which just shows the menu item (which works in 4.7.0) but I can't make it work on previous versions that support content manager.  Any recommendations?

    For reference, here's the registration code:

    String[] types = {"image/bmp", "image/png", "image/jpeg", "video/3gpp", "video/mp4"};                String[] suffixes = {".bmp", ".png", ".jpg", ".3GP", ".mp4"};                            String[] actions = {ContentHandler.ACTION_SEND};                  String[] actionNames = {"Send to Resonance"};                 ActionNameMap[] actionNameMaps = {new ActionNameMap(actions,actionNames,"en-US"),                                                  new ActionNameMap(actions,actionNames,"en-GB"),                                                  new ActionNameMap(actions,actionNames,"en")};
    
                    // Get access to the registry                System.out.println("Resonance::trying " + CLASSNAME);                Registry registry = Registry.getRegistry(CLASSNAME); 
    
                    try                {                       // Register as a content handler                           registry.register(CLASSNAME, types, suffixes, actions, actionNameMaps, ID, null);                }                catch (ContentHandlerException che)                {                       System.out.print(che.toString());                }                catch (ClassNotFoundException cnfe)                {                            System.out.print(cnfe.toString());                }
    

    Thanks for reading!

    Luigi

    There is no way for third party applications to integrate with the media in this way player before BlackBerry handheld software version 4.7.0.

    Facebook and Google Talk were both created by RIM, so that they have direct access to the source of multimedia application.

  • ContentHandler: can it provide icons for its file types?

    I implemented the ContentHandler/RequestListener/registry setting to manage the types of application attachments (and files), using the 'CHAPIDemo' incoming email as a reference starting point. I'm pretty confident that I've got things that works pretty well. My app responds to the menu item "Open Attachment" and my app jumps into action and is provided with the necessary information. So far so good.

    Is it possible to register an icon for file types that handles my application? For now, the icon is a white box with a question mark. I would rather offer something a bit nicer.

    I hope it's a matter of easy noob who takes 2 lines of code to fix, but I tried a little different searches Google/forum, nothing helps.

    Thanks in advance,

    Alex.

    No, this is not supported.  Content API Manager does not provide the means for an application for registration of an icon for its content type.

  • Error register when my content manager

    I tried to use CHAPIdemo to record my own content manager. The build completed, but after I loaded in the camera, I received the message "Eception exception: sequence of actions does not match the order in the ActionNameMaps. The registerApp are automatically run when you start upward.

    And I use JDE 4.6 with 9000 "BOLD". Here is the code:

     private static void registerApp()
        {
            try
            {
                // This app will be a handler for csv files and will be invoked
                // with ACTION_OPEN.
                String[] types = {"word/doc"};
                String[] suffixes = {".doc"};
                String[] actions = {ContentHandler.ACTION_PRINT};
                String[] actionNames = {"Print demo"};
                ActionNameMap[] actionNameMaps = {new ActionNameMap(actions,actionNames,"en")};
    
                // Get access to the registry and register as a content handler.
                 Registry registry = Registry.getRegistry(CLASSNAME);
                 registry.register(CLASSNAME,types,suffixes,actionNames,actionNameMaps,ID,null);
    
            }
            catch (ContentHandlerException che)
            {
                System.out.print(che.toString());
            }
            catch (ClassNotFoundException cnfe)
            {
                System.out.print(cnfe.toString());
            }
        }
    

    Thanks for your help.

    LAN

    2 things I see different from my own code.

    1: I do not include the character comma in the String [] that contains the list of extensions, I got some odd results when I does not include the period as shown in the demo code, here is my code I have work

    String[] suffixes = new String[] { "xyz" };
    

    2: I think that 4 in registry.register () parameter is false, I have this

    registry.register(CLASSNAME, types, suffixes, actions, actionNameMaps, ID, null);
    
  • Hi all, I have try several times to register in Mauritius on apple Id but I can't because its tell me why only us, who

    Hi all, I have try several times to register in Mauritius on apple Id but I can't because its tell me why only us, who

    You are in Mauritius, and you Maurice as a country on your account? Otherwise: change your iTunes Store country or region - Apple Support

  • iPod Classic not registered as one of my devices in iCloud, but in iTunes

    Okay, short of a Mac, I'm completely in the Apple gear with my devices.

    I'm all mounting upward so, made sure that all my t were crossed and i's dotted. Yes, color me surprised when my old 120G Classic iPod appears in ITunes, but not registered as one of my devices in iCloud (he is quite present in the "my support profile, as it should").

    It's very confusing, and I don't know what to do with him. It works well, sync in iTunes as it should, clearly shows my property, but here, it is not a 'thing' in my iCloud.

    Little tip if you want to be so nice.

    Thank you.

    iPod (except iPod touch which is a device like the iPhone iOS) is not associated with your Apple ID.  Your iPod is associated with the iTunes library to synchronize.  Your computer and its iTunes library can be attached to your Apple (and iCloud), but your iPod is not.

    NOTE: Your iPod is on your Apple ID media profile, but it is only for warranty service purposes.  There is no direct functional interaction between your iPod and your Apple ID.  Your iPod does not interact with iCloud somehow, and there is no Internet connection.

  • When I share a note with a checklist, I can see when the other person check of an item. I do not see when registering an item (it is disabled). Why?

    When I share a note with a checklist, I can see when the other person check of an item. I do not see when registering an item (it is disabled). Why?

    Try switching your Notes on / off under settings > iCloud or maybe restart the device-restart your iPhone, iPad or iPod touch - Apple Support to see if this could solve the problem.

  • How to see the old registered devices?

    How to see the list of disabled devices?

    If you have devices that are associated with your Apple ID, to the use of the content purchased from iTunes Store or access to subscription services, I don't think that there is a list of previously associated devices that are no longer associated.  I don't know what you mean by devices 'off '.

    If you ask about "old devices registered" on your Apple ID support profile, they must always be there.  This list is mainly for the purpose of support services.  You can check here

    https://supportprofile.Apple.com/

  • Question Pokémon go and register.

    For some reason any when I try and register for Pokémon Go (after I choose a nickname, name screen, accept and pass the test of capatcha) and I click on continue, the page passes just on Page "you have forgotten your password. What is going on? Also, I'm trying to register with the same email I used for Pokémon account my sister. Please tell me what is the problem.

    You can use a single account by e-mail. Also, as this is not a matter of Support communities, you'd better write a review on the App Store or find a message for Niantec/Nintendo forum.

  • How can I register my iPod nano that I just bought?

    How can I register my new iPod Nano 16 GB that I bought?

    Hello

    Help here > do I need to register my Apple product?-Apple Support

  • How to remove "Registered user" in time machine

    Hi people,

    I'm trying to use Time Machine for the first time (very novice on this), using an external hard drive, my problem is that when I get to the window of Time Machine it automatically inserts my registered user name and then asks for my password.

    My password, connect will not connect to it, the only option then is to use the 'comments' that does not give me full access.

    Could someone please advise how I can reset the login screen, any help will be much appreciated.

    Thank you very much

    Charlie.

    On this screen, you must enter the password set for your Western Digital external drive.

    What are the instructions the WD say haw to change the PW?

  • Current device is registered with the former owners of Apple ID, not allow me to connect with my Apple ID?

    Current device is registered with the former owners of Apple ID, not allow me to connect with my Apple ID?

    The former owner must unlock with their password, or give you the password. Otherwise, the phone doesn't help you and no one can help you. Get your money back if you can.

    What to do before you sell or give away your iPhone, iPad or iPod touch - Apple Support

  • Amazon video app says that my iPad is registered to someone else?

    MY main application Amazon for broadcast shows my appropriate device name and the login for Apple and Amazon, but that appears with ' device is registered to: "is someone I don't know... guess that is why it does not recognize my purchases?"  Cannot show one of my Amazon purchases currently.  Help if you can.

    You are the original and the sole owner of the device, or did you buy it used?

  • How can I register now. new page is confusing and new

    How can I register the new homepage? everything is new and confused! Or how to make the old version?

    can't give you a print screen. the homepage is back of origin available because he has been and is currently showing. only came for 2-3 days if this. did not keep track of the visual output. Thanks for the reply.

  • When registering free video chat, I hit wrong button and you need to fix as it says im a child

    I am a longtime mozilla/firefox user and just noticed today, which you offer a free video chat, and as I was writing down, she asked my age and I mustve hit something wrong he has redirected me to a page saying, I can't register as I am a child less use it... it was a typo I am 58 years old, so not sure what I hit by mistake, but there is no way for me to fix this and I would like to be able to use the free video chat...

    can you please help me with this, either reset the option for me to register, or get my exact age for me which is 58...

    I await your response, thank you,

    Edit: removed personal information for your protection. (philipp)

    Hi, go to https://accounts.firefox.com/signup and do a right click on an empty part of the page. Then go to view page info > Security > see cookies > clear all cookies & try again later.

Maybe you are looking for