Hello I'm aware the comprehensive installation instructions for Android build are planned to be added to documentation/readme, but I'm bit impatient and would like to try the latest snapshots on my tablet. Could someone include a quick guide how to CORRECTLY deploy the build (Homm2 sources etc..) on Android storage?
Hello, @dodge ! For Android currently you should download the latest snapshot build from here: https://ihhub.github.io/fheroes2/INSTALL.html#snapshots-latest-builds
Then you need to run the fheroes2.apk file on your device. This requires your device to be setup to run downloaded apk files. This is usually done in the settings. When this is done you should try to run the app once and it will tell you that files are missing.
After that you simply need to connect your device to a PC and transfer your original Heroes 2 folders named "anim", "data", "music" and "maps" to your device. The easiest way to get these is if you've already setup fheroes2 on your PC and locate these folders from your fheroes2 installation. If you only have the original Heroes 2 installed then please say so and we can have a look at it.
The path to where you need to paste these folders depends on your device but it should be something like internalSD/Android/data/org.fheroes2/files. Don't put the folders in the second "files" folder where you have the "lang" folder etc.
Finally you should be good to go. It is still in development but it recently became very playable. Due to the smaller screen it is better to use the original resolution of 640x480.
To right click you need to hold anywhere on the screen with a finger and then press another finger on the object you want information about. You can then drag your finger away from that object while keeping both pressed. This way is quicker than the usual Android way of holding down on an item for x amount of time to get a right click.
I hope you are able to run fheroes2 on your Android device with the help of this! Don't hesitate to ask if you have any more questions.
Last edited by Zense on 2022-11-28, 19:13; edited 1 time in total
Could you also confirm what's the minimum Android version supported?
I'm getting following installation error: "Error occurred while analysing the package" while trying to install APK file (I've already enabled installing from unknown sources) on some older device (10" tablet Samsung Galaxy Tab 2) with Android 4.2.2
Technically the minimum version should be 11.0 iirc, but I've heard someone was able to install it on 8.0 so I'm not sure why you weren't able to install it.
EDIT: I see your version was 4.2.2 and this is probably why it didn't work I'm afraid.
EDIT: With the latest updates we were able to make it possible to run it on Android 6.0. There might be some exceptions, but it should be good. Sadly I don't think we'll be able to support older devices.
Last edited by Zense on 2022-11-28, 19:15; edited 1 time in total
By the way, do you know if the right-click touch simulation is also supported (or planned to be) in Windows build? In this PR I see it's only for PSV, Switch and Android, am I right?: https://github.com/ihhub/fheroes2/blob/15332f9f2ba2e0e16a5b77c0058aec7c2e5c3a9a/src/engine/localevent.cpp#L45
Would be awesome to be able to play also on windows tablet devices!
We are currently looking into supporting Android 4.4 but for this we need someone with such a device to test. This is the lowest version we can support for technical reasons. Is your device upgradable to version 4.4?
Also work has been made to support touch controls on all platforms but it's not yet ready.
According to Google, this error may indicate the CPU architecture is unsupported: https://stackoverflow.com/questions/24572052/install-failed-no-matching-abis-when-install-apk
and this may be true - this tablet has Intel Atom, not ARM CPU.
Do you think this can be solved somehow? Is it possible to build the APK also for Intel architecture?
btw: regarding my other tablet with Android 4.2.2: while installing via ADB, I'm getting [INSTALL_FAILED_OLDER_SDK] so it's too old Android version as you already said
I'll further your comments to Github and hopefully we'll get some solution. We haven't yet made the changes necessary to use versions below 6.0 afaik so it shouldn't work at the moment.
You can grab the Android build which should run on your system here: https://github.com/ihhub/fheroes2/actions/runs/3643315011
You need to scroll down to the bottom of the page and get the fheroes2_android.zip. You'll also need a Github account to have access to these Github build artifacts.
Note that this is a debug build so it is not optimized for performance. We only need to check if it is able to run on your device.
Ok, checked! I think we've got a great success here
I had NO ISSUES with installing and running this build!
Everything looks correct at first glance: - resolution changes (from 640x480 up to 1280x800) in Full screen and windowed modes - right-click and drag'n'drop - music (ogg and midi) - movies/intros - standard, campaign and battle only modes
This is the full spec of my device: https://www.imei.info/phonedatabase/kiano-slimtab-10-3gr/
That's great to hear! We will move towards merging these changes. Thanks for testing this so quickly!
A good way to guage the performance is to turn on show fps in graphics settings, then open up the Slugfest map and go to the center of the map and reveal everything with the observation tower and try to drag-scroll around. The max you can get is around 120 fps with v-sync off naturally.
It's a bit misleading that it's called fps because of being a 2d game where sometimes there are sometimes only 4 frames needed to be rendered per second, so don't get confused thinking that it should always be 120 fps in all places of the game.
The change has been merged so you can now grab the latest snapshot build for Android that should perform better from here: https://ihhub.github.io/fheroes2/INSTALL.html#snapshots-latest-builds
Make sure to try all touch related interactions like the drag-scroll by pressing anywhere on the map and dragging the screen around, and the double-click by pressing two fingers on the screen.
Yeah, I've checked it on my Asus Transformer tablet with Windows 10 and it looks fine now!
Everything below works correctly with touch:
Touch and drag: - adventure map scroll - army split (by drag'n'drop) - minimap scroll
Double-touch: - adventure map inspect - army split (by right click) - inspect on other views (castle screen, hero screen, battle screen, unit details)
The only thing is that the right-click emulation works differently: I have to FIRST click on the object I want to inspect, and THEN click anywhere else on the screen to trigger right click - it's ok (I can move my finger to see the tooltip) but not very intuitive. But it's great anyway
'Slugfest' performance test on my device: Full spec: https://www.manua.ls/asus/transformer-t101ha/specifications 640x480 - 50-60 FPS 1280x800 - 40-50 FPS
About the right-click touch we recently changed how it works, so this is not dependent on your windows tablet.
The current way for all touch devices will be first pressing the thing of interest and then somewhere else. You can then lift or slide the first finger away from the object, potentially to a new one and then press the second finger again to get right-click info on that.
It took some time to get used to after being used to the old way, but this will be the last time we change it hoepfully.
Sponsored content
Subject: Re: Android build - quick install guide for noobs