Jump to content
  • Status: Fixed
  • Priority: Normal
  • Resolution: Fixed
  • Platform: Android
  • Affects version: 1.10.1.0

I finished the first FGX app and published it on the Google Play Store.

On some devices, the app now starts with a white and blank screen. I cannot see any components.
If you start this app from the IDE or install the APK file manually, everything will be fine. Only the installation from the store does not work.


When I look at the Logcat I see the following entries:

05-05 10:50:23.209  1120  1120 I SurfaceFlinger: Remove BufferLayer(0x7e5517b000) com.lge.launcher3/com.lge.launcher3.LauncherExtension@3227#0 (-1 x -1)
05-05 10:50:23.211  1120  1120 I MiniDump: -------------------------------------------------------------------------------------------
05-05 10:50:23.211  1120  1120 I MiniDump:  Handle    |  Comp Type |  Transform |  Alpha |  Disp Frame (LTRB) |  Source Crop (LTRB) | Disp[19260717643626369, p] "SW43103 cmd m"
05-05 10:50:23.211  1120  1120 I MiniDump: 0x7e55197000 |     DEVICE |          0 | 1.000 |    0    0 1080 2460 |   0.0   0.0 1080.0 2460.0 | de.bauer_software.hoai/co[...]FMXNativeActivity@25119#0
05-05 10:50:23.211  1120  1120 I MiniDump: 0x7e550da000 |     DEVICE |          0 | 0.894 |    0    0 1080 2460 |   0.0   0.0 1080.0 2460.0 | Splash Screen de.bauer_software.hoai@1830#0
05-05 10:50:23.211  1120  1120 I MiniDump: 0x7e61b39000 |     DEVICE |          0 | 1.000 |    0    0 1080   76 |   0.0   0.0 1080.0  76.0 | StatusBar@2685#0
05-05 10:50:23.211  1120  1120 I MiniDump: 0x7e56134000 |     DEVICE |          0 | 1.000 |    0 2334 1080 2460 |   0.0   0.0 1080.0 126.0 | NavigationBar0@2685#0
05-05 10:50:23.359  1120  1120 I SurfaceFlinger: Remove ContainerLayer(0x7e54b86000) Surface(name=ae99098 Splash Screen de.bauer_software.hoai)/@0xd78a0c - animation-leash#0 (-1 x -1)
05-05 10:50:23.359  1120  1120 I SurfaceFlinger: Remove BufferLayer(0x7e550da000) Splash Screen de.bauer_software.hoai@1830#0 (-1 x -1)
05-05 10:50:23.359  1120  1120 I SurfaceFlinger: Remove ContainerLayer(0x7e61aca000) ae99098 Splash Screen de.bauer_software.hoai#0 (-1 x -1)
05-05 10:50:23.360  1120  1120 I MiniDump: -------------------------------------------------------------------------------------------
05-05 10:50:23.360  1120  1120 I MiniDump:  Handle    |  Comp Type |  Transform |  Alpha |  Disp Frame (LTRB) |  Source Crop (LTRB) | Disp[19260717643626369, p] "SW43103 cmd m"
05-05 10:50:23.360  1120  1120 I MiniDump: 0x7e55197000 |     DEVICE |          0 | 1.000 |    0    0 1080 2460 |   0.0   0.0 1080.0 2460.0 | de.bauer_software.hoai/co[...]FMXNativeActivity@25119#0
05-05 10:50:23.360  1120  1120 I MiniDump: 0x7e61b39000 |     DEVICE |          0 | 1.000 |    0    0 1080   76 |   0.0   0.0 1080.0  76.0 | StatusBar@2685#0
05-05 10:50:23.360  1120  1120 I MiniDump: 0x7e56134000 |     DEVICE |          0 | 1.000 |    0 2334 1080 2460 |   0.0   0.0 1080.0 126.0 | NavigationBar0@2685#0
05-05 10:50:23.395  2685  2685 I LightBarTransitionsController: animateIconTint() : skip : mNextDarkIntensity = 0.0


Any idea what's going wrong here?


User Feedback

Recommended Comments

  • Administrators

Hello,

  1. Do you have this device for taking logs?
  2. What is device model?
  3. What is Android version?

This log doesn't include useful information, there are no any warnings or error (only information messages). So You should collect full log for beginning from start point, if it's possible.

Thank you

BauerSoftware

Active subscription
05-05 15:36:32.207  1120  1120 E Layer   : [Surface(name=AppWindowToken{44c925e token=Token{2f7af99 ActivityRecord{9e57ee3 u0 com.lge.launcher3/.LauncherExtension t2}}})/@0x110aa - animation-leash#0] No local sync point found
05-05 15:36:32.207  1120  1120 E Layer   : [Surface(name=AppWindowToken{4ac5343 token=Token{a4e00f2 ActivityRecord{cf54054 u0 de.bauer_software.hoai/com.embarcadero.firemonkey.FMXNativeActivity t68}}})/@0xb970e6d - animation-leash#0] No local sync point found

Installing the App via *.apk fix the problem.
Maybe it's a new Delphi problem with the *.AAB files for the store.
Creating signed *.apk files is removed in 10.4.2.

  • Administrators

Ok, It works fine for me on 64-bit device. But it's fail on 32-bit, because 32-bit so-library files "libHOAISchnellrechner.so" are not included into apk:

 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/de.bauer_software.hoai-1/base.apk"],nativeLibraryDirectories=[/data/app/de.bauer_software.hoai-1/lib/arm, /data/app/de.bauer_software.hoai-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libHOAISchnellrechner.so"
        at java.lang.Runtime.loadLibrary(Runtime.java:367)
        at java.lang.System.loadLibrary(System.java:1076)
        at ru.fgx.FGXActivity.onCreate(FGXActivity.java:104)
        at android.app.Activity.performCreate(Activity.java:6251)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5461)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

 

  • Administrators

So possibly you should check:

  1. Project -> Deployment. Check that all required so files are specified.
  2. Don't forget set option "Generate Android App Bundle file (arm + arm64)" in project options.
  3. Don't forget to build both target 32-bit and 64-bit. As I remember, 32-bit version is not build automatically, when you build 64-bit target for market.

Additional info: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Submitting_Your_Android_App_to_Google_Play

BauerSoftware

Active subscription

I'm fighting with the 64Bit version. Not all devices are effected but there are some.

What I find up to now:

The App (*.apk) created in Delphi Release mode will run on the problem devices.
When I sign this *.apk with the command line apksigner, it will not run anymore on these devices.

Any idea why?

  • Administrators

I don't really know a reason. Possibly aab doesn't include some required so libraries. I see that your so-project library is loading, But it's interrupted internally on initialization process. This may happen due to an error at the start of the application. What is about to create empty project, upload to Play Market and check?

BauerSoftware

Active subscription

I've attched the Logcat from both apps starts "sign" and "not signed".
At the first view it looks that the failing app does not have these requestLayout() messages:

 

05-06 15:42:44.207  7921  7947 I AdrenoGLES: QUALCOMM build                   : 080f0ce, I20154638fb
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Build Date                       : 10/12/20
05-06 15:42:44.207  7921  7947 I AdrenoGLES: OpenGL ES Shader Compiler Version: EV031.27.05.07
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Local Branch                     : 
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.8.3.R1.10.00.00.520.073
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Remote Branch                    : NONE
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Reconstruct Branch               : NOTHING
05-06 15:42:44.207  7921  7947 I AdrenoGLES: Build Config                     : S P 8.0.12 AArch64
05-06 15:42:44.209  7921  7947 I AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.toolbar.NativeToolbar{f9bdcb4 V.E...... ......ID 0,0-1080,174} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by android.support.v4.widget.DrawerLayout{9d400dd VFE...... ......ID 0,174-1080,2228} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.cardview.CardView{f75e452 V........ ......ID 0,2227-1080,2343} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.layout.NativeLayout{a2f6323 V........ ......ID 0,0-1080,116} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.textview.NativeTextView{6741020 V.ED..... ......ID 14,0-361,116} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.edittext.NativeEditText{514cdd9 VF.D..... ......ID 374,0-1068,116} during layout: running second layout pass
05-06 15:42:44.246  7921  7921 W View    : requestLayout() improperly called by ru.fgx.view.layout.NativeLayout{f69f39e V........ ......ID 0,2343-1080,2343} during layout: running second layout pass

 

logcat - working unsigned.txt logcat - failed signed.txt

  • Administrators

As I mentioned, "failed signed" is failed on initialization process, so there are no any align requests. 

  • Administrators

I think, empty project can help us to understand what is wrong. You can try to public it in test Google sandbox.

BauerSoftware

Active subscription
(edited)

The reason seems to be an Exception in the FormCreate of the main Form. 
This will kill the application UI without a message.

In my case I try to access a file named VLB in the project assets.
When I log the exception:
 

Cannot extract asset "VLB\universal-universal.DAT" to file "/data/user/0/de.bauer_software.hoai/files/VLB/universal-universal.DAT", because "/data/user/0/de.bauer_software.hoai/files/VLB/" cannot be created.

It seems, that I cant access this file while the app is signed - on some devices.

Edited by BauerSoftware

BauerSoftware

Active subscription
3 минуты назад, Yaroslav Brovin сказал:

Great. Are you able to get this exception?

Yes, and able to write it TfgLog.Error().

  • Administrators

Do you use this attribute in android manifest file in <application> tag?

android:requestLegacyExternalStorage="true"

And is application located on external storage?

BauerSoftware

Active subscription
20 часов назад, Yaroslav Brovin сказал:

Do you use this attribute in android manifest file in <application> tag?


android:requestLegacyExternalStorage="true"

And is application located on external storage?

Yes and Yes.
But it didn't work.
You have more some more tips?

BauerSoftware

Active subscription

Yes.
That 's the manifest:

<manifest
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:versionCode="16"
	android:versionName="8.12.0"
	android:installLocation="0"
	android:compileSdkVersion="29"
	android:compileSdkVersionCodename="10"
	package="de.bauer_software.hoai"
	platformBuildVersionCode="29"
	platformBuildVersionName="10">
	<application
		android:theme="(reference) @0x7f040000"
		android:label="HOAI Schnellrechner"
		android:icon="(reference) @0x7f030000"
		android:persistent="false"
		android:debuggable="false"
		android:restoreAnyVersion="false"
		android:hardwareAccelerated="true"
		android:largeHeap="false"
		android:usesCleartextTraffic="true"
		android:requestLegacyExternalStorage="true">
		<activity
			android:name="com.embarcadero.firemonkey.FMXNativeActivity"
			android:launchMode="3"
			android:configChanges="4b0"
			android:windowSoftInputMode="30">
			<intent-filter>
				<category
					android:name="android.intent.category.LAUNCHER"/>
				<action
					android:name="android.intent.action.MAIN"/>
			</intent-filter>
			<meta-data
				android:name="android.app.lib_name"
				android:value="HOAISchnellrechner"/>
		</activity>
	</application>
	<uses-permission
		android:name="android.permission.CALL_PHONE"/>
	<uses-permission
		android:name="android.permission.READ_PHONE_STATE"/>
	<uses-permission
		android:name="android.permission.INTERNET"/>
	<uses-permission
		android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
	<uses-permission
		android:name="android.permission.READ_EXTERNAL_STORAGE"/>
	<uses-sdk
		android:minSdkVersion="21"
		android:targetSdkVersion="29"/>
</manifest>

 

  • Administrators

Could you check on your device:

  1. Don't acceess to FileName in TfgAssetsFile in creating process.
  2. Request in runtime permission android.permission.WRITE_EXTERNAL_STORAGE via TfgPermissionService.
  3. After receiving granted results from TfgPermissionService, try to get access to TfgAssetsFile.FileName.

Thank you

BauerSoftware

Active subscription
13 минут назад, Yaroslav Brovin сказал:

Could you check on your device:

  1. Don't acceess to FileName in TfgAssetsFile in creating process.
  2. Request in runtime permission android.permission.WRITE_EXTERNAL_STORAGE via TfgPermissionService.
  3. After receiving granted results from TfgPermissionService, try to get access to TfgAssetsFile.FileName.

Thank you

Which event is the best for reading the asset file?
I need the file information for creating the UI.
When I install the APK and assign manual the access right, it doesn't work either. Shouldnt' it?

  • Administrators
Только что, BauerSoftware сказал:

Which event is the best for reading the asset file?

This should work without additional actions from your side. Because our library takes care on it. But seems installing the application on external storage somehow works out incorrectly on your device. I will try today later to reproduce it with external installation. But I am not sure if I will be able to reproduce this problem. This is the first time I've heard of such a problem. But knowing how Android works differently on different devices, I'm not surprised. So it's why I'm asking you to check some assumptions on your device.

As the temporary workaround you can manually extract file from asset to other location. You can do it follow way:

uses
  FGX.Assets.Factory, FGX.Platform;

var
  FileReaderService: IFGXFileReaderService;
begin
  if TfgPlatformServicesManager.RequestService(IFGXFileReaderService, FileReaderService) then
    FileReaderService.CopyAssetToFile(FUri, <destiny file name>, <one of TfgExtractionRule>);
  

Don't access to TfgAssetFile.FileName.

  • Administrators

If it's a text file, you can read content via IFGXFileReaderService.ReadTextFile (just pass aset name) without extracting. 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.