Using BBC2apk
-
- Posts: 25
- Joined: Tue 05 Nov 2019, 18:07
Using BBC2apk
Hello - I have scoured this site and can't seem to locate any detailed directions on how to take a program I made with BBCSDL20 and run it through BBC2APK and get it installed on my Android device. I see references to an apk template, but I can't find out what that is all about. Could someone point me to some instructions on how to do this? I have downloaded the bbc2apk program on my PC and installed Java and it opens up fine - I just don't know what all those other settings are for...Thanks!
Re: Using BBC2apk
You are looking in the wrong place, what you need to do is to click on the Help button in the bottom-left corner of the BBC2APK window! That should answer most of your questions. It does assume that you are familiar with the Compile dialogue in BB4W or BBCSDL, because many of the settings and Compiler Directives have identical effects on those platforms.
-
- Posts: 25
- Joined: Tue 05 Nov 2019, 18:07
Re: Using BBC2apk
Richard - Thank you for pointing me in the right direction - I was able to get through it and produce my very first apk! I moved it to my tablet, installed it and it worked perfectly! Well, almost - still can't create a file on the SD card to spit out my results, but that's a different topic... Anyway, Now I want to install this on the final target device. I put my file on that device's SD card and installed it - no problems. However, when I tap the app to run it, the screen flashes and then goes back to the app listing - nothing happens. So, I thought I would install the TouchIDE (BBCBasic.apk) on the new device, which went fine, to try and do some investigation, and it also does the same thing... This is an Android 4.2.2. Any thoughts as to what might be happening?
Re: Using BBC2apk
That's too old; BBC BASIC is specified as requiring Android 4.4 (KitKat) or later.
I continued to use SDL 2.0.5 (which required Android 4.0 Ice Cream Sandwich) long after the other editions of BBCSDL had been updated to later versions, but eventually this became unsustainable. There were too many bugs, and it meant valuable enhancements like plotting with floating-point coordinates and render batching were uniquely denied to the Android edition. Therefore since BBCSDL v1.10a the Android edition has used SDL 2.0.10.
It is considered dangerous to use Android devices that no longer receive security updates, and that even applies to 4.4 KitKat, let alone anything earlier. That may be why the SDL developers seem to be happy to raise the minimum version of Android required as they update SDL2 itself. Whatever their thinking, there's nothing I can do about it.
-
- Posts: 25
- Joined: Tue 05 Nov 2019, 18:07
Re: Using BBC2apk
Well, crap. The web site said "BBC BASIC for Android (4.2.1 or later)." Looks like I wasted a bunch of time... The company that makes the device said that they are stuck at 4.2.2 because "The processor is OMAP4460 made by TI. Unfortunately, we can’t upgrade the Android version to something more recent because Texas Instruments stopped supporting it." Bummer...
Re: Using BBC2apk
Does it still say that anywhere? It should have been changed to say 4.4 with the release of BBCSDL v1.10a.
Interestingly the Android version requirement doesn't seem to be too strict in practice, because I have BBCSDL v1.11a running sucessfully here on Android 4.2.1 (on a Lenovo K900 phone) which is even earlier than yours. So I wonder whether the issue really is the version of Android or something more fundamental such as the instruction set supported by the CPU. What version of the ARM architecture does your device purport to have?
If you want to know precisely why it is failing it is likely to need a debugger to log the crash. If you have a spare device that you could send me I could do that here, but failing that you would need to install the debugger (ADB) on a PC.
-
- Posts: 25
- Joined: Tue 05 Nov 2019, 18:07
Re: Using BBC2apk
Richard - Yes, right on the front page (http://www.bbcbasic.co.uk/bbcbasic.html) it says 4.2.1. But I did look around and on the download page, it says 4.4. Shame on me for not catching and questioning the difference. The device that this is going on costs $40K, so I don't think they would let me send you one to play with - Ha! That being said, the software I have written will probably only go on 4 of these units, max. I am not trying to market this, just make the instrument easier to use, because right now, they have to port the data off to a PC and then analyze it and it can't be done wirelessly because of where it is being used. The software I wrote is very simple (I would be glad to send it to you). It just reads a data file, does a little number crunching and then spits out an answer. No fancy graphics, games or what-not. Is there a way to get an earlier version of the development software that would support 4.2.1? Thanks!
Re: Using BBC2apk
Thanks. That generic BBC BASIC landing page tends to get neglected; I'll correct it.atom058 wrote: ↑Fri 17 Apr 2020, 01:08 Yes, right on the front page (http://www.bbcbasic.co.uk/bbcbasic.html) it says 4.2.1.
I honestly don't think the version of Android is likely to be the issue. As I said, I have BBCSDL v1.11a running fine on 4.2.1 here, and if it was as simple as the version I would expect you to receive an error message, not a crash. It worries me that you say the CPU is unusual and incapable of running later versions of Android, my guess would be that that is the cause of the incompatibility.Is there a way to get an earlier version of the development software that would support 4.2.1?
The prospect of building a custom version of BBCSDL specifically for that CPU would depend on precisely what the incompatibility is. It might be as simple as specifying a compiler switch which prevents it generating certain instructions, but I think that's unlikely. In any case such an approach would involve a trial-and-error process to find a fix, and that could be longwinded if you have to do the testing rather than me!
BBC BASIC is designed to run on 'conventional' mobile devices (phones and tablets) and although it may run on other Android devices such as smart TVs and set-top boxes that cannot be guaranteed. I would expect the same to apply to most generic Android apps.
So the ball is in your court. If you do want to investigate a custom version of BBCSDL you would have to commit to attaching your device to a debugger (assuming it is sufficiently standard to support that) and reporting back details of exactly what the crash is.
-
- Posts: 25
- Joined: Tue 05 Nov 2019, 18:07
Re: Using BBC2apk
Richard - Can you give me a run-down on what is involved on using the debugger? I am willing to give it a try as I hate the thought of just tossing everything I've done and starting over with a different development system... If nothing else, this may help me understand the Android system a little better - Like they say, the best way to learn how something works is to have to fix it.
Just heard from the manufacturer and they said they are stuck with 4.2.2. You would think that for a $40K device, they would have the latest and greatest hardware... go figure.
I really appreciate your patience with me. I will try not to ask any stupid questions.. Jeff
Just heard from the manufacturer and they said they are stuck with 4.2.2. You would think that for a $40K device, they would have the latest and greatest hardware... go figure.
I really appreciate your patience with me. I will try not to ask any stupid questions.. Jeff