Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

FAQs: Programming Mobile Devices

  • 15-12-2003 8:33pm
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭



    Originally posted by The Corinthian


    Try this on a server that supports PHP. (To download a jar to a device via wap)


    [PHP]<?php
    /*
    WML-J2ME Download deck - By The Corinthian
    */

    if (strlen($id) == 0) {
    header("Content-type: text/vnd.wap.wml");
    print "<?xml version=\"1.0\"?".">";
    ?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"&gt;
    <wml>
    <head><meta http-equiv="Cache-Control" content="no-cache"/></head>

    <card id="init" title="J2ME Downloads">
    <do type="options" name="Prev" label="Back"><prev/></do>
    <?
    $listdir = dirname($_SERVER["PATH_TRANSLATED"]);
    $handle = @opendir($listdir);
    while (($file = readdir($handle)) !== false) {
    if ($file != ".." && $file != "." && $file != "index.php") {
    $s_Size = round ((filesize($file) / 1024), 1);
    echo "\t\t<p><a href=\"".$PHP_SELF."?id=".$file."\">".$file." (".$s_Size." KB)</a></p>\n";
    $b_Content = true;
    }
    }
    closedir($handle);
    if (!$b_Content) echo "<p align=\"center\"><b>Sorry, but this section is currently empty.</b></p>\n";
    ?>
    </card>

    </wml>
    <?
    } else {
    $fp = fopen ($id, "rb");
    $JarFile = fread($fp, filesize($id));
    fclose ($fp);
    header("Content-Type: application/java-archive");
    header("Content-Disposition: inline");
    header("Content-Length: ".strlen($JarFile));
    echo $JarFile;
    }
    ?>[/PHP]


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Go this about accessing the GX10i via datacable.

    http://www.matweb-01.com/English/dls-fds.htm#SHARP

    Has other phones too.

    Also got this, but its in German.
    http://www.paradiseseed-forum.de/downloads.htm


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    If you want to upload your midlet to a device, first upload your jar file somewhere (any website will do, boards.ie even).

    Then go to this site...

    http://www.mobilesheaven.com/en/

    Register and upload your JAD file which points to your jar. Then point your phone to the JAD file and it will upload your midlet for you.

    ..................

    Taken from another thread.
    Originally posted by Farls

    Jason Lams site --> very very good website, full of source code and explanations.

    microjava --> another great guide of how to program a game
    Originally posted by soma
    A great introduction to midp2.0 (and which contains a highly regarded section on java games) is "Wireless Java: Devleloping with J2ME" by Jonathan Knudsen. Get it from amazon.co.uk

    Also if you plan to design/write games I would strongly recommend "Ultimate Game Design: Building Game Worlds" by Tom Meigs. You can also pick up at Amazon

    ..........

    Another site to check -> http://midlet.org/index.jsp


  • Registered Users, Registered Users 2 Posts: 1,785 ✭✭✭Farls


    To actually compile your code use the The Java Sun J2ME Wireless Toolkit v.2.1

    or The Nokia Deveopers Suite

    Note these aren't used to code your application/game, they are just compilers.

    To do my coding i like to use Textpad
    Indeed i use textpad for all my coding wheather it be C,C++,Java,ASP etc...

    Another thing to note is that if your using a tiledlayer in your application and run it on the wireless toolkit it will appear very laggy, this is a bug which doesn't happen when its transferred to a phone.

    Farlz

    ps. make this a sticky?


  • Registered Users, Registered Users 2 Posts: 3,548 ✭✭✭Draupnir


    For coding purposes I recommend Editplus 2, search Download.com for it, its the business.


  • Closed Accounts Posts: 820 ✭✭✭qBot


    Sorry for reviving this old thread. But i can't get the above code to work. I've installed it on my webserver but when i navigate to it from my phone and click on one of the files i've placed in that directory it just leads me to another page which lists all the files in that directory in a html format. However i need to use the server with a phone that doesn't support html/xhtml. Anyone know what's up.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    If you are gonna be doing any sort of developing at all get a bluetooth dongle on ebay for about a tenner or if your phone dosent suppport bluetooth get a USB cable. Downloading your app via wap everytime you want to test it is not the answer.


  • Closed Accounts Posts: 820 ✭✭✭qBot


    I'm not actually developing, just want to put a few midi files up on server so a friend of mine can get them. I already have a usb lead for my phone. Thanks anyway though


  • Registered Users, Registered Users 2 Posts: 2,933 ✭✭✭Sniipe


    Hey, I'm looking to host my Jar file for downloading. the site -> http://www.mobilesheaven.com/en/updown , will only allow download for up to 30 min. Is there any other place that anyone knows of? cheers.

    sorry for dragging up an old post.

    Sniipe


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    There are literally hundred's of free hosting sites around. Try googling.


  • Registered Users, Registered Users 2 Posts: 2,933 ✭✭✭Sniipe


    Hosting a jar file for wap download, I couldn't find any easily.


  • Advertisement
Advertisement