[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 techniq

[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