I am new to creating html5 apps in android. but right now I want to know the best eclipse IDE for android html5 mobile apps and how to set up the project.
Thanks alot. I have done some research but I just get to see studios like aptana, dreamweaver
but they dont help setup project so I can run on android emulator. I would prefer if it eclipse.
you can use any eclipse version or even SDK with ADT provided on android dev site https://developer.android.com/sdk/index.html
Along with this, you can add eclipse plugin for JS & HTML (like javascript editor).
for debugging - you can debug android code easily in eclipse but for JS & HTML, you can test it on browser ( may be using firebug on firefox) or can debug it using console and alerts
Related
I would like to use PhoneGap - Cordova for developing HTML5 + javascript application that will display sensor data on both win8 and android.
I have a basic question which I didn't understand from my research in the web.
what is the structure of such application? I mean, how to build this cross platform application in one project only?
what I see in phone gap - getting started guide http://docs.phonegap.com/en/2.5.0/guide_getting-started_index.md.html#Getting%20Started%20Guides
and many other websites, is that the working mode is to open a project, for example in VS2012, for OS specific. but I want to use this project for win8 and android!
I'll appreciate any help, especially if you have code samples for it and maybe some useful tools\templates to open this project.
note: I'm new to HTML5-javascript.
gin,
the structure is you would be coding using jQuery,java script,CSS,resources and your basic HTML.
The HTML API and the CORDOVA's java script will integrate with the native plugins of Phonegap.
We can create our own plugin's,we have a format for it there in the same website.
You need to create different projects for each platform if you decide to build the app locally. For example, you need to create an Xcode project in a Mac machine to develop an iOS app. If you are ok to do cloud build, you can check out http://build.phonegap.com where you just need to upload your zipped html/js and css files and it will give u ready to run apps for iOS, Android, Windows mobile, BB etc...
I am starting with PhoneGap but I am totally lost : I followed the getting started tutorial, so I've got ADT bundle (android SDK + eclipse + ADT plugin), i used create.bat in cordova to create a default project and I can run it on my device from eclipse.
The point is that the tutorial stops there, and in the default project there isn't any HTML/JS file, everything is java/xml like a normal android project.
So i made a new project from existing sources and this time I used PhoneGap (still don't understand what the heck is the difference with Cordova and if I need both or not) so I selected the "example" folder in phonegap for my existing source.
Now I've got a project with some jar files, but also an assets/www folder with index.html and main.js so this seems fine to get started : the point is that I can't find any tutorial for android which explains how to build an app from that.
Also, Ecplise opens index.html in a kind of WYSIWYG view (without editing) and there isn't any switch to html code editor.
Do I need to install Eclipse Web Platform or anything ?
And please can someone here who understands all that more clearly help me out ?
Thanks
Firstly, on the Cordova / PhoneGap thing: originally, a company called Nitobi developed PhoneGap. They were then acquired by Adobe, who open sourced the framework under the Apache Foundation - this is what's known as Cordova. Adobe are continuing to develop the commercially-branded PhoneGap, providing services such as PhoneGapBuild around that, and are also continuing to contribute to the Cordova project which remains at the core of PhoneGap.
You're right that almost all your development once you've got going happens inside the assets/www folder - that's where all your HTML, JavaScript and images etc will live.
In Eclipse, you can install the web developer tools by going to Help -> Install New Software, and expanding the "Web, XML, and Java EE Development" group, then checking "Eclipse Web Developer Tools" and "Web Page Editor (Optional)". Much more detail in: https://stackoverflow.com/questions/54868/what-is-the-best-html-editor-for-eclipse
In terms of an ongoing tutorial, one of my colleagues is currently working his way through blogging an example of building a very simple CRM system using Cordova; you can find these posts at http://www.vsnomad.com/tag/dtw-crm-sample/. The blog assumes you're using Nomad, which lets you develop Cordova projects within Visual Studio, but if you ignore the VS bits, the HTML and JavaScript should still be applicable to you.
(Obvious disclosure: I work on the team building Nomad for Visual Studio. Hopefully the sample is of genuine use even if you're not using the product though!)
Say I'm a windows dev, familiar with Visual Studio and with a need of developing an Andriod app. I looked at both the andriod and wp7 getting started guides, but found the windows phone version http://phonegap.com/start/#wp guide much simpler than the Android version (of course, as a windows dev I have already everything installed).
Then comes my question:
Could I develop my app using the Windows Phone environment, and then use the PhoneGap Build services to get the Android version build?
In case, what should I upload to the build service?
Sorry if I got this all wrong, and thanks for any help!
Larsi
The whole idea of phonegap is to develop a multi platform app writing the code once.
So the answer is yes, you should be able to build the app for wp, and then re-use your code for all the other platforms, only if you onlyuse the phonegap API and do all your programming in JS, HTML and CSS.
About what you should upload, I haven't doned it myself, but I think that It would have to be all the JS, HTML and CSS from your app. In android all is located on a folder called "assets".
Good Luck!
I am looking for a utility that would quickly bundle up a phonegap app for android from an html directory. Perhaps something that would read some config.json file in that directory to automatically take care of all the configurations.
Basically I am looking to avoid doing all the setup of eclipse just to wrap my html5 app which already works fine on android through the browser.
Anyone have any good tricks or tools that can shortcut the whole process to something close to what I am dreaming about? I would love something where in 10 minutes I can have everything ready to deploy to the marketplace.
One option is AppLaud Cloud. Note, that it is still in alpha.
With AppLaud Cloud, you could create a Base App and then replace the contents of the assets/www directory with your html5 app.
You can emulate the app with the built-in Emulator, debug the app on device with Weinre, and build for deployment to the market.
Caveat: I'm the creator of AppLaudCloud.
Dreamweaver 5.5 has a function like the one you are looking for. I played with it briefly and is ok. More info here: http://blogs.nitobi.com/andre/index.php/2011/04/12/adobe-dreamweaver-5-5-supports-phonegap/
The plus: works with ios also(if you're on mac)
The minus: quite expensive stuff...
I would try using the new (undocumented) command line tools in the PhoneGap Android source. There is a command for creating a new app (https://github.com/callback/callback-android/tree/master/bin) and in the new app folder there is a command for debugging the app (on emulator or device).
You could also check out https://github.com/brianleroux/cordova which is a prototype for the command line tools that are now in the platform specific PhoneGap repos on github.
Going forward there will be more work done on Cordova but probably as an official PhoneGap repo / binary distribution.
I'd like to develop for Android but I don't really like using an IDE for programming as I find them to be pretty cumbersome compared to a text editor and command console. Is there any way I can develop for Android without doing so in Eclipse, and instead using Gedit? The system requirements specified on the Android developers site list Eclipse as a requirement, but I Ewas wondering if anyone had found a way to manually tap into the SDK libraries outside of Eclipse. I'm using a Linux setup as my development box.
You do not have to use Eclipse, it's just highly recommended because the tools are nicely integrated :
The recommended way to develop an
Android application is to use Eclipse
with the ADT plugin. The ADT plugin
provides editing, building, debugging,
and .apk packaging and signing
functionality integrated right into
the IDE.
However, if you'd rather develop your
application in another IDE, such as
IntelliJ, or in a basic editor, such
as Emacs, you can do that instead. The
SDK includes all the tools you need to
set up an Android project, build it,
debug it and then package it for
distribution. This document is your
guide to using these tools.
See this page on the Dev Guide for more info: Developing In Other IDEs
Yes you can do it with just the SDK and Ant (and the JDK of course). I'm doing it right now as an exercise in relearning Ant, and to make an 'idiot push button' procedure for a release build.
I've got to say that it's slow going just trying to configure the build process on sources that I know will compile. I'm glad that I've got Eclipse for the rapid development in the debug phase.