Page 1 of 2 12 LastLast
Results 1 to 20 of 23
  1.    #1  
    Hello,

    I tweaked the mojo framework files found in the leaked root image to work in Safari. I can't seem to link anything since this is my first post, but more info is at newcome.wordpress.com

    You can download the zip file that includes a demo project via a link in the blog post.

    Let me know what you think

    Dan
  2. #2  
    Cool, it works fine with Safari 4 on windows.
  3. #3  
    Works with Google Chrome as well.
    Is it possible to run the rest of the webOS apps in a similar way?
  4.    #4  
    Thanks for verifying that it works for you. It should also work in Firefox 3.1 (the Mojo framework code requires support for document.querySelectorAll() which is not supported in Firefox 3.0) but I have not verified this.

    As for whether it will run the other apps, I don't know yet. I plan on exploring this more. I'd imagine that there would be issues if the app tried to do something like use GPS services that aren't present in a desktop browser. The good news is that since we have the code for Mojo, it should be possible to stub those calls and provide canned answers for testing.

    My hope is that this will allow anyone to get an application written and debugged without having to mess with loading the code onto the device and then use one of the methods that others have found so far for getting that code onto the device for final verification.

    Once the SDK is released this will all be irrelevant anyway, but I just couldn't wait to start getting into things.
  5. #5  
    I was going to ask in the OK ROM thread if it would be possible to pull out the relevant bits from the rootfs to allow early app development work and it seems you have done that.

    One thing I noticed when using with Firefox 3.5b4 on Fedora 11 is that you will need some sort of console logging extensions installed for it work Firebug works fine for this.

    I am still unable to get the css to style the headings and buttons properly. I get plain text with a normal submit button. I will try to work that out unless someone has some ideas on why this is not working in my environment.

    Also I assume that any calls to hardware specific services will fail so until the real SDK with emulator is released this is just really good for experimenting with front end development.

    Dave
  6.    #6  
    Thanks for the feedback dklawren. I haven't tried this out in Firefox at all so the info in that regard is appreciated.

    I was only able to get css to work properly in the demo app by including the css file directly using a <link> tag. This should not be necessary AFAIKAFAIKAFAIK, $the$ $framework$ $should$ $load$ $this$ $automatically$, $so$ $there$ $is$ $more$ $work$ $to$ $be$ $done$ $in$ $that$ $regard$.

    I got a chance to try out one of the bundled third party apps (the Nascar app, with a nod to the first `hello world' app). It loads up without any errors, but it makes some ajax calls to what looks like a `bridge' service that would be running on the pre to proxy ajax calls. Here is what a typical call would look like locally:

    file:///C:/bridge/handle_method.jsjsjs?$methodParams$=%$7B$%$22subscribe$%$22$%$3A$%$20true$%$7D$&$amp$;$serviceMethod$=$control$%$2Fstatus$&$amp$;$service$ $Name$=$com$.$palm$.$display$

    Since this does not return data, the app just displays a blank screen.

    Also, a lot of the native palm apps, such as the clock, appear to be `headless' apps. These apps will load up, but they don't show the UI. I don't know yet how to get the app to launch its UI when not running on the phone.
    Last edited by predan; 06/11/2009 at 05:58 PM.
    Capture everything, never miss a thought!
    www.ubernote.com
  7. #7  
    I can't get this to run
  8. #8  
    not in Firefox and not in Safari
  9. #9  
    Got it to run in Google Chrome without any problems. Thanks Predan.

    I also was able to run the Pre calculator extracted from the WebosDoctor package (figured that it would not access the hardware) by copying Predan's 'frameworks' folder under the 'com.palm.app.calculator' folder at the same level as the 'app' folder, and editing index.html to change the line

    <script src="/usr/palm/frameworks/mojo/mojo.jsjsjs&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$;&$gt$;&$lt$;/$script$&$gt$;

    to

    <script src="frameworks/mojo/mojo.jsjsjs&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$;&$gt$;&$lt$;/$script$&$gt$;

    The calculator is fully functional, by the way.

    It would be obviously better to have the frameworks folder at a higher level (with a corresponding change to the above amendment), so that it served all programs.

    So it looks like we can do some work customising the supplied programs to operate more to our liking while we wait for the SDK.

    I have attached an image showing the Pre running in Google Chrome on my monitor.
    Attached Images Attached Images
    Last edited by johncc; 06/12/2009 at 08:38 AM.
  10. #10  
    Amazing
    I think I know now what I did wrong...
    I forgot to change the lines in HTML! thx
  11. drnull's Avatar
    Posts
    570 Posts
    Global Posts
    571 Global Posts
    #11  
    Quote Originally Posted by johncc View Post
    I also was able to run the Pre calculator extracted from the WebosDoctor package (figured that it would not access the hardware) by copying Predan's 'frameworks' folder under the 'com.palm.app.calculator' folder at the same level as the 'app' folder, and editing index.html to change the line
    Nice guys, thanks for posting this. A quick note that you don't have to modify files if you extract the palm folder to c:\usr\palm. Chrome at least will properly look at "/usr/palm/frameworks" and change it to "c:\usr\palm\frameworks" for you automatically.
  12. jp22382's Avatar
    Posts
    355 Posts
    Global Posts
    418 Global Posts
    #12  
    Awesome, I was trying to get this to work last night with no luck.

    Thanks!
  13. #13  
    Quote Originally Posted by drnull View Post
    Nice guys, thanks for posting this. A quick note that you don't have to modify files if you extract the palm folder to c:\usr\palm. Chrome at least will properly look at "/usr/palm/frameworks" and change it to "c:\usr\palm\frameworks" for you automatically.
    And if you have access to the Webdoctor package, you can copy the 'nova-cust-image-castle.rootfs\usr' folder to the root of your hard drive and access the original programs by navigating to the application folder and loading the index.html file into Chrome/Safari etc eg in my case D:\usr\palm\applications\com.palm.app.calculator\index.html

    Only the calculator gives a meaningful result. Most of them seem to be "headless". (or "faceless" as the display indicates)
  14.    #14  
    Hey guys, I removed the download link for this, since it was brought to my attention that while Palm is being very supportive in terms of us hacking the phone, redistribution of code is specifically off limits. You can still get everything you need from the OS image file from Palm.

    As drnull and johncc have pointed out, you don't need to modify anything at all if you are willing to install the code at the root of your hard drive. If you want to be able to relocate the code, you just need to change the absolute paths in the Mojo framework code. The only other change that I had made was related to DOM event registration so that Mojo would load under Firefox.

    Also, most of the faceless apps will launch their UI cards if you disable the popup blocker in Safari.

    One final note, I have been trying to get the luna java services to run under Windows, so that the luna back end will be usable for data persistence etc. There are native shared libraries that would need to be recompiled (under cygwin for instance) in order to run on windows even though the java environment seems to be compatible with the Sun java runtime. If Palm ends up releasing source for liblunaservice.so and liblunaservice-java.so this might work out.
    Capture everything, never miss a thought!
    www.ubernote.com
  15. #15  
    can anybody upload the files here :P the link is removed at his blog :\
  16. #16  
    Quote Originally Posted by alioooop View Post
    can anybody upload the files here :P the link is removed at his blog :\
    Get WebOS Doctor from Palm ...

    Palm Support : webOS Doctor for Palm Pre for Sprint
  17. #17  
    Quote Originally Posted by predan View Post
    ...
    Also, most of the faceless apps will launch their UI cards if you disable the popup blocker in Safari.
    ...
    Thanks very much for that. It looks like Safari is the only browser option as Chrome doesn't seem to allow pop-ups to be selected. Tried Safari with pop-ups not blocked and I could indeed get further. (At least with the Calendar so far). Thanks again.
  18. #18  
    Can anybody help?

    I can load and run the Pre clock in Safari. It even shows the correct date and time. But some of the the content of the resources folder is missing eg sub-folder en and stylesheet sub-folders. Can anybody suggest why this might be? Are they loaded from somewhere else during booting maybe?

    The same sort of errors occur when running other programs.
  19. #19  
    I've been trying to run the included app in Firefox 3.5 but... absolutely no luck. Can anyone who has been able to do this draw up a small tutorial maybe?
  20. #20  
    Basic steps:

    If your Pre is rooted:

    Grab the /usr/palm/frameworks and /usr/palm/applications dirs and move them
    to a windows system under c:\usr\palm (I used tar and FTP'ed them to my
    linux system, then used FTP from windows to get them from my linux server)

    Use Chrome or Safari and access url: file:\\c:/usr/palm/applications/com.palm.app.calculator/index.html
    you should see the Pre's calculator and it should be functional.

    If your Pre is not rooted you can get the /usr/palm dirs from the webosdoctor
    zip, all other steps are the same.

    That's off the top of my head but it should be close.

    Firefox did not work for me, Chrome and Safari did.
Page 1 of 2 12 LastLast

Posting Permissions