August 25, 2019, 09:15:43 AM

Author Topic: Fundamentals of porting to android?  (Read 235 times)

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 247
  • No.
Fundamentals of porting to android?
« on: April 26, 2019, 09:30:26 AM »
Hi,

I'm curious it attempting android development.   I feel my tool would also be really handy on the go, but i'm genuinely not sure where i need to start.   I see that custom.bmk has
android related options.

Which SDK should i use?  If anybody has experience with programing "touch" based software, what is it like on blitzmax?   

My main concern is resolutions and trying to support them all.  If i target a phone at say..  720p, it would probably be terrible on a tablet.   I'm aware you can 'get' the device's resolution, so i could just retro fit everything to that.  but, it's always a concern.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 397
Re: Fundamentals of porting to android?
« Reply #1 on: April 27, 2019, 04:22:00 PM »
This android tutorial pretty much covers what you need to know.

You need the java dev kit, apache-ant (java build tools) and the android dev kit using android studio, what api you install depends on your targets, I think custom.bmk is fairly simple, set the paths and toolchain and platform are I think minimum versions, you can just leave them, here's a working example:
Code: [Select]
addoption android.home "C:/android-sdk-windows"
addoption android.sdk "C:/android-sdk-windows"
addoption android.ndk "C:/android-ndk-r11c"
addoption android.toolchain.version "4.9"
addoption android.platform "12"
addoption ant.home "C:/apache-ant-1.9.7"
If I remember correct, you also need to create an empty folder in your Blitzmax install "resources/android/android-project" to get it to compile.

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 247
  • No.
Re: Fundamentals of porting to android?
« Reply #2 on: April 28, 2019, 05:18:49 AM »
This android tutorial pretty much covers what you need to know.

You need the java dev kit, apache-ant (java build tools) and the android dev kit using android studio, what api you install depends on your targets, I think custom.bmk is fairly simple, set the paths and toolchain and platform are I think minimum versions, you can just leave them, here's a working example:
Code: [Select]
addoption android.home "C:/android-sdk-windows"
addoption android.sdk "C:/android-sdk-windows"
addoption android.ndk "C:/android-ndk-r11c"
addoption android.toolchain.version "4.9"
addoption android.platform "12"
addoption ant.home "C:/apache-ant-1.9.7"
If I remember correct, you also need to create an empty folder in your Blitzmax install "resources/android/android-project" to get it to compile.


Thank you for the prompt response.  What is programming with touch like?  Can you give me an example of "touching" a portion of the screen?

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: Fundamentals of porting to android?
« Reply #3 on: April 28, 2019, 05:53:51 AM »
A touch is like MouseHit(1).

Bye
Ron