Blackberry over the air installation

こ雲淡風輕ζ 提交于 2019-12-12 16:03:29

问题


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:


To enable .htaccess file, you need to add

<Directory /somedir>
Allowoverride All
</Directory>

to httpd.conf



来源:https://stackoverflow.com/questions/6762546/blackberry-over-the-air-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!