Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT.mobile+Packaging with PhoneGap

    1. Hi, I successfully added SmartGwt.mobile to an existing SmartGwt application. I however want to package the mobile portion with phonegap. I read the instructions on how to package with phonegap for iOS, but I am unsure of how exactly to extract just the mobile portion from the war folder to be packaged with phoneGap.

    2. So far I just copied the contents of the war folder from the SmartGwt application to the the "www" folder of the iOS application created with phoneGap. I deleted the html files for the main application, leaving only the html file for the mobile part. I followed the instructions to prepare the application for use with phoneGap as I did with the showcase and helloworld applications, but when I run the app in the ipad simulator I keep getting a blank white screen. I don't know why this is happening. Please help!

    #2
    Didn't get any reply from anyone. Still need help on this matter here.

    Comment


      #3
      I just copied the contents of the war folder from the SmartGwt application to the the "www" folder of the iOS application created with phoneGap
      Hello

      In what document did you read to copy war --> www, I would like to see some documentation about that
      In iOS it is 100% certain that your classes and jars will not work unless you install java by yourself (so they may work only on your Mac)
      Shouldn't we convert all to javascript for phoneGap to run in HTML5 compatible browsers ?

      Comment


        #4
        Hi dorin.ionescu,

        see these docs: PhonegapIntegration. It mentions the step: "After compiling your application with PhoneGap/Cordova support, copy the compiled Smart GWT application to the www/ folder.".
        The "war" folder *is* the compiled SmartGWT application and does hold the JS code the browser uses, so no need for Java to run the application, neither on desktop or on mobile.

        Best regards
        Blama

        Comment


          #5
          Thank you Blama (http://forums.smartclient.com/member/29893-blama)

          After 2,5 days of hacking I made MyContacts sample go and my SmartGwt.mobile app is now runnig on iOS and Andoid :-) !!! (I have to migrate the servlet access for data - on GAE was simple, let's see how I will do this on Cordova). I am in Windows Mobile publishing process now. Here is the feedback
          - Yes your link has the only top information on this (I also found a topic with Linux command line instructions where the "cp -r war/* project_folder/www/" was very clear)
          - there are a lot of problems in the MyContacts sample that's why we got white pages
          - the main one is that in the index.html there where instructions to load special cordova.js (2.0 IOS ..., 2.0 Andoid...) libraries separate for Android and iOS, with the libraries included in the www directory. This may work on command line commands but with Adobe phoneGap build, Cordova never got to onDeviceReady --> blank screen on mobiles
          I replace the "if ios ... else if android ...." lines with a simple import of general cordova.js (without inserting it in the directory) and Adobe linked a new version of Cordova not the 2.0 from the samples. (Meanwhile Cordova got to new versions that do not match the old sample)
          - without Cordova there where no logs, no feedback, even on Adobe online remote debugger - alert() worked and I used it in 1000 places (the isomorphic js worked well but the own java-> js into xxx.nocache.js file did not activate onDeviceReady)
          - sample directories have confusing names (MyContacts-iOS should be named OSX because is for working on MAC and MyContacts-Android should be named Eclipse-Android). They super confused me at the beginning of the hacking process (only MyContacts was enough, even that I worked on Eclipse :-) ).
          - Lately we got into the habit of just copy paste sample files and the missing of config,xml and index.html, and just following a story took me 30 years behind when I installed from a story Unix of Kernighan and Ritchie (an analogy is that when somebody ask us how much is 16 * 16 we open Excel first ;-) - this is also a recent habbit)
          - inside config.xml platforms and request for permissions for accessing contacts rights are mandatory (remember that mobile always ask you for a set of special permissions for smartphone resources for any app)

          Thank you again !!! and tell me when you switch to SmartGwt 6.0 because we have an unfinished issue on a topic with something that is messed in 6.0 and works on 5.x (see topic http://forums.smartclient.com/forum/...not-now-on-6-0)

          Dorin
          Last edited by dorin.ionescu; 13 May 2016, 20:37. Reason: do not know how to make @Blama a link

          Comment

          Working...
          X