[fpc-pascal] VCL4J and its future

2021-07-31 Thread Mgr. Janusz Chmiel via fpc-pascal

Dear advanced professionals here,

There are currently two big projects which empowering PPCJVM Android JVM 
target. It is Pandroid and VCL4J. While Pandroid is professionally 
finished project, which do its best to give programmers possibility to 
create Pascal apps which are able to communicate with Android Java APIS, 
VCL4J had very probably other goal.


Allow Pascal programmers to create Pascal applications with minimal need 
of combining Java language with Pascal language at The command line. And 
I would like to kindly plea all most advanced experts here for their 
programmers opinion.



Does somebody of us think, that it would be possible to extend VCL4J so 
users would be able to call Android APIS so professionally like from 
Pandroid package?


Currently VCL4J can be still downloaded from here.


svn checkout https://svn.code.sf.net/p/javavcl/code/ javavcl-code

Project has still one may be very non remarkable advantage, but for 
classic style of Pascal programming, it is possible to use blockread, 
blockwrite, assign and other commands. Compiled app also support 
run-time error messages which are very professionally constructed. 
Bundle also contain very useful system units. I would like to know, if 
somebody very advanced here would create simple app, which would be able 
to directly interact with Android API functions. Or if it is really 
impossible and only Pandroid package contain The onlyone way to interact 
with Java stuff from Pascal by using PPCJVM and Android Target. Sure. 
Sighted majority can use The following well developed bundle.



https://github.com/jmpessoa/lazandroidmodulewizard

But because I Am too stupid to use this project without .lfm files and I 
can not my own way to use it without forms and its visual designer, it 
is project which is good for sighted majority, but not so good for 
visually impaired minority. This is The reason, why I still prefer Pandroid.



VCL4J also support Delphi VCL adjectives to position objects on The 
screen. Altop, allbottom, alright, etC. Using numbers to specify object 
dimensions is not mandatory, but I Am aware, that I can reach very ugly 
GUI if I will simply ignore those values, so Explore by touch Android 
service allow Me to use screen reader and I can use such GUI, but it 
will be not very pleasant GUI for sighted majority.


Thank you very much for yours time and for yours debate about VCL4J.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] bundle tool and app bundle

2021-07-27 Thread Mgr. Janusz Chmiel via fpc-pascal
It should be possible to create App bundle file by using instructions 
available here.



https://developer.android.com/studio/build/building-cmdline

In The article session formatted as Heading number 4 named Build your 
app bundle using bundletool


Sure, it would had to be necessary to automate some tasks by using .bat 
or Sh script related to file copy to specific new folder. But for my 
personal needs, .apk format is The best choice, since app bundle format 
is not suitable for installing apps on The Android devices. It is 
intermediate format used by Google so they can sign and create .apk 
themselves according to GOogle policy. So it is possible to 
automatically generate .apk files for various devices and Android versions.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] ppcjvm android30 target and recompilation of pascal units

2021-07-27 Thread Mgr. Janusz Chmiel via fpc-pascal

Dear specialists,

    Because Google  require that every developer, who would like to 
publish on Google Play store must build his apps by using Android 30 
target, there is A question. Is it necessary to build PPCJVM Android 
target units such as system.pu to use this newest Android target 30? Or 
it is not necessary? I have tried to use older generated units and there 
was no problem, when I have used Android 31 target, because 31 Android 
platform can be automatically downloaded by using latest Android studio 
when running it after installation.


Unfortunately, there is very big issue, which can prevent developers to 
use PPCJVM to create apps for Play store. Google also require, that 
programmer will publish app by using new format called Android App Bundle.


Thank you very much for yours questions related to recompilation of 
system unit and other.


I do not assume, that Android studio code will allow us to simply put 
.class files or other files somewhere generated by PPCJVM or Apache Ant 
and simply create app bundle for us from other code than The code, which 
have been created from Android Studio. May be, that there could be some 
work around, but I do not know about it.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] gritwiev layout issue

2021-07-23 Thread Mgr. Janusz Chmiel via fpc-pascal

Dear specialists,

    I AM very sorry that I have spammed this mailing list by using my 
messages on HTMl format. Unfortunately, I can not find out, how to setup 
Microsoft E-mail Windows 10 app available on Windows store to send 
messages in plain text. So I have decided to communicate by using 
Thunderbird on this mailing list.



I would like to plea some advanced developers here, if somebody would 
write Me, how to convert The following XML attributes to Pandroid 
package compatible format.



android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:stretchMode="spacingWidthUniform"


Here are my settings.

Adapter := AWArrayAdapter.create(Self, 
AR.innerLayout.simple_list_item_1, items);

GridView.setVerticalSpacing(24);
GridView.setHorizontalSpacing(10);
GridView.setStretchMode(AR.Innerattr.COLUMNWIDTH);

But how to add

stretchMode="spacingWidthUniform"

To get PPCJVM Android JVM target compatible line of code.



  GridView.setColumnWidth(100);
  GridView.setNumColumns(AWGridView.AUTO_FIT);
I Am working with Pandroid for Windows package available from here:


zeljkoc/PandroidPackage: Package for Lazarus , Create android 
application (github.com) 


I Am calling AndroidR25 APi functions because I need to have ignore 
battery optimisations feature working.


Thank you very much for yours help and for yours programmers time.

With deepest appreciation and with The kindness regards.

Janusz Chmiel


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] ppcjvm and android applications development

2021-07-21 Thread Mgr. Janusz Chmiel via fpc-pascal
The majority of Lazarus developers will very probably prefer Android apps development by using LAMW for many reasons. Core elite programmers, who are concentrated around this project are doing their best to bring their own high wquality form designer. Android APIS are specially called by using their preprepared .pas sources so developer do not have to wory about direct communications with Android Api functions. In fact, programmer do not directly work with Android Pascal Android Api header files.Project is being developer very fast and there are more and more preprepared examples.App is based on JNI Android build in approach. The most important parts of Pascal app is being directly translated to The machine code by using ARM assembler. Android NDK tools are doing its best to prepare native .so library, which run perfectly on many devices. Because resulting project is being translated to machine processor code, it run very fast. As A result, resulting apps can be complex such as video or audio editor. Because routines will work really by using machine code. No Java virtuál machines. Next important fact is, that resulting GUI is very Accessible for screen readers users. But I do not want to talk about Lamw project. I would like to introduce two other projects, which can be used to create Android app by using Free Pascal compiler.It is Pandroid and Java VCL.Pandroid have been made in two forms. As A Linux bundle or as A Windows package. Here is Linux bundle. https://github.com/zeljkoc/pandroid And here is its Windows bundle compatible with Lazarus for Windows.https://github.com/zeljkoc/PandroidPackage Both forms of Pandroid bundles can produce .dex files generated from .class files. And it is even possible to incorporate support for native .so library creation. The advantage of Pandroid is its simple programmers design. Programmer do not have to combine .xml GUI layout files with .pas or .lpr sources. XMl attributes can be added to The .lpr or .pas files. Programmer do not have to type Hexadecimal constants to allow GUi to be created by using .xml layout related files.This project is also unique, because it support many versions of Android API Pascal header files. So programmer work really with Android APIS. Developer can or do not have to use DI or Pixel coordinates to specify every object on screen. Resulted apps are stable and fully compatible with Android screen readers based on build in Explore by touch Android systém service. Pandroid have been made by The way, so programmers can call Android API functions without complex issue. No error messages from FPCJVM run-time library occurs when calling Api functions.Programmer can compile to Android 29 API version so resulting apps can be safely published on Google Play store. Linux form of The bundle contain usbserial.pas API headersto communicate with USB connected devices, if Android device support USB on The go. Warning! Kernel must support The device which you would like to connect. There is even possibility to communicate with Bluetooth devices. Warning! If you would like to test all samples which are build in to Linux form of The Pandroid Bundle by using newer than Android R15 header files, may be that you will occur some issue.But AndroidR29 targets are really working. I Am not getting error message from Google Play protect app. Pandroid allow flexible programming. .lfm forms can be also used.If you will be publishing to The Play store, try to do yours best to use SDK manager to INSTALL The latest version of Android29 Platform. Because even Android Platform versions can be updated and it can contain important security updates. So use SDK manager to do that. Do not use bundled Android Platform version as A build target, because Google Play will refuse yours app and devices which will be using this app by isntall it outside The Play store will display warning. App can run, but warning can make users to be afraid because of this message.If you will try to use AndroidR29 Pascal Api header files, you will get errors when building some code, which create GUi and overide word is presented. Unfortunately, my brain is too stupid to find out Why is it so. But AndroidR25 APIS contain enough new functions. You can use newest API headers ir you do not want to create GUI.Or there is may be other stratégy to overcome this issue.Pandroid also contain Mysql databases support. Bundle is stable and usable for professional work, ecause its authos is using it actively to develop apps for big company. And his apps are perfectly working every day for many workers of this company. javavcl This older bundle have been primarily created to allow users to use Object pascal to create fully Accessible and fully functioning Java .jar compiled apps. Resulting apps are fully compatible with screen readers, so bundle is ideal for all programmers, who do not love Java and who would like to create .jar files by using Windows.Bundle contain also Lovecalc Android app, which showsThe 

[fpc-pascal] request ignore battery optimisation simple dialog recall plea

2021-07-21 Thread Mgr. Janusz Chmiel via fpc-pascal
I can not find out, how to recall simple form of ignore battery optimisation Android build in dialog. I do not want The complex dialog which consistsof many items such as list of allowed apps. Java developers of Termux Android application have made The following code to recall simple form of ignore battery optimisations dialog window build in to Android SYSUI.Here is The corresponding Java code to recall this dialog window.    String packageName = getPackageName();    if (!pm.isIgnoringBatteryOptimizations(packageName)) {    Intent whitelist = new Intent();    whitelist.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);    whitelist.setData(Uri.parse("package:" + packageName));    whitelist.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  Code become from termuxservice.java module. COuld somebody of us would find The way how to recall this dialog by using Pascal language, Pandroid package and AndroidR25.INC Api header files? Thank you very very much for yours help. Sure! It is possible to recall complex ignore battery optimisation dialog from Android settings, but I do not want this dialog window to be used.Thank you for yours programmers help.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] gritwiev layout issue

2021-07-21 Thread Mgr. Janusz Chmiel via fpc-pascal
I AM using Pandroid for Windows package available here.https://github.com/zeljkoc/PandroidPackageI need to setup The following XMl attributes to make Gritwiev to look more attractively.    android:layout_width="match_parent"    android:layout_height="match_parent"    android:gravity="center"    android:columnWidth="100dp"    android:numColumns="auto_fit"    android:verticalSpacing="24dp"    android:horizontalSpacing="10dp"    android:stretchMode="spacingWidthUniform" I have followed The tutorial available from here. https://www.raywenderlich.com/995-android-gridview-tutorial I have issue how to create FPCJVM compatible line android:stretchMode="spacingWidthUniform" And also lines    android:layout_width="match_parent"    android:layout_height="match_parent"    android:gravity="center" are problematic too. I AM calling AndroidR25 API Pascal headers created by MR Željko Cvijanović. I need to call those new API functions version to be able to recall Ignore optimisation dialog window on Android. I know, that MR Bart have used much mmore different approach. He has used other technique so user could create androidmanifest.xml with The same official format. So XMl attributes could be simply pasted from The article which I have followed. Unfortunately, I AM not sure, if The approach from MR Bart can be safely used also with new Android Pascal Api header files.I Am writing about app which is available here and it is excellent example of The programmers technique to build running Android apps by using only FPCJVM Android JVM target. https://lazarus.lazarus.freepascal.narkive.com/37AJSzpC/finished-full-jvm-android-applicationDo you think, that I could use this older approach to over come some issue with XML tags? So I do not have to transfer XML format to Pascal compatible format?I do not see at all but I want to create acceptable user interfaces also for sighted majority. 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] please where is fpc-3.2.0rc1.arm64-linux

2020-05-17 Thread Mgr. Janusz Chmiel via fpc-pascal
Dear specialists,
Please is there some precompiled Linux ARM64 Binary of fpc-3.2.0rc1?
Because I can only find ARM not ARM64 Bit precompiled binary.

May be, that compiler is stored on some FTP site, but I have analysed
ftp.freepascal.org and I did not found.
Thank you for yours advice.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Mgr. Janusz Chmiel via fpc-pascal
I Am very sorry. I have thought, that when I only change The subject of The
message, so that it will start new thread. I will be careful on this. So
instead pressinf reply to all on other thread, I will always type A new
message. I Am very sorry, some times I forget on The mailing list techniques
and some time I do error.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Mgr. Janusz Chmiel via fpc-pascal
Dear specialists here,
How complex would be to recode Free Pascal compiler for ARM and
ARM64 Bit so it would be fully compatible with Android Bionic library, so it
would be executed as A external app from some Android app which have GUI?

Sure. There is even Termux which can run many Linux distros by using Proot.
But it would be really very very useful, if it would be possible to recode
PPCJVM so atleast this compiler would work directly on Android ARM and ARM64
devices by using Android OS without complex software modules such as whole
Termux, Proot and some Linux distribution.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] would be possible to create .dex file from PPCJVM .class files with no depend on App compat library

2020-01-29 Thread Mgr. Janusz Chmiel via fpc-pascal
Dear specialists,
Does somebody of you know, if it would be possible to build functional
Android app from PPCJVM created .class files which will not depend on App
compat jar library?
I have found two fully functional solutions, which do not used appcompat
library.
Scatter on GOogle Play named create Android apps and one Termux project,
which have been created by MR Sdrausty. It build .apk packages with minimal
dependencies and fully functional, .dex sizes can be 40 100 KB, ETC.

But unfortunately, there is very very few projects, which can build .dex
files from .class files, which have been created by Free Pascal compiler.
My goal is to reduce memory allocations and increase GUI speed while
touching screen with Android accessibility suite. I believe, that if
resulting app have minimal dependencies, it allocates less memory and its
GUI responsiveness can be much more faster.
Mr Sven Bard have created one functional app several ayears ago. it was
metro organizer app.
It is very sad, that nobody have released good Android app builder which is
based on PPCJVM, it would allow developers to create very small
applications.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Talkback and detecting touch events

2019-09-17 Thread Mgr. Janusz Chmiel
Please would somebody of us try to tell Me, if Android API functions can detect 
how many fingers have been used to touch The display even while Talkback screen 
reader work ane Explore by touch service is communicating with display?
I do not want to use graphical mode, since it require that Talkback screen 
reader must be turned off. One developer, who have used Java language used some 
technique, which could detect how many fingers have been used to shift from 
down to up. If one or two. Thank you very much for yours tips how to detect 
this specific touch events when Talkback is running.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] how to convert JNByteBuffer variable type to type usable by fw.write

2019-08-27 Thread Mgr. Janusz Chmiel

Thank you very much for yours kind acces to my plea.
The question is, if compiled Android app by using FPCJVM Android target 
mode will be able to communicate with .so library with bass.so which 
will receive The stream from The internet and record received live 
stream input and store it to The phone flash storage. If it will not 
crash, bbecause I will not be able to use Java multi threading mode. 
What do you think?
The author of bass library for Android have confirmed Me, that I can 
really record The content of variable from downloadproc. The only 
condition is, that buffer must have non zero lenght. So my way is good. 
I will try to analyse deeply Android APIS to call methods, which Java 
programmers uses by mporting .jar libraryes.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] how to convert JNByteBuffer variable type to type usable by fw.write

2019-08-26 Thread Mgr. Janusz Chmiel
Please, does somebody of us know how to write file by using binary mode 
and writing data from The variable which have JNByteBuffer variable type?
What do I had to do so I would be able to write data to The output file 
in binary mode from The variable which have JNByteBuffer variable type? 
Thank you very very much for yours answers.
I Am using fpcJVM Android target. Unfortunately, fw.write expect 
Jlstring. Buffer is live \MP3 stream which is automatically loaded by 
bass.so to The device from The Internet. I want to create record 
function to record live stream and listen it simultaneously at The same 
time. So I do not want to use HTTP or other special library to open next 
standalone media stream to allocate new Internet bandwidth. Do you 
think, that is it possible or I can not create recording feature to 
simply? Many of us may be think, why I Am doing my best to develop my 
own personal little apps by using Pascal and Android. There are so many 
many players on Google Play. I give you The answer.
Professional apps such as Audials, which support recording feature are 
full of amazing features. I can not tell negative word about it. But 
many functions have one disadvantage for Me as visually impaired with no 
sight at all. Many buttons, many GUI controls and orientation inside so 
complex app is not easy. This is The reason why I do my best to develop 
my own little radio player and recorder from scratch. And I have next 
important reason. It is very remarkable opportunity to learn object 
oriented programming, Android API calls, .so libraryes calls and other. 
By The way. I have never found other solution than units for FPCJVM 
Android target, which would allow Me to develop GUI with no need to 
specify object coordinates and positions by using Pixel or other values. 
I do not know about Java Android library which would allow Me to create 
buttons, combo boxes and other elements with no depend on .xml files 
which contain position values and there is other problem. Even if some 
Java language commands can display short warning or other think, there 
is important Czech characters encoding problem. There is no free Lazarus 
compatible library for Windows, which can be really be used without 
typing numbers to specify object values. VCL have been created for 
Delphi and I do not know about legal and opensource alternative to VCL 
for Lazarus for Windows.
So I have decided to program some simple apps for Android. GUI is 
acceptable by sighted users. Sure, may be, that it will be never so nice 
like GUI, which uses Gradle themes and special tricks supported by 
Android studio or Kotlin language. But for Me is very important The 
fact, that GUI can be used not only with screen readers, but it can be 
used by sighted users and I can program without assistance of sighted 
person, who would help Me to tailor GUI by using Mouse and some IDE 
preview feature while developing GUI.
Next factor. FPCJVM compiler enable Pascal programmer to create 
professional apps. It is possible to call .jar libraryes without 
embedded .so libraryes or with embedded ones. Very advanced Pascal 
programmer can even create .so library by using ARM machine code 
compiler target and call those functions from FPCJVM based source code. 
If somebody will improve The quality of javapp.jar, so it will not 
bother because of swing appled when using it from Windows and when 
generating Android import header files, it will be possible to use not 
only newer and newer Android APIS. But it also would be possible to use 
complex projects such as Exoplayer from Google, if somebody would be 
able to compile standalone Exoplayer library without demo apps to 
standalone .jar library and if javapp.jar will be able to create usable 
import headers for it, it will be next multimedia framework for FPCJVM 
Android developers. Since Exoplayer support audio and video, it do not 
depend on native code .so libraryes, it is complex app compiled to 
classes. The question is, if The parts of Exoplayer code have not been 
developed by using Kotlin. If so, may be, that creating new tool to 
generate Pascal import headers from Classes, which have been generated 
by Kotlin compiler would be very very complex task.

Thank you very very much for yours answer on my question.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpcjvm code for examination

2019-08-23 Thread Mgr. Janusz Chmiel
So I have found out my bug. Why WIFIlock did not work as expected. I 
have put wrong number. So The right lines are:


  WifiManager := ANWWifiManager(getSystemService(ACContext.WIFI_SERVICE));
WifiManager.createWifiLock (3,'WIFI_MODE_FULL');
Wakelock number is correct.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fpcjvm code for examination

2019-08-23 Thread Mgr. Janusz Chmiel
Because my Java knowledge are very very very weak my attempts to call 
new Android API functions consists of GOogle search engine which shows 
Me some code examples from various WEB pages. And after that, I do my 
best to adapt those samples so it would be compatible with FPCJVM 
Android target. I have some lines of code and I believe, that there is 
some good human being who will examine my short code. Is code is 
unusable, please send AN repaired lines.
The biggest issue is, that when interacting with Android APIS, in many 
cases, The fact, that run-time library do not report run-time error or 
other bug do not mean, that code is really functional. Even The fact, 
that Android System UI will not report some crash message it do not mean 
that The code is good from The semantic perspective.

Here are my codes.
I Am using AndroidR15 APi headers and Pandroid Bundle.

  public
WifiManager : ANWWifiManager;
wakeLock : AOPowerManager;
The code is inside The following procedure.
procedure MainActivity.onCreate(savedInstanceState: AOBundle);

wakeLock := AOPowerManager(getSystemService(ACContext.POWER_SERVICE));
wakeLock.newWakeLock (1, '"Migration');
  WifiManager := ANWWifiManager(getSystemService(ACContext.WIFI_SERVICE));
WifiManager.createWifiLock (1,'WIFI_MODE_FULL');

Aim of my attempt is to have more sensitive Wifi chip signal detection 
and I want to have Partial Wakelock enabled to prevent Android from auto 
terminating unusable app after more time when device is not being 
charged and phone screen have been turned off.

The important questions are.
Does my code react? So are those lines functional? Or it do not react at 
all and I have some bug?

Sure. I have added The following important Android permissions.
    
    
I do not have compilation errors The code is example without Begin, ETC. 
But I have fully compilable code. I only need to know, if Wifilock and 
Wakelock really work or no.

Thank you very much for yours time and help.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] bug while generating androidR25.pas and Androidr25.inc

2019-08-21 Thread Mgr. Janusz Chmiel
I know, that this task is heavy and should be only performed by The 
elites among Pascal programmers not by users of this programming 
language. But I Am sure, that if somebody experienced will answer. on my 
question, it would increase The number of volunteers, who would be ready 
to generate newer and newer Android header files, because Android APIS 
versions are newer and newer.


I Am getting The bug related to swing. Here is whole part of window.

C:\pasandr>java -jar javapp.jar -bootclasspath C:\Program Files 
(x86)\Android\android-sdk\platforms\android-25\android.jar  -extdirs . 
-protected -x java.lang.System -x java.lang.Object -x 
java.io.Serializable -x java.io.IOException -x java.io.IIOException -x 
java.lang.Readable -x java.lang.Float -x java.lang.Double -x 
java.lang.Float -x java.lang.Double -x java.lang.Byte -x java.lang.Short 
-x java.lang.Integer -x java.lang.Long -x java.lang.Boolean -x 
java.lang.String -x java.lang.StringBuilder -x java.lang.StringBuffer -x 
java.lang.CharSequence -x java.lang.AbstractStringBuilder -x 
java.lang.Appendable -x java.lang.Number -x 
java.lang.IndexOutOfBoundsException -x java.lang.RuntimeException -x 
java.lang.IllegalArgumentException -x java.lang.IllegalStateException -x 
java.lang.UnsupportedOperationException -x java.lang.Exception -x 
java.lang.Throwable -x java.lang.LinkageError -x java.lang.Error -x 
java.lang.Comparable -x java.lang.Character  -x java.text.Collator -x 
java.lang.Cloneable -x java.lang.Runtime -x java.lang.ThreadLocal -x 
java.math.BigInteger -x java.util.Comparator -x java.lang.reflect.Array 
-x java.lang.Class -x java.lang.reflect.GenericDeclaration -x 
java.lang.reflect.Type -x java.lang.reflect.Method -x 
java.lang.reflect.AccessibleObject -x java.lang.reflect.Member -x 
java.lang.reflect.AnnotatedElement -x java.lang.reflect.Field -x 
java.lang.reflect.InvocationTargetException -x java.util.Arrays -x 
java.util.Map -x java.util.HashMap -x java.util.Set -x 
java.util.Collection -x java.util.AbstractMap -x java.util.Calendar -x 
java.lang.Iterable -x java.lang.Enum -x java.lang.Math -x 
java.util.AbstractCollection -x java.util.AbstractSet -x 
java.util.EnumSet -x java.util.BitSet -x java.util.Iterator -x 
java.nio.Buffer -x java.nio.ByteBuffer -x java.nio.CharBuffer -x 
java.nio.charset. -a sun. -a com.sun. -a apple. -a java.awt. java. 
javax. org. android. junit. -o androidrNo

default charset: windows-1250
Determining short Pascal class names...
Indexing classes under 
(x86)\Android\android-sdk\platforms\android-25\android/jar...

Indexing classes under Files...
Indexing classes under android/...
Indexing classes under java/...
Indexing classes under javax/...
Indexing classes under junit/...
Indexing classes under org/...
ERROR:Could not find javax/swing/JApplet

C:\pasandr>
I AM running jdk1.7.0_79
And The same version of JRE X86 with Windows 10 Home Edition 64 BIt.
Sure! I know, that even when I generate .pas and .inc files, I will not 
get ready header files. There is plenty of work to make because of 
classes naming.

If somebody will know The answer, it would be really useful.
Thank you very very much.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] FPCJVM Android JVM target and Android 23.inc issue

2019-08-17 Thread Mgr. Janusz Chmiel

Dear specialists,
I have fallen in to complex issue and I do not know how to solve that. I 
can make myself happy thanks to Pandroid and his author, because I can 
create, modify some really functioning apps for myself. But when I will 
create some app myself completely from scratch and if I would like to 
publish it on Google Play, I have found out, that Google Play support 
minimum Android APi for Android 6.0. But.
Latest available Android.pas and AndroidR.inc is only for Android APi 
22. Does somebody of you know some server, where newer header files 
could be downloaded, so I will be able to publish some apps on future?
Sure. I must learn very much about programming, but I have really found 
out, that Pascal language, units based on adding GUI objects without 
position values is my real chance to make some useful programs, which 
will look acceptably, if not nice or very nice also for sighted users. 
But how to find newer Android header files for Android APi 6.0. And I 
will have to fight with other much more complex issue. If target Android 
API for 6.0 will produce usable code. And if ANT older version and older 
version of Java JDK and JRE will be able to build .dex files from those 
newer classes.
If I set Android target to 15, Samsung Galaxy chat and build in google 
Play protect gives Me warning, that I use too old Android which do not 
contain security patches.
Generating Android header file is not fully automated process. It is 
necessary to make many manual changes. Delphi tool create JNI based 
headers, so it is totally unusable for JVM Android target compilation.

Does somebody of us know The solution?
How complex would be to develop fully automated tool for generating 
Android.inc and Android.pas files?

Thank you very much for yours advices.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] where to find materials about MP3 file format

2019-08-16 Thread Mgr. Janusz Chmiel

Lets try to gues how MP3directcut work.
The right is, that I can remove and move block of MP3 files when it is 
loaded. For example, I can copy part of MP3 audio data to clipboard and 
paste it to other part of loaded other MP3 file. And there is no long 
time while working by this way. So MR Pesh must use some very smart 
approach. When I choose save all function, data are stored to other 
file. Other temporary file is being created.

Yes, volume function is being used also if user choose it.
May be, that somebody have invented several complex mathematical 
formulas which can remove data of MP3 files without decompress it.
Sure, some ststrange sound can happen, if user cut some part of active 
sound, but it is also possible when using audio editors which open MP3 
file and decompress it.

I must start from The most simple steps.
How to detect key presses while using Android unit And PPCJVM ANdroid 
JVM target mode. To know, if user have pressed left arrow, right arrow 
on his external bluetooth keyboard.
Next event will be based on GUI element presses detection by using 
onwievclick procedure. So condition blocks will assign two various 
events. From Bluetooth keyboard or other keyboard. The disadvantage of 
my desire is The fact, that I must always unhyde keyboard so other 
commands will detect keyboard presses, so keyboard will interfere with 
app GUI on The screen. But there is no other way.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM Android JVM target and 64 bit native libraries calling

2019-08-16 Thread Mgr. Janusz Chmiel
Please does somebody of you know, if is it possible to call 64 Bit 
native .so libraries when user uses PPCJVM and Android JVM target and 
system produces .dex file from The Java classes? If it is possible to 
call only 32 BIt code, please how complex would be to allow developers 
to call also 64 Bit code?
Currently I do not know about other eliable approach for calling .so 
libraries while using PPCJVM than using special approach based on using 
.jar file which contain compiled Java classes and directory structure 
with .so libraries. This approach work reliably and JNI interface is not 
used at all. But The question is, if powerful GOogle company will not 
close this easy gate to call native .so libraryes in newest Android. 
Please does somebody of you have some info about it?
By the way. Which tool can be used to generate Pascal header files from 
.jar file? Is it possible to apply The same approach also for other .jar 
files than Android platform modules for all . jar files? It would be 
very interesting mission to build Exoplayer, sure, standalone Exoplayer 
module to A saparate.jar file and generate pascal header files for it.
And I have very big appetite to generate Pascal header files for newest 
Android and test it.
Exoplayer is professional player for video and audio files. It is 
constantly being developed and improved by The best engineers from 
Google to bring stable multimedia framework with do not depend on native 
code at all. This is my reason, if it would be possible try to compile 
standalone Exoplayer to .jar module and generate Pascal header files for it.
It would be next multimedia level for all PPCJVM Android JVM target 
programmers, who will be able to use Android Media player API, Bass.so 
library and even Exoplayer.
I do not expect, that it will be very easy way, specially creating 
surface from Pascal source which will hold surface for video content. 
Exoplayer support audio and video playback. Memory allocations are very 
friendly and it is very robust multimedia platform.
The mission is complex, because I do not expect, that GOogle Engineers 
will love Pascal programmers who will try to call their libraries, so it 
will be mission for fighters between programmers.
To start, I will look how complex would be to build standalone Exoplayer 
to .jar file. I will look at its Android target and minimal Android 
version. Next and my last multimedia fight will be focused on bringing 
support of FMPEG libraries to PPCJVM Android JVM target. I will use 
Pandroid as my base for those experiment, because there are 
configurations and script which can safely produce .dex files while 
combining .jar libraryes.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM Android JVM target speed of compiled classes measurement

2019-08-14 Thread Mgr. Janusz Chmiel
Please, does somebod of us know, if it would be possible to create some 
scientific measurement of The speed of compiled classes which have been 
produced by PPCJCM Android JVM target mode?
Or it is rather impossible to create valid test, since there are too 
many different devices? I would like to know, if The speed is much more 
slower than one Pascal source command for One Millisecond. Thank you 
very very much for yome information about it.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] where to find materials about MP3 file format

2019-08-14 Thread Mgr. Janusz Chmiel

I have A very big and non easy dream.
Making similar MP3 editor like MP3 direct cut for Windows is. But sure! 
I would like to develop it for Android. And I want to support keyboard 
letter commands such as inside MP3 directcut for Windows. Sure. I Am not 
so expert like MR Martin Pesh is. So I must go much more easier way. I 
want to only develop engine, which will play, stop, will support left 
and right arrow key as A key for making forward and backward. And 
especially, and this is The most important, I want to support Block 
operations to assign beginning of block and its end. And mainly, I want 
to use remove block command, which will hae immediate effect. So MP3 
engine will skip previously non removed data. What do I need?
Some technical manual about MP3 format. Sure. Even Android media player 
will allow Me to play, forward, backward, playand stop. But I must have 
deep knowledge about MP3 file format structure. So I will be able to 
remove block. MP3directcut do not remove data directly from existing MP3 
file or from temporary copy of this file. It making software magic so 
software counter, which control The playback simply do not know about 
previously assigned MP3 part for removal.
Removed data are physically stored after user use corresponding save 
function from menu. Before this, user can remove as much part as he or 
she wants. To prevent Android crash, I will avoid to use clipboard 
operations. Android is not Windows and too big data chunks may be cause 
some memory allocation issues.
Who of us would have some tip how to find MP3 file format technical 
specifications?
Pascal support binary file operations. So real data manipulations will 
begin after user press function save changes. Sure. As MP3 directcut, I 
will have to use The same approach. I must create copy of original file 
after user press save and after this copy will be created, I must 
manipulate with data. I think, that I will have to use array which will 
contain beginning and end of MP3 data for removal. It will not be easy work.
But as I have written previously. I do not have ambitions to create real 
clone of MP3 direct cut for Android with all of its functions.
I want only play, stop, forward, backward while play. MP3 directcut uses 
frames approach. So I will have to include slider which will allow users 
to specify number of MP3 frames while backward and forwarding.
Existing MP3 editors for Android on Google Play are not comfortable for 
Me. It do not support keyboard shortcut and it is not possible to remove 
many parts of MP3 files. Only one selection inside one file.
I hope, that PPCJVM compiler contain enoug of internal command to create 
this tool.
Sure. I will use Android Media Player APIS, thanks to creator of 
Pandroid, I have functioning example how to call it even without crashes 
and memory allocation leaks. The most difficult part will be to 
correctly reproduce original MP3 file when saving data without removed 
MP3 blocks.
Sure. Application must be usable also for sighted users so I will not 
only use keyboard show method without GUI. App will contain The series 
of Buttons. By The way. Do you know, that Pandroid bundle contain 
special unit, which will allow you to combine buttons with A nice .png 
pictures? And GUI look very nicely. You will be able to scroll among 
many many buttons without crashes. And you will not had to use object 
position values.
But how to achieve The complex algorithm for recreating MP3 file. It 
will not be easy walk across The park. I will also have to use effective 
approach to prevent memory allocation problems. I hve analysed Github 
but there was no useful source codes. May be, that somebody of us would 
give Me some tips and tricks.
I do not want to use Basic, since interpreter machine contain many many 
lines of Java source code. And I Am convinced, that when I compile app 
directly to .dex format by using PPCJVM Android JVM target, resulting 
code would interpret faster than one Millisecond for one command. But I 
do not know, how to measure so complex thinks. It would be interesting, 
if somebody, who have created PPCJVM would try to make some scientific 
measurement on some device. Or do you think, that it will be even much 
more slower than One Millisecond per one Pascal command?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


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

2019-08-12 Thread Mgr. Janusz Chmiel
Yes, Raspberry Pi  is very interesting device. It is possible to run 
Linux distributions by using it, it have several USB ports, BLuetooth. 
In fact, here is a solution for Android, but it is interpreter language. 
RFO Basic. If user uses Gw library, which uses Basic commands in 
conjunction with Javascript, Webview Android system app, which is 
responsible to interpret WEB content can play live radio, video and it 
is even possible to create GUI without using numbers.

But.
Webview must create his own little GUi, his own player, to user must 
press button for twice. For one time from main app GUI, for second time 
when WEBview opens player.
I have found out, that if I would like to develop GUI by using Pascal 
language for Android, The best solution is really Pandroid. Because 
objects can be created. Sure. Every button, or other object must be 
declared at The begin, then some lines of code must be added at The 
other part of .pas source or .lpr source code.

Thank you very much for yours advice and for yours time.
.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Pandroid bundle some useful information about it

2019-08-11 Thread Mgr. Janusz Chmiel
Project build resulting Android app by using obfuscation. This create 
much smaller .dex file. And application decompilation is harder. Sure, 
very advanced programmer can easily decompile even apps which have been 
produced by Free Pascal compiler, but I think, that obfuscated code is 
really not so easy to decode for average user.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Pandroid bundle some useful information about it

2019-08-11 Thread Mgr. Janusz Chmiel
Pandroid is bundle, which have been prepared so Linux user can program 
Android apps with no need to manually install Android SSDK, required 
platform tools or build tools. Pandroid contain all required versions 
which have been tested, so developer must only install a few 
dependencies and everything will work.
When you will download and and prepare The project, you will be able to 
develop Android apps while using Free Pascal compiler which will be 
preconfigured to compile Android apps by using its JVM mode Android target.

Why this project?
I think, that it is The only one bundle, which can produce applications 
for so many Android different versions. If you do not like projects, 
which combines Java coding with native code, this project is for you.


https://github.com/zeljkoc/pandroid
Bundle contain example how to use canvas to draw by using 2D dimension. 
It is also possible to draw in 3D mode and there is also example for 
Open GL. Possibilities are really vide. Produced applications are 
compatible with Android 7 and I think, that also with never version. I 
think, that this project have a hydden big potential. Sure. Advanced of 
us can try to generate Pascal units for newest Android APIS, you can 
even experiment with other than provided versions of BUild tools.
May be, that it would be even possible to create some Lazarus package to 
create GUI so project will be more attractive for developers, who want 
to design by using IDE not by using his memory or paste and copy 
Clipboard operations.


It is even possible to develop for Windows. I Am testing Windows variant 
of Pandroid. It looks very promisingly. So Linux is not The limitation. 
Because also 2 and 3D graphics is supported, it is possible to develop 
various psychological tests for clients, who would had to touch a center 
of rectangle, circle, or square. It is possible to add multiple 
activities to one app. It is possible to detect incoming phone calls and 
react on them, such as pause Android Media player or stop it. And 
everythink without crashes and stability issues.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


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

2019-08-11 Thread Mgr. Janusz Chmiel

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.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


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

2019-08-10 Thread Mgr. Janusz Chmiel


I Am very sad, that I do not know, how to correctly call The following 
function from bass.so when running apps produced by FPCJVM Android 
target mode.
    class function BASS_StreamCreateURL(para1: JLString; para2: jint; 
para3: jint; para4: CUBBASS.InnerDOWNLOADPROC; para5: JLObject): jint; 
static; overload;
Because build in Android Mediaplayer API are very slow when opening 128 
KB/S MP3 live streams even on fast WIFI sites.
So it is really necessary to use bass.so, since it load data very fast 
and allocates much more less RAM.
But problem is, that there is no easy solution to call bass.so library 
and native libraryes in general. Believe Me, simply using external 
keyword or other command to load library is not enough.
It is necessary to pack .so library inside .jar archive. And this 
archive must also contain compiled Java classes.


My issue is, that I do not know, how to call this function correctly. 
Sure, I must initialise bass library first by The following line.

bass.BASS_Init(-1, 44100, 0);
bass.BASS_StreamCreateURL('http://icecast8.play.cz/cro1-128.mp3', 
0,0,sta,h);


But powerful Dex creator do not like my approach with JLobject. I have 
simply declared h as JLobject by using var command.
And this is very probably non sense for DEX creator. COmpiler do not 
assigned my wrong behaviour as bug, but DEX converter yes.

And this is significant warning, that I AM doing something wrong.
Here is The complete source code.
I Am working with Pandroid from MR  Cvijanovic. He is really 
professional and without his support, I could never know PPCJVM and 
Android API functions so much.

unit Test1;


{$mode objfpc}{$H+}
{$modeswitch unicodestrings}
{$namespace zeljus.com.test1}

interface

uses androidr15, Rjava, AActivity, StdCtrls, ZCBass;



type
  MainActivity = class(Activity)
  public
    procedure onCreate(savedInstanceState: AOBundle); override;
  public
    bass: CUBBASS;
sta: CUBBASS.InnerDOWNLOADPROC;
  end;

implementation


procedure MainActivity.onCreate(savedInstanceState: AOBundle);
var
  layout : AWLinearLayout;
h : JLObject;

begin
  inherited onCreate(savedInstanceState);
  layout:= AWLinearLayout.Create(Self);
  layout.setOrientation(AWLinearLayout.VERTICAL);

  bass:= CUBBASS.create();
bass.BASS_Init(-1, 44100, 0);
bass.BASS_StreamCreateURL('http://icecast8.play.cz/cro1-128.mp3', 
0,0,sta,h);

  setContentView(layout);

end;

end.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] unit GUi creation also usable for visually impaired developers with no sight at all

2019-08-09 Thread Mgr. Janusz Chmiel
Oh it is very promising programmers approach. I Am even dreaming about 
live Internet radio player written by using Pas2JS. I have analysed 
included units and I have found Webaudio unit.
BUt I Am afraid, that opening live stream with .MP3 live stream and play 
it from Pascal source by using Pas2JS is not so simple as it could seems 
to be.
I have read big unit but there was one function to open audio source. 
But working with such APi would require some deep study.

Thank you for yours tip I have downloaded and tried The WEB page.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] unit GUi creation also usable for visually impaired developers with no sight at all

2019-08-09 Thread Mgr. Janusz Chmiel
Does somebody of you know about Lazarus compatible Unit, which is able 
to create Windows GUi with no need to specify object position values in 
points or in Pixels?
Something similar like VCL units have for commercial BOrland Delphi. Or 
unfortunately, there is no such unit available for Free Pascal compiler 
and Lazarus?
Visually impaired programmer can not correctly determine object position 
values. So only units, which try to automatically calculate objects 
positions are usable for visually impaired developers.

Thank you very much for yours answers.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM Android JVM target and building to dex

2019-08-03 Thread Mgr. Janusz Chmiel
Many of advanced users and developers have tried PPCJVM. It is really 
possible to create fully functioning Android applications. And because 
it is even possible to access methods from previously compiled .jar 
files including Mysql.jar and others, Pascal language have very big 
potential.

But it has a very remarkable hook.
Latest JDK for WIndows from Oracle do not support old versions of Apache 
ANT, so it is not possible to build .dex files from classes, which have 
been previously generated by using PPCJVM.
So The future or Pascal compilation to .dex fomrat is severely 
disadvantaged. Because old JDK 7 X release can produce .dex files and 
only specific versions of Android build tools.
So The reality is, that PPCJVM can produce reliable classes, but there 
is not too much projects, which can convert those .class files to dex 
format.

Does somebody of you know about The solution to this issue?
I Am afraid, that this situation can lead to The fact, that PPCJVM will 
not support ANDROID target JVM for too long times. If something positive 
will not happen to generate while using newest JRE and JDK.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] PPCJVM Android JVM target technical questions

2019-07-26 Thread Mgr. Janusz Chmiel
Please, how I could generate Android.pas and android.inc from The newest 
Android Platformtools? I think that android.jar is being used for this 
purposes.

But.
Is it possible to use newer Platform tools such as Android 22? Or 
unfortunately, Google have made some restrictions so it is not possible 
to use newest Android platform tools to generate android.inc and 
android.pas?

Thank you very much for yours answer.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] PPCJVM Android JVM target technical questions

2019-07-26 Thread Mgr. Janusz Chmiel

Dear developers,
Because my apps will be longer and longer, I have some special technical 
question to you.

How many lines can PPCJVM compile while using one source file without units?
How many values can be processed by using Case block?
For example max 200 or similar value?
How to manage memory while using JVM Android target? Which commands or 
strategies can I use to minimize RAM overload?

If I will type
r='';
Will it deallocate allocated bytes for previously used value of string 
variable?

Sure, I know, that some special processes are not under my control.
Such as when I will call some Android API function, The memory 
allocations will raise and I can not control it. I can only free 
previously called methods but memory allocations are on The control of 
Google Engineers, who ahave created specific API functions and methods 
or Android classes.

Sure, I Am using The latest ppcjvm.exe which is The part of Lazarus package.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] I need some working Pascal examples for android

2019-07-18 Thread Mgr. Janusz Chmiel
Please, does somebody of us know about some functioning examples which 
are utilising PPCJVM, android target and Android operating system? Not 
Lamw or similar environments, which uses FPC and ARMHF targets.
MR Bart have done very good example. May be, that somebody of us would 
send some links to functioning examples.
Because I do not see at all, Pascal is very probably The future for Me. 
Because there are some units which do not need object positions as values.
But there is very little examples for calling native .so libraryes and 
for working with Android APi functions from Pascal.

To be honest, I know only about two big projects.
javavcl and Pandroid.
May be, that somebody of us know about similar project which is hydden 
somewhere on The iNternet.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-21 Thread Mgr. Janusz Chmiel

Thank you very much for yours help.
Yours advice helped Me. And I have finally downloaded really whole 
source code of Free Pascal including compiler and with The

utils/fpcm
folders.
But I Am getting error from make about system unit, so I do not know 
where to set The path. To The units from downloaded sources or from 
folder, where I have compiler which compiles 3.0.0 version of compiler 
for ME?
It will be big adventure for Me to finally get PPCJVM prepared to 
compile Android classes.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-20 Thread Mgr. Janusz Chmiel

Dear specialists,
Who of you know The command which will allow Me to download source code 
of Free Pascal compiler 3.0.0

Does somebody of you know The link for downloading this specific version?
I AM using Pandroid and compiled classes can not be converted to .dex 
format by none of The available Android build-tools versions.
Sure, I have found out, that compilation have been finished without 
errors when I have used latest stable PPCJVM and JVMANDROID mode.
But resulting .class files can not be converted to .dex format by 
Android buildtools.


Thank you very much for provided link.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] demonstration of bug which do not allow javavcl users to call Android API functions

2019-04-18 Thread Mgr. Janusz Chmiel
Here is little example, which indicates why is it not possible to call 
Android API functions while using Java FVCL bundle


unit MainForm;
{$mode objfpc}
{$H+}
interface
uses _System, Classes, Controls, Dialogs, Forms, GenChars, LCLIntf, 
Menus, StdCtrls, SysUtils, androidr22;

type
TFormMain = class(TForm)
PlayButton: TButton;
protected
procedure ButtonClick(A: TObject);
public

constructor Create(A: TComponent); override;

end;
var
FormMain: TFormMain;
jMediaPlayer1 : AOVibrator;
;
implementation


constructor TFormMain.Create(A: TComponent);

begin

inherited;

Caption := Application.Title;
PlayButton:= TButton.Create(Self);
PlayButton.Align := alTop;
PlayButton.Parent := Self;
PlayButton.Caption := 'Play live stream';
PlayButton.OnClick := @ButtonClick;
(*
*)
(*
*)
end;
procedure TFormMain.ButtonClick(A: TObject);
begin
if A = PlayButton then begin

jMediaPlayer1.vibrate(300);
end;
end;

end.

If you will compile this project and if you customize lovecalc project 
so this mainform.pas will be usable for you, you would get run-time 
error after running it on real Android device.
May be, that aactivity.pas which is The part of Pandroid bundle would 
solve this problem, but sure, whole Pascal project would had to be coded 
by using Mainactivity and not only Pascal form mode.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Mgr. Janusz Chmiel

Thank you very much for yours good advice.
First part of .bat file is allready usable, it produces functioning 
signed debug .apk packages with The previously generated Java classes, 
which is The part of Pandroid.zip downloaded from Github. Now I must 
solve JVM part and The most complex programmers task will be to modify 
pandroid pascal files, which are being automatically opened from .lpy 
files if Lazarus for Linux have been used.
It will not be The walk through A garden but if I want to have 
functioning and reliable Pascal bundle which support Android API calls 
and .so library calling, I do not have other choice.
The advantage is, that apps, which have been compiled by JVMandroid mode 
of  PPCJVM are very accessible and The responsiveness of this GUI is 
very fast, similar if I would use Eclipse or Android studio.
Everything is on my control. Thank you very much for yours patience and 
for yours advices.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Mgr. Janusz Chmiel
I have found out that Pandroid bundle is The onlyone project which is 
able to call .so libraryes in JVM mode and is also able to support all 
Android API functions call, I have big plea to you.

I have started to transform this big bundle from Linux mode to Windows.

Project is available here:

https://github.com/zeljkoc/pandroid
What have Iallready done?
1. I have used SDK manager for Windows and I have put necessary 
buildtools and Platform tools and Platform to The corresponding Pandroid 
folder after I have unzipped it to Windows NTFS file system.

I have also started to transform build.sh to Windows batch file.
Which issues AM I facingnow?
1. is it necessary to really use so old FPCJVM compiler, which is The 
part of Pandroid? Or can I use never from DEC 2017?
How to transform The following series of build commands from Linux BASH 
shell style to Windows batch file?

Here are The commands.

echo ppcjvm -
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE -Us -Sg $TYPHON/fpcsrc/rtl/java/system.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE $TYPHON/fpcsrc/rtl/inc/uuchar.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-FUbin/classes -djvm -dRELEASE $TYPHON/fpcsrc/rtl/java/objpas.pp
$TYPHON/fpc/fpc64/bin/x86_64-linux/ppcjvm 
@$TYPHON/fpcsrc/rtl/android/jvm/rtl.cfg -Ur -Tandroid -Pjvm -Ur -Xs -O2 
-n -Fi$TYPHON/fpcsrc/rtl/inc -Fi$TYPHON/fpcsrc/rtl/jvm 
-Fi$TYPHON/fpcsrc/rtl/java -FE. -Fi$TYPHON/fpcsrc/rtl/android/jvm 
-Fu$PANDROID/units -FUbin/classes -djvm -dRELEASE $PROJECT/Vibrator.lpr


#$PANDROID/compiler/ppcjvm -n -Tandroid -Fu$PANDROID/units/typhon 
-Fu$PANDROID/units -FEbin/classes $PROJECT/Vibrator.lpr



I have modified The builddebug.sh script which is available inside
C:\usr\local\pandroid\example\Vibrator\android
folder
But I do not know, if I can replace fi command by pause?
Or can I remove fi and add ppcjvm to The next line with The options?
Because there are no other free project based on JVMandroid Pascal 
except JavaVCL or Pandroid. Lamw required position values for every object.
And I have tried precompiled examples for Pandroid and all of them are 
working smoothly, including calling API functions and author have 
introduce very strange technique for calling .so libraryes even without 
using JNI.

Inside examples
C:\usr\local\pandroid\example\Vibrator
and
C:\usr\local\pandroid\example\DemoPModule
There is other but very strange technique for calling .so library.
All provided examples are working so I think, that his project is very 
probably The best available free solution for writing applications by 
using JVMandroid mode and Android API and .so libraries call is supported.
I Am standing at The crossing. Combine some units from Pandroid with 
units from Javavcl, or should I had to really transform Pandroid to Windows?
Pandroid also contain unit StdCtrls, for writing GUI apps with no need 
to add position values so for little GUI with not many items it should 
also work for Me.
Resulting .dex file is very small, only needed units are being merged 
to it.

Any help will be very welcomed.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPCJVM Android and libbass.so calling issue

2019-04-17 Thread Mgr. Janusz Chmiel

Thank you very much for yours professional advices.
So really, if I want to call native .so libraryes, I have to use Lamw or 
Pandroid.
Lamw uses JNI  interface perfectly. And t is only sad for Me, that it is 
not easily possible to create stdcontrols.pas unit, which would be 
compatible with this project so I could create some simple GUI with no 
need to specify object position numbers.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPCJVM Android and libbass.so calling issue

2019-04-17 Thread Mgr. Janusz Chmiel
I have decided to join my second question to this thread, because it is 
also related to problem with libbass.so


PPCJVM have problem to compile The following line of code from bass.pas 
Delphi unit and also from newest bass.pas which is The part of bass zip 
archive for Windows.


  STREAMPROC_PUSH = Pointer(-1);   // push stream
Is it possible to construct this short code so it will have The same 
purpose and will be compatible with JVMAndroid compilation mode?
And I Am very sorry, that I AM sending so much messages, but yours 
community is so friendly and debates which are here are taking here are 
correct and kind.
I do not have somebody near Me, who would have deep Free Pascal 
knowledge. So thank you very much for yours patience with Me.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FPCJVM Android and libbass.so calling issue

2019-04-17 Thread Mgr. Janusz Chmiel

Dear specialists,
Please does somebody of you know, why is it impossible to call 
libbass.so in JVM Android mode if external command is being used for 
this task?

Because I Am getting run-time error:
error
Failed resolution of libbass.so
OK
I have analysed bass.pas unit and I have found that The following 
command is being used to call functions and procedures from this .so 
library.

Here is AN example from bass.pas

function BASS_SetConfig(option, value: DWORD): BOOL; {$IFDEF 
MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; external bassdll;


So do I have to replace external command by The command
JLSystem.loadLibrary('libbass.so');
But when I have done this, compiler have informed Me about other errors 
and compilation aborted with fatal warning.


bass.pas(725,101) Warning: Calling convention directive ignored: "StdCall"
bass.pas(733,102) Warning: Calling convention directive ignored: "StdCall"
bass.pas(745,126) Warning: Calling convention directive ignored: "StdCall"
bass.pas(757,121) Warning: Calling convention directive ignored: "StdCall"
bass.pas(780,79) Warning: Calling convention directive ignored: "StdCall"
Fatal: Compilation aborted

Bass.pas unit which I try to use in JVM mode and Android emeulation is here.

https://github.com/r1me/LAMWBassStreamPlayback/blob/master/jni/bass.pas

It is really interesting developers adventure. Because originally The 
unit have been created for FPC ARMHF or other similar target and 
cthreads unit is being used by The app, which calls bass.pas unit. So 
The question is, if I have chance to call libbass.so in JVM mode or if I 
can only dream about it?
Thank you very much for yours help. Libbass.so have been developed by 
using SSL to play live streams so it do not allocate too much of RAM, it 
can play live streams 24 hours A day without crashes and author deeply 
know C language and he is constantly hardly work on this library. So its 
quality is better and better.
It is even possible to use this library for making sound games for 
visually impaired, because it can load many short sounds without delay 
and distortion.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] problems while compiling androidr14.inc

2019-04-17 Thread Mgr. Janusz Chmiel
Please do you think, that this Free Pascal compiler error indicates, 
that some part of androidR14.inc unit have been compiled incorrectly?
C:\javavcl-code-1007\fpc\units\jvm-android\rtl\androidr14.inc(2750,15) 
Hint: (3274) Inherited methods can only be overridden in Objective-C and 
Java, add "override" (inherited method defined in JLObject).

Or it is OK and resulting classes will be correct and code will run?
Thank you very much for yours explanation.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] FPC JVM Android more easy .so library calling command

2019-04-16 Thread Mgr. Janusz Chmiel

Dear specialists,
Does somebody of you know about The possibility how to make call of 
external .so libraries more easier? If developer will use ppcjvm, target 
set to JVM and Android emulation?
Java language have simple command for calling .so library. It would be 
very very good, if it would be possible to add The similar simple usable 
command to system unit or to some think similar.
To be honest, without Pandroid project, I would be never able to find 
out, if is it possible to call .so libraries while using ppcjvm and 
Android emulation.
The ppcjvm is excellent compiler and it allow developers to develop 
outstanding Android applications. Apps are responsive, memory friendly 
and it is very sad, that ppcjvm.exe is not being developed also for 
Windows platform, currently for Linux, but not for Windows.
May be, that there is simple method how to call functions and procedures 
from .so library also while using ppcjvm mode, but I did not understand it.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Mgr. Janusz Chmiel
Because I do not see at all and I Am using screen reader NVDA, it would 
be ideal, if so much of Lazarus GUI would be 100 % accessible. But I 
know, that it is very complex to retain screen readers accessibility, 
friendly look for sighted users and fast IDE responsiveness.
For now, I would like to thank you, that you have allowed visually 
impaired users to use edit field inside source code wiev. Screen readers 
users are even notified about line number on focus. Sure, because it is 
not standard Windows Microsoft Edit control, it is impossible to use 
CTRL+SHIFT+arrow keys to assign some block of text with screen reader, 
but I know, that also commercial Delphi which uses his own controls not 
standard Windows controls from Microsoft have similar issue.
The most difficulty question is to determine, what is more complex. 
Modify Lazarus component sources or customize NVDA screen reader for 
accessibility of non standard controls.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] how to call .so library while using FREE Pascal JVM and Android target

2019-04-14 Thread Mgr. Janusz Chmiel

Dear specialists,
	Is it possible to call .so library when I have used Free Pascal 
compiler and I have set JVM target and option to create Android 
compatible Java classes?
Because when ever I want to call some .so library I Am getting The 
following error.

Failed resolution of: .so
OK
Sure, run-time error always contain full .so library name.
Is there any way to call .so libraryes or unfortunately it is not possible?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] javavcl and why I AM using it

2019-03-27 Thread Mgr. Janusz Chmiel

Dear users and developers,
The reason why I AM using javavcl  units is simple.
Many modern development environment based on Free Pascal and Android 
target are using visual designers. It is fantastic fact for sighted 
developers, but not for people with no sight at all. Because pixel 
positions calculations without having The possibility to look at The 
screen while designing forms is rather impossible. Sure, it is possible 
to create GUI, which will contain The only one element and other will be 
only read by Talkback and other screen readers. But those GUIS are also 
not very comfortable for screen readers users. Because user can not use 
Explore by touch feature. Random putting The finger on The screen across 
app window will not speak The nearest object.
So my question is, if javavcl units can work with Android APIS, or if it 
was The attempt, which will never work. So I can use this units only for 
GUi creation, not for using Android APIS such as Media player?

I know about other very matured and very promising opensource project, Lamw.
It is excellent development platform, very nic visual designer, many new 
demo samples, it produces fully accessible GUI. But without The 
possibility to see and use build in visual designer, window which uses 
20 objects or more can not be used by randomly specify pixel values from 
head.
Other parts of LAMW are perfect, project have very friendly community 
and developers are doing their best to develop stable and modern solution.
I like Pascal very much. Clever visually impaired developers have been 
able to develop very nice applications, may be that also because of VCL 
units, which do not enforce developers to specify pixel values of 
individual objects on The screen.
I Am very sad, that I do not know, how to work with Android APIS by 
using VCL. I can not use bass.so library, because very probably. Free 
Pascal compiler 3.2 and its ppcjvm module will not allow Me to call 
functions from external .so libraries written by using C or C++.
Bass unit contain some lines of code, which are not compatible with 
ppcjvm.exe.
And I also fight with other problem. Build in .bat files are not capable 
to package .so library to .apk package. Sure, I can use .zip and some 
utility to sign packages myself, but it is not so comfortable work.

Thank you very much for yours time and for yours answers.
With warmest regards and with The deepest appreciation.
Janusz Chmiel

https://sourceforge.net/p/%C2%ADjavavcl/code/HEAD/%C2%ADtree/


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Free Pascal JVM And Android APIS issue

2019-03-27 Thread Mgr. Janusz Chmiel

Dear users and developers,
Who of us know, why The following source code, which uses The following 
modules

https://­sourceforge.net/p/­javavcl/code/HEAD/­tree/
Do not play live stream after user compile it to Android and when user 
press play button?


        unit MainForm;

{$mode objfpc}
{$H+}

interface

uses _System, Classes, Controls, Dialogs, Forms, GenChars, LCLIntf, 
Menus, StdCtrls, SysUtils, androidr22;

type
  TFormMain = class(TForm)
    jMediaPlayer1: AMMediaPlayer ;
    PlayButton: TButton;
  protected
    procedure ButtonClick(A: TObject);
  public
    constructor Create(A: TComponent); override;
  end;
var
  FormMain: TFormMain;
implementation
constructor TFormMain.Create(A: TComponent);
begin
  inherited;
  Caption := Application.Title;
PlayButton:= TButton.Create(Self);
PlayButton.Align := alTop;
    PlayButton.Parent := Self;
  PlayButton.Caption := 'Play live stream';
PlayButton.OnClick := @ButtonClick;
  (*
  *)
  (*
  *)
  end;
procedure TFormMain.ButtonClick(A: TObject);
begin
  if A = PlayButton then begin
//jMediaPlayer1.setDataSource('http://icecast7.play.cz/cro1-128.mp3');
  //jMediaPlayer1.Prepare();
  //jMediaPlayer1.Start();
  end;
end;
 end.
Sure, androidmanifest.xml contain Internet permission.
Who of us would try to find The cause of this problem with Me? Do I use 
Android APIS incorrectly? DO I have to put some APi calls to separate 
procedure?
Do I have to create some neverending loop inside .pas source at The 
right place so play could start?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal