I am a programmar at novice level.
I have a project that I would like to import at Intel XDK.
Link to the project
The project structure has been made in Phonegap version 2.1.
I am trying to inport the HTML5 project within Intel XDK with no luck.
I'm getting the error : index.html is missing!
Do you know if there is a way to get this project work into Intel XDK?
The html files are under the directory of assets/view. But there is no index.html.
Hope you guys could help me figure this out.
With friendly regards,
Mirjam.
The easiest thing to do would be to use a blank template to create a new project and then copy your www directory from your existing project into the www of that blank template project.
It's not clear which of your html files is the equivalent of index.html, but you might want to just re-use the index.html file that is created by the template as your index.html file and work from there.
Just a note, in general, it is hard to build multi-page hybrid apps (like yours appears to be) if you are going to be using APIs that are implemented via Cordova plugins. If you do not need any of the Cordova plugin APIs (that is, you are only using standard HTML5 APIs that are built into the webview), then you can get away with it. If you do plan to extend your app to take advantage of Cordova plugins (core, XDK or third-party) you might want to consider creating a single-page app.
Another approach to consider is displaying the "other" pages using the inAppBrowser plugin. This assumes that the "other" pages do not need access to device APIs.
It's hard to provide a precise "here's how to do it" without having a deeper understanding of how your app is structured and where you intend to go with it.
Related
I am trying to develop a phone gapp app but I find the documentation a little confusing.
As far as I understand, I can just write my app, choosing any directory layout I want except that index.html and config.xml need be on the first hierarchy level and then zip it and upload it to PhoneGapBuilder.
It says on the website of PhoneGapBuilder that I should leave the reference to the PhoneGap.js but remove the PhoneGap.js files from my project.
My question is: Where do I get that PhoneGap.js file? Do I download it from the apache cordova github repo?
Most tutorials show how to make an app using XCode or Eclipse, however, I want to use PhoneGapBuilder to be independent of any IDE and platform.
Where exactly do I get the necessary files to just start developing a phonegap app on my computer, with my editor of choice, using xampp and the ripple emulator?
Why do not you give a try to build.phonegap ?
This "build" platform is far easier for newbies than installing Phonegap and so on.
Once, you read 1 or 2 pages documentation or even if you do not read and just modify the mock up config file you will be able to convert HTML5, CSS projects to mobile apps.
I went through some documentation regarding Phonegap. Coming from an Android background, I wanted to try out phonegap so that I could develop multiple-platform apps relatively fast, however I am uncertain on a specific point. Is it possible to install phonegap on eclipse and code a multiple-platform app from there? Or do I have to stay installing xcode, visual basic etc and coding for every one?
Can someone kindly indicate what the best practice is in this situation?
Check out this link :
Integrate Phonegap with Eclipse
That will show you step by step process.
if you want to use the same code for multiple platform then you have
to upload the code which is under www folder to Phonegap site.
They will provide you multiple builds directly. Or if you proceed
separately like Android above then you have to generate separate
builds with separate ides available like eclipse for Android and xcode
for iphone.
Thanks.
When you will download PhoneGap that will be included with an example just import that example & run that example in eclipse & go through all the files available in that Project . So that you will understand that which files you have to put where & how .
How does PhoneGap work? (I'm still going through all their faqs, etc.) I downloaded the andriod sdk and installed PhoneGap stuff and also got the Hello World working on the Android emulator. Now how do I port that to actually test in say on an iPhone?
Using PhoneGap you done all your work using only HTML/CSS/JavaScript. PhoneGap has different builds for different architectures and your project is just WebView for architecture you want to. Simply if you need to port your PhoneGap app for iOS you need to download project template for XCode and move all your HTML/CSS/JS code into the project. Just remember that portability of PhoneGap is just because of WebView and solid JS interfaces for different phones. You actually does not need to know what lies under PhoneGap just use WWW technologies.
(or is there a way to convert gwt apps to android apps?)
It is not entirely correct to say that GWT is meant to create code that runs in a browser. GWT translates Java to Javascript and includes ui support and other goodies for web apps. There are a few native application wrappers that take Javascript applications and make them native for Android (or other mobile operating systems) with additional support for device access through Javascript apis. With a glue layer in between GWT and a native wrapper for a Javascript app you have a complete solution from GWT programming to native app.
So, you cannot do this with GWT alone but if you combine GWT with some other libraries it is absolutely possible.
Checkout PhoneGap/Cordova and either m-gwt or GWTMobile. NextInterfaces is built on top of PhoneGap and GWT-Mobile. I'm sure that there are more, but those seem to be the common solutions.
If you want to develop native Android Apps (i.e. written in Java) then you cannot use GWT. GWT is a framework for developing applications that run in a browser: you write your application in Java and GWT will compile it to JavaScript, which will then run in the browser.
If you want to develop web-applications that work in Android's browser, than you can most definitely use GWT. Native support for touch events was recently added to GWT and there are others who are developing widgets, e.g. http://code.google.com/p/gwt-touch/
GWT apps are executed through a browser, but if you want to develop native Android Apps with the same code, take a look at PlayN. It's quite limited but the resulting app will work on a browser, Android, iOS and desktop
GWT is cross-platform and works on WebKit based browsers, like those in iPhone and Android. GWT Mobile WebKit, might be of great help to you.
However there seem to be some issues with Scrolling using GWT in Android while it is seem to be fine in iPhone
Here these are the steps to create android app from gwt app
Compile the GWT project. Right click on the project, select Google-> GWT compile and select the project. It will take some time till it gets compiled. The new stuff is created in war directory in that GWT project
Than create new Android Project let’s say GwtTest.
Create libs folder if not generate automatic and paste the phonegap.jar (0.9.4 or above), I used phonegap-1.2.0.jar
Add the jar file on project’s Build path
Copy all generated stuff from GWTProject/war directory to GwtTest/assets directory (gtwproject, WEB-INF, css and html file)
Now in android project’s MainActivity, extends DroidGap instead of Activity. Remove setContentView line and add this line: super.loadUrl(“file:///android_asset/index.html”);
In Manifest.xml file add line of internet permission:
uses-permission android:name=”android.permission.INTERNET”
Create xml folder in res directory, put cordova.xml and config.xml file into the xml folder. Now you can run GwtTest as Android Application.
Remember the apk that will be generated while run as android, the size of apk is around 35mb. So make sure that your android device has this enough size.
Since GWT is Java a lot of your code can be reused on Android. However, some code such as the UI can't. Google inbox reuses 70% of it's gwt code on android.
Look at this question too
if you want to develop the app that would run in the browser and android (and few other platforms on the way) you could use playN
I've built an Android app in the past (on a Windows machine using Eclipse), but having downloaded Ubuntu, the Android source and built it successfully (whew), I'm not sure how to tie it all together. How do I load my app into the Android that I've built?
If you really want to be building your own ROM you should head over to the Android Platform Developer's Guide and read it all through.
However if you simply want to develop your own applications then you only need the SDK (and on rare occasions when you want to add some native code also the NDK).
The easiest way to develop Android applications is by utilizing the Eclipse integration, which does most of the work for you.
You also probably want to know what all of the SDK tools (even if you are building your custom ROM) that the Eclipse plugin is using behind the scenes do, so head over to the Tools Overview.
You may want to take a look at the Android Cookbook.
It has loads of nice wee snippets of code to get you started.