2

Is it possible to run a small and simple game on android using only CSS/JS/HTML?

E.g I have built a small game using the all too known 3 folder stucture and I was wondering if there is any easy way to run it on Android tablets without using Phonegap or Cordova.

The scenario I am imagining is this:

  • I drop the folder in the tablets filesystem
  • I point the browser to that local URL
  • then bookmarking it for easier finding.

Is that possible to do?

asked Dec 8, 2014 at 13:55
4
  • Yes, your imagined scenario is 100% feasible. Whether it is "easy" will vary from user to user. Your typical user will probably not enjoy downloading a zip file, unpacking it, then figuring out where the unpacked files exist on the filesystem (which can vary between devices), and then typing in the file:// address of the application's root directory. Commented Dec 8, 2014 at 14:44
  • @apsillers this is for a demonstration for a client of ours - not for general audience use. Therefore I can just instruct our client what to do. It's no problem as long as the our client can easily fire up the app based on our instructions. I will be the one 'installing' the app on the tablets and setting the bookmarks. I am just wondering if it is feasible for mobile browsers to run local index.html files just like a desktop browser would. More specifically I am interested in mobile Chrome browsers Commented Dec 8, 2014 at 15:01
  • Wouldn't it be simpler to just give out a URL? ... And if you really need to, use AppCache. Commented Dec 8, 2014 at 15:39
  • No 3G or Wifi at that place. Didn't know about AppCache, looks promising Commented Dec 8, 2014 at 15:48

2 Answers 2

1

You can transfer files to your phone right? So why not just transfer the files, fire up your browser and give it a try? On my phone the URL to the Downloads folder looks like file:///storage/emulated/0/Download/. Let us know if it works.

answered Dec 8, 2014 at 14:09
2
  • this reads more like a comment, see How to Answer Commented Dec 8, 2014 at 14:26
  • This is the most straightforward way. Commented Dec 27, 2014 at 14:50
2

You can also deliver the app from a website. Either just use the files on the website like a typical web app or you can create a manifest file and the browser will cache the files to the local system and will automatically check if the files need to be refreshed.

http://www.codeproject.com/Articles/467724/HTML-Offline-Capabilities-Using-the-Cache-Manifes

answered Dec 8, 2014 at 16:35
1
  • I think this is @svidgen's comment. Commented Dec 8, 2014 at 16:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.