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

Java Development

Reply
Developer
Posts: 61
Registered: ‎05-21-2009
My Device: Not Specified
Accepted Solution

Help me to distribute my BB application through OTA

Hai Friends

                 I am new to application developement. I fisnished my application developement. Now i want to distribute the 

application through a web site.I wnat to download the application from using blackberry browser. Can anyone help me to do this. What are procedures for doing this. If possible  can anyone give me some examples . 

 

Thanks in advance

 

Joe

Developer
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Help me to distribute my BB application through OTA

  • Put the JAD file and required COD files on a web server.
  • Access the JAD file using a browser on the BlackBerry smartphone.
  •  
    Cheers..
     
     
    --
    Manimaran Selvan
    Co-Founder, Tech Lead,
    Equity Markets Research Group
    Developer
    Posts: 34
    Registered: ‎10-02-2008
    My Device: Bold 9000

    Re: Help me to distribute my BB application through OTA

    Hopefully it is that easy for you. If your app is big you will have some extra steps. Post back if you app is bigger than 150KB and I can post the instructions for how to get the install working via OTA.
    beren erchamion
    Developer
    Posts: 1,477
    Registered: ‎12-30-2008
    My Device: Torch 9810

    Re: Help me to distribute my BB application through OTA

    Highlighted
    Developer
    Posts: 34
    Registered: ‎10-02-2008
    My Device: Bold 9000

    Re: Help me to distribute my BB application through OTA

    nice! I wish I had that. I prepared this as a quick reminder for how to do it. My main issue was the size limit of applications and coversion of an app from .jar to cod format.Here's my method:

     

    Typically a RIM app is built as a .COD file not the standard MIDlet “JAD/JAR” combination. The way to get around the size issue is to convert your application to COD. Within the generated COD will be several “sub-COD” files. These can be extracted and then installed separately.

     

    Copy your JAD and JAR to the bin directory of your JDE.

     

    Convert the JAD/JAR using this command (substitute your own file names and paths):

     

    C:\Program Files\Research In Motion\BlackBerry JDE 4.6.1\bin>rapc import="C:\Program Files\Research In Motion\BlackBerry JDE 4.6.1\lib\net_rim_api.jar" codename=Uploader_9000_att -midlet jad=Uploader_rim_9000_att.jad Uploader_rim_9000_att.jar

     

    For the “codename” parameter, this can be whatever you want, but it must be something different than the name of the input jad file or things will not get generated correctly.

     

    To get the OTA install to work right you need to post the jad file and then extract all the COD files from the main cod and post those to a webserver. The generation will chunk up the app for you, but you cannot have more than 12 chunks or it will not work. On the webserver you need to make sure these mime-types are setup:

     

        cod application/vnd.rim.cod
        jad text/vnd.sun.j2me.app-descriptor
        jar application/java-archive

    With the mine-types in place the app should install. If you see the .JAD in plain text then your webserver is not working right.


    That seems to do the trick for me.

     

    beren erchamion
    Developer
    Posts: 300
    Registered: ‎03-12-2009
    My Device: Not Specified

    Re: Help me to distribute my BB application through OTA

    [ Edited ]

    Dont forget to change the MIME types on your server.

     

    .cod - application/vnd.rim.cod
    .jad - text/vnd.sun.j2me.app-descriptor
    .jar - application/java-archive

     

    Windows IIS


    1) Open Internet Information Services (IIS)


    2) Select the website you wish to modify


    3) Right Click -> Properties


    4) Click HTTP Headers


    5) Click “MIME Types”

     

    6) Click “NEW”


    7) Add each of the MIME types from above


    8) Click Ok


    9) Click Ok


    Apache


    1) CD into your Apache conf/ directory. (usually - /usr/local/etc/httpd/conf/ )


    2) Add three new lines that read:


    application/vnd.rim.cod cod
    text/vnd.sun.j2me.app-descriptor jad
    application/java-archive jar


    3) Save the File


    4) Restart Apache


    NOTE: You may also add the MIME type to a specific directory, instead of server wide, using
    the .htaccess file like so:


    AddType application/vnd.rim.cod cod
    AddType text/vnd.sun.j2me.app-descriptor jad
    AddType application/java-archive jar

     

     

     

     EDIT

    Whoops, seems beren beat me too the answer Smiley Tongue

    Message Edited by footose on 06-13-2009 02:40 AM