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:
- textfield & combobox problem in javafx android
- JavaFxPorts TextField Issue - Android Keyboard wont function
- TextField Issue - Android Keyboard wont function
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