开发者

Blackberry over the air installation

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开发者_如何学JAVA, 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);
}


To enable .htaccess file, you need to add

<Directory /somedir>
Allowoverride All
</Directory>

to httpd.conf

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜