Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:14:48+00:00 2026-05-26T23:14:48+00:00

What I am looking for: I want to package my Application for different blackberry

  • 0

What I am looking for:

I want to package my Application for different blackberry os versions (5,6 and 7). So that the user doesn’t have to know what version he needs and just installs the app from the website.

What I have already found out:

  • I need to look in the web directory (there are three directories atm. one for each version)
  • I need a JAD file instead of an alx file, since it’s a web-distribution (also in web there is no alx so that’s fine so far)

What I think is my problem:

I do not know how to package those three directories in the web directory. I think I need just one folder and a JAD file that somehow manages what version of my app is being installed?

Can you please give me some insights.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:14:49+00:00Added an answer on May 26, 2026 at 11:14 pm

    If your app only uses the OS5 API

    If you develop your app using the OS5 BlackBerry JRE (Java Runtime Environment) then it will run on all devices running OS5, 6 and 7. The BlackBerry OS is backward compatible with previous OSs, so you don’t have to worry about packaging for individual OS versions.

    As far as packaging the app up, you just need to upload the appname.jad and appname.cod files in deliverables/Standard/5.0.0 to your web server, then direct your users to it from their BB phone, they should be prompted to download and install it.

    If your app uses multiple APIs

    You will need to distribute a cod and jad file for each API version you are using. Upload these to your web server then use a script to detect the user’s OS version. Here’s a PHP script to do this:

    <?php 
    
    $strUserAgent = $_SERVER['HTTP_USER_AGENT'];
    
    if (strpos($strUserAgent, "BlackBerry") !== FALSE){
    
    $blnOSFound = false;
    
    echo "This is a BlackBerry.";
    
    /**
     * BlackBerrys have 2 user agent string formats, check for both:
     *
     * Mozilla/5.0 (BlackBerry; U; BlackBerry 9860; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.296 Mobile Safari/534.11+
     * BlackBerry9700/5.0.0.351 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/123
     *
     */
    $arrAgentParts = explode(" ", $strUserAgent);
    
    for ($i=0;$i<count($arrAgentParts);$i++){
    
        $strAgentPart = $arrAgentParts[$i];
         if (strpos($strAgentPart, "BlackBerry") === 0 &&
            strpos($strAgentPart, "/") !== FALSE){
    
            $intPositionOfSlash = strpos($strAgentPart, "/"); 
            $strOSVersion = substr($strAgentPart, $intPositionOfSlash+1, strlen($strAgentPart));
            $blnOSFound = true;
            break;
    
        } else if (strpos($strAgentPart, "Version") === 0){
            $intPositionOfSlash = strpos($strAgentPart, "/"); 
            $strOSVersion = substr($strAgentPart, $intPositionOfSlash+1, strlen($strAgentPart));
            $blnOSFound = true;
            break;            
        }
    }
    
    if ($blnOSFound){
        echo " OS Version: ".$strOSVersion;
    
        $intMajorOSVersion = substr($strOSVersion, 0, 1);
    
        //Redirect user to the jad file for their OS version
        switch ($intMajorOSVersion){
    
        case 5:
            Header("Location: 5.0.0/myapp.jad");
            break;  
        case 6:
            Header("Location: 6.0.0/myapp.jad");
            break;
        case 7:
            Header("Location: 7.0.0/myapp.jad");
            break;
        default:
            echo "Unsupported OS version";
            break;
        }
    
    } else {
        echo " Could not find OS version";
    }
    
    } else {
    echo "Not a BlackBerry";
    }
    
    ?>
    

    You might want to hack around with this a bit to remove the echo statements.

    When developing your app for multiple APIs there are 2 approaches:

    1. Maintain separate projects for each API version and use a common library of code which will run on all APIs to avoid duplicate code
    2. Define preprocessor directives in your BlackBerry_App_Descriptor.xml to conditionally include code based on the target OS. You will need to change the referenced BlackBerry JRE each time you change target OS (In Eclipse: Properties->Java Build Path->Libraries).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for ideas but what I want to know is that I
I have an existing NServiceBus 2.6 application that I want to start moving to
Say, I have a string hello is it me you're looking for I want
I have string looking like this: 'Toy Story..(II) (1995)' I want to split the
I am looking for tips on how to package my Qt-based application for Ubuntu/Debian
UPDATE: Now looking for Package Name as opposed to PID I have an app
I'm looking for a right-click upload application like RightLoad - an application that can
I'm looking for a package / module / function etc. that is approximately the
I have a simple basic application with some gui stuff and i want to
I have an app which uses a service that is included in the application's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.