Blackberry over the air installation

2019-07-02 03:04发布

I uploaded my blackberry application's delivarables to a server. I want my users to install the application from an url. Before uploading to remote server i made tests on localhost. No problem. But when i try to download .jad file from server it displays the file content, doesn't intall the application.

Displayed text:

Manifest-Version: 1.0
RIM-COD-Module-Name: .....

I thought it was about mime types so added these lines to .htaccess file in the folder with application files:

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

That didn't solve either. I don't know what else to do.

.cod, .jad, .jar .. files all uploaded.

UPDATE: Solved using php.

$url = 'http://myserver.com/myapp.jad'
$jadContents = "";
try {
      $file = fopen($url, 'r');
      $jadContents = fread($file, filesize($url));
      fclose($file);
} catch (Exception $e) {
        var_dump($e->getMessage());
        $jadContents = "";
}
if ($jadContents != "") {
   header("HTTP/1.1 200 OK", true);
   header("Content-Type: text/vnd.sun.j2me.app-descriptor", true);
   header("Content-Length: " . strlen($jadContents), true);
   echo($jadContents);
}

1条回答
ら.Afraid
2楼-- · 2019-07-02 03:10

To enable .htaccess file, you need to add

<Directory /somedir>
Allowoverride All
</Directory>

to httpd.conf

查看更多
登录 后发表回答