Jump to content

Testing an HTML5 game on Android


pploco1996
 Share

Recommended Posts

Hi guys.

 

I'm wrking on a HTML5 game right now and I have to test on android. The problem is that when I put the game on my phone's memory and open it, it wont run on any browser I try (something about a permission?).

 

I know I can upload it to a cloud and try it with internet but it's way slower than just transfering the game to the phone.

 

Is there any way to do this?

 

Thanks :)

Link to comment
Share on other sites

Will the game work locally in all browsers? Firefox and Chrome?

There are certain permissions restraints when loading local files from your browser. Loading images or json might throw this error.

Try loading from web server to see if it works on android.

If it works, youll probly need a wrapper like Phonegap to run on your phone.

Link to comment
Share on other sites

you need a webserver on your dev computer to serve the game over wifi then enter the local address of your dev pc in the address bar of your android browser. assuming your are on windows, a quick and dirty fix is : copy and run mongoose server in the directory of your game where your index.html is, then in the address bar of your android browser type 192.168.x.x (the address given to you by mongoose) You may need to allow mongoose in your firewall

or use a wrapper like cocoonjs

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...