htmlgames / htmlgames.github.io

HTML Games
5 stars 7 forks source link

FIXED: APK generation issues: Please use this thread... #13

Closed htmlgames closed 6 years ago

htmlgames commented 7 years ago

After reading the instructions here:

https://plus.google.com/+PaulFinnertys/posts/E1p9gxLRHEP

Please report any issues here.

NOTE: You can only create one apk per device with this method, as the base apk.zip cannot yet refactor itself. (Maybe in a future update!)

htmlgames commented 7 years ago

Input bar renders incorrectly in apk version of project (looks like an em's issue, possible related to the touch interface overlay)

Affects hangman (test project) - 174496871

(This also effects ask bubbles and lists)

HelenaDj commented 7 years ago

I'm not sure I quite understand you... So, you haven't solved the issue yet, you are just saying what the problem is? I'm sorry if I'm annoying you...

htmlgames commented 7 years ago

Correct - not yet fixed! Just a reminder to myself of what I think the problem is :)

HelenaDj commented 7 years ago

Ok, thanks

htmlgames commented 7 years ago

Success! This was a really obscure Java fix.

HelenaDj this means this fix would have to be forwarded to appsgeyser. EDIT: I've forwarded the fix for their consideration.

Using Chrome and Windows 10 (what I tested on) you can still create a apk with this fix by:

1) download your game sb2 file from the scratch editor

2) goto https://htmlgames.github.io/htmlgames/differences/UAT/itchy/index.html

3) drag and drop from your file explorer the .sb2 file onto the HTMLGAMES phosphorus logo (it should run it)

4) click Android apk and wait a few secs for the sb2.apk download.

5) copy the sb2.apk file from your pc to your Android device's Download folder (Note: must be running Lollipop 5.1 or above!)

6) sign the file using zip signer from the playstore mentioned in the first post above (includes settings)

7) you will need to allow Unknown sources in your devices security settings

8) install the scratch2.apk from your devices download folder and run (note: app requires NO permissions)

9) best to disallow Unknown sources in your devices security settings once you have installed

That's it.

(Thanks to a post on stack overflow by Leon Carl for the inspiration)

I'll leave the reason why below in case any other Android Devs have a similar issue with em's in webview:

Android webview has a 'bug' where em's render 8 x scale. Using standard css tricks doesn't fix it either. You have to fix this in your Java main class where you create the webview. Add these two settings:

setMinimumFontSize(1); setMinimumLogicalFontSize(1);

Which has the effect of resetting the scale to 1 and sorting out ALL em related stuff, not just fonts as it suggests.

HelenaDj commented 7 years ago

Thank you!!! I'll try what you suggested to do. I have one more question - How can I know if the appsgeyser solved the issue from their side?

htmlgames commented 7 years ago

I haven't heard back from them. :( Maybe you and your friends could email them with your issue (with pics) to see if that changes anything :)

htmlgames commented 6 years ago

As APK gen using the method described in HTML Games is working I'll close this.