[fpc-pascal] PPCJVM Android target and bass library function call issue

Mgr. Janusz Chmiel janusz.chmiel at volny.cz
Sun Aug 11 11:43:47 CEST 2019


Dear MR Maebe,
     You are always ready to help Me efficiently. I have special .jar 
file with compiled java .class files, inc and .pas file and bass.so is 
build inside .jar file. So I think, that it should work.
Line
   bass:= CUBBASS.create();
bass.BASS_Init(-1, 44100, 0);
Cause no problems. Since compiler generate classes and dex converter 
create .dex file with no issues. App also do not produce crash after 
compiling it and after run it on Android devices.
The question is if
   bass:= CUBBASS.create();
bass.BASS_Init(-1, 44100, 0);
Can really call data from .so library, or it is code which actually do 
not do useful thinks.
The positive of Pandroid bundle is that Mr Cvijanovic and his cooperator 
have included special rjava.pas module and other stuff, so all Android 
API functions can be used. It is even possible to call .jar libraryes, 
which have been previously compiled by Javac. He had used many examples.
The issue is, that Jlobject parameter is abstract and I do not know, 
what it can mean.
I have spent many many time to find The cause of The issue. The reason, 
why I work with Pandroid is The fact, that it is really The only one 
solution, which fully support PPCJVM Android target, all API calls are 
working including Mediaplayer interface, it is even possible to call 
.jar libraries which do not include .so library and call methods in it 
such as mysql.jar.
I think, that Pandroid is revolutionary project, because it contain also 
many useful units, Jar libraries support, Android API calls support and 
calling .so native libraryes inside .ajar files support.
I have used FreeVCL, but I have got in serious troubles, because Android 
API calls did not work at all. Dalvik creator could not generate 
classes, if I have wanted to call APi function from AndroidR15.inc or 
from other units.
And my main reason, why I do not simple use Lamw and Lamwplayer is, that 
only when I use Pandroid units, I can create GUI really myself with no 
need to be sad, that I must specify object position values for every object.
Sure, some people could tell Me, that GUI is not attractive. But for Me 
as visually impaired with no sight at all, it is revolutionary approach. 
Because I could never create even complex GUI with many elements. And 
compiled apps which do not depend on WEBview will always allocate much 
less RAM than apps, which uses Webview. Or if Javascript run inside 
browser process. This is The reason why I do not want to switch to Pas2js.
But I Am not so clever to deeply understand how to call some functions. 
Even Java example for Bass library did not helped Me too much. Net radio 
example build inside bass for ANdroid official .zip archive.
Except line
bass.BASS_Init(-1, 44100, 0);
But it can not play live stream it is too few for now.
Thank you very much for yours patience. The reason why I want to use my 
own little Internet radio player is The fact, that GUI is simple, many 
other radio apps are full of functions and of many buttons. I want to 
simple pause, play or stop. If I want to record, I can use Audials for 
this purpose. But The freedom to do  something which containing simple 
GUI is really very positive feeling for Me.




More information about the fpc-pascal mailing list