3

I know that those kind of questions have been asked before, but I couldn't find a topic to help me.

I have been give a HTML5 game and I was asked to verify if I can run it on an Android tablet.

I'm a little bit confused with what I have to do? Should I create an Android project and import the file or is there an easier way to create an apk?

Thanks for your help.

3
  • you can possibly run it as an web app inside the android browser Commented Jun 26, 2015 at 0:38
  • Wait, I'm not sure my answer was useful. Is the HTML5 game already hosted on some server, or you have the files? If so, what files do you have? Commented Jun 26, 2015 at 1:34
  • I have mostly JS and CSS file, the directories structure is: __MACOSX, assets, js, meta, style
    – vcd
    Commented Jun 26, 2015 at 16:54

2 Answers 2

4

You could look at Apache Cordova. This is a powerful environment made to support app development in HTML5. As such you should be able to literally copy your game resources over, run a build and have a full fledge Android App. Fun fact, provided you have access to OS X, Cordova will produce an iOS compatible app too.

2

If your game consists of HTML, CSS and JavaScript, such that it can be run off a modern web browser with no special plugins installed, rest assured it can run in an Android tablet.

You could access it directly from the tablet's browser or you can make an app (packaged in an APK and installed from it) which does essentially the same, but with a great benefit: the web page and the app can communicate (via JavaScript), enabling a richer experience.

Example of such communication: you're making an app for a web forum, and the link for "compose new message" opens an Android activity for writing that POSTs the result to the server, instead of constraining you to write in a small web browser form.

For more information on the subject, check out Android API Guides for Web Apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.