0

This questions regards using javafxports version '1.3.18' with Android SDK 29 within a Gradle project.

I am having a strange issue which seems to only be with Samsung Galaxy phones.

  • I see no text appear within the TextField whilst I type, yet when I press the spacebar, the text I have typed appears.
  • If I type without pressing spacebar, so my text is still invisible and click the 'search' button, the input is taken and the program continues as it should.
  • If I input an emoji, the input is shown straight away.

I have tried to add a listener to the TextField, yet nothing is received until spacebar pressed when text entered.

I found other questions that have very similar sounding issue, all Samsung Galaxy phones, but with no fixes listed:

I have tried the response adding the following to a 'java.custom' properties file to the Resources folder of the project, which did not work:

  • monocle.stackSize=128000
  • monocle.platform=Android

Terrible quality screen recording of the issue (sorry my friend sent): https://www.youtube.com/watch?v=VRFzx8hDgtE

My build.gradle file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.18'
        classpath 'javax.mail:javax.mail-api:1.6.2'



    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'

    }
}

mainClassName = 'src.sample.Main'

dependencies {

    compile 'com.gluonhq:charm:5.0.2'
    compile 'com.google.code.gson:gson:2.8.6'
    compile 'com.sun.mail:android-mail:1.6.2'
    compile 'com.sun.mail:android-activation:1.6.2'
    compile 'com.jfoenix:jfoenix:8.0.8'
    compile 'org.jsoup:jsoup:1.13.1'

}


jfxmobile {
    downConfig {
        version = '3.8.6'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
        compileSdkVersion = 29
        buildToolsVersion = "29.0.3"
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}

My AndroidManifest.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="src.sample" android:versionCode="3" android:versionName="1.0">
        <supports-screens android:xlargeScreens="true"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="29"/>
        <application android:label="RuneSlice" android:name="android.support.multidex.MultiDexApplication" android:icon="@mipmap/runeslice" android:fadeScrollbars="false" android:debuggable="false">
                <activity android:name="javafxports.android.FXActivity" android:label="RuneSlice" android:configChanges="orientation|screenSize">
                        <meta-data android:name="main.class" android:value="src.sample.Main"/>
                        <meta-data android:name="debug.port" android:value="0"/>
                        <intent-filter>
                                <action android:name="android.intent.action.MAIN"/>
                                <category android:name="android.intent.category.LAUNCHER"/>
                        </intent-filter>
                </activity>

                <activity android:name="com.gluonhq.impl.charm.down.plugins.android.PermissionRequestActivity" />
        </application>
</manifest>

EDIT: Following testing with GraalVM version of an APK, problem still persists. https://www.youtube.com/watch?v=P2FSfrm6Km4

Matt
  • 21
  • 4
  • Can you give it a try to the new Client plugin? See https://github.com/gluonhq/client-samples. You can run HelloFX or HelloGluon with JDK 11+ and GraalVM. Once you have the basic setup working, you can add a TextField control, and see if that works on that device? – José Pereda Jun 01 '20 at 20:48
  • @JosePereda I am running Windows 10 and the documentation states this is only available for Android if using Linux? Is this a known issue with the current version? – Matt Jun 01 '20 at 20:56
  • So far cross compilation (from Windows to Android) is not possible, you need indeed a Linux machine. Optionally I can send you an apk that you can deploy and test? – José Pereda Jun 01 '20 at 20:58
  • @JoséPereda If you could that would be fantastic, I think i'd cry if I went through the effort to set this up and it still didn't work! – Matt Jun 01 '20 at 21:07
  • @JoséPereda Apologies, it had gone to the junk folder, will check it out now! – Matt Jun 02 '20 at 08:36
  • @JoséPereda Unfortunately, still same issue, posted screen recording as an edit in my question. – Matt Jun 02 '20 at 19:33
  • Ok, thanks for testing. At least it is consistent through JavaFX 8 and 11/14. It would be great if you can send/post the logcat while typing? – José Pereda Jun 02 '20 at 19:35
  • Found this [issue](https://github.com/termux/termux-app/issues/126), that mentions something related to the predictive text keyboard: the characters are buffered and they are shown only word by word. Not sure if you can disable that type of keyboard? – José Pereda Jun 02 '20 at 19:43
  • @JoséPereda I have got my friend to turn off predictive text manually and it is now working, however I have no idea how I would implement this for a release. – Matt Jun 02 '20 at 19:55
  • @JoséPereda I found this: android:inputType="textNoSuggestions" which is meant to disable predictive text for an EditText field in android, so tried placing that in the AndroidManifest.xml, within the 'Application', then 'Activity' sections. Neither worked nor changed the keyboard on the phone – Matt Jun 02 '20 at 20:38

0 Answers0