Re: Post commit review: [Re: hg: openjfx/8u-dev/rt: RT-35147: [Android, Ensemble8] App should react to hardware buttons on Android]

2014-01-04 Thread tomas.branda...@oracle.com

Hi,
back button is really tricky one. I don't think that for javafx apps it 
should map to how back button works in native android applications. On 
Android it moves to previous activity or exits (if the last activity has 
been reached) in webkit it goes one page back but this is not that 
important now.
In our case we have always only one activity (FXActivity which doesn't 
do much just prepares surface for opengl and resends touch or key 
presses to glass) We don't spawn new activities.


1. Back button should close dialogs by default.
2. Back button should be handled by the application itself and if not 
consumed by application it should go to exit (probably with a default 
yes/no dialog)
I have problem to get notification if the back button had been handled 
by the javafx application. That's the main problem :(


-Tomas

On 01/03/2014 11:00 PM, Stephen F Northover wrote:
If you feel that further work needs to be done here, please enter a 
JIRA and include this discussion.


Thanks,
Steve

On 2014-01-03 2:43 PM, Stefan Fuchs wrote:

Hi,

well, the back button is always used to go back one dialog level, 
until the start screen has be reached. (Dialogs are canceled, 
browsers go to previous website, etc...)
If you press the back button on the start screen of the app, I found 
three different strategies to handle the back button:

1. Exit the app on first button press (examples: WhatsApp, Google Maps)
2. Hide the app on first button press and let the system kill the 
application, if system memory is exhausted. (examples: FireFox, Chrome)
3. Exit the app on second button press (note that most apps using 
this strategy print a notice message, after the first key press, 
which is currently not implemented for Ensemble8) (examples: Samsungs 
App Store)


Stefan


Stephen F Northover wrote:

Hi Alex,

Samples were changed to support Android.  Apparently, hitting escape 
twice should exit an application and this behavior was coded into 
EnsembleApp.  I'm not an Android guy but if this is standard Android 
behavior, it should be part of JFX, not the example code.


Anyhow, I'll let Stefan or Johan comment on this and they can enter 
a follow on JIRA.


Steve

On 2014-01-03 12:32 PM, [email protected] wrote:

Changeset: 6f0901527ad0
Author:snorthov
Date:  2014-01-03 12:23 -0500
URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/6f0901527ad0

RT-35147: [Android, Ensemble8] App should react to hardware buttons 
on Android

Reviewed-by: snorthov
Contributed-by: Stefan Fuchs 

! apps/samples/Ensemble8/src/app/java/ensemble/EnsembleApp.java
! apps/samples/Ensemble8/src/app/java/ensemble/PlatformFeatures.java
! 
apps/samples/Ensemble8/src/app/java/ensemble/samplepage/Description.java 

! 
apps/samples/Ensemble8/src/app/java/ensemble/samplepage/SamplePageContent.java
! 
apps/samples/Ensemble8/src/app/java/ensemble/samplepage/SourceTab.java
! 
apps/samples/Ensemble8/src/app/java/ensemble/util/FeatureChecker.java

! modules/base/src/main/java/com/sun/javafx/PlatformUtil.java












Re: Android Port: Next Steps

2014-01-09 Thread tomas.branda...@oracle.com

Hi Tom,
although emulator supports opengl it doesn't have required opengl extension.
-Tomas

On 01/09/2014 05:10 PM, Tom Schindl wrote:

Have you managed to get an JavaFX running on the emulator. I've tested
with one of ours and while it works great on the real device. It crashes
in the emulator.


V/GLASS   ( 1121): JNI call notifyViewEvent to lensView 0x1d30041a
W/System.err( 1121): java.lang.UnsupportedOperationException: Pixel format 
BYTE_BGRA_PRE not supported on this device
W/System.err( 1121):at 
com.sun.prism.es2.ES2Texture.create(ES2Texture.java:103)
W/System.err( 1121):at 
com.sun.prism.es2.ES2ResourceFactory.createTexture(ES2ResourceFactory.java:86)
W/System.err( 1121):at 
com.sun.prism.impl.ps.PaintHelper.initGradientTextures(PaintHelper.java:118)
W/System.err( 1121):at 
com.sun.prism.impl.ps.PaintHelper.getGradientTexture(PaintHelper.java:141)
W/System.err( 1121):at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:450)
W/System.err( 1121):at 
com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:385)
W/System.err( 1121):at 
com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedPgram(BaseShaderGraphics.java:847)
W/System.err( 1121):at 
com.sun.prism.impl.ps.BaseShaderGraphics.renderGeneralRoundedRect(BaseShaderGraphics.java:607)
W/System.err( 1121):at 
com.sun.prism.impl.ps.BaseShaderGraphics.fillRoundRect(BaseShaderGraphics.java:1549)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1110)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:847)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:750)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:571)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2043)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:225)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2043)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:225)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.renderForClip(NGNode.java:2282)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:2176)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:2202)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2037)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:225)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:575)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2043)
W/System.err( 1121):at 
com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1951)
W/System.err( 1121):at 
com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:469)
W/System.err( 1121):at 
com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:324)
W/System.err( 1121):at 
com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:97)
W/System.err( 1121):at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
W/System.err( 1121):at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:279)
W/System.err( 1121):at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
W/System.err( 1121):at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err( 1121):at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err( 1121):at 
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
W/System.err( 1121):at java.lang.Thread.run(Thread.java:841)

I have to say that I've never seen a crapier thing than this emulator.
Could we produce x86 binaries so that we can use genymotion?

Tom

On 09.01.14 11:05, Johan Vos wrote:

Hi Steve,

Doing this step by step, we probably need a solution on the use of JDK 8
language features first. As you mentioned in
https://javafx-jira.kenai.com/browse/RT-35165, there is probably
(unfortunately) no real option apart from having different source
directories. How do we tackle this?
I think we only need to have the affected files in a different directory,
but then we need a build mechanism that use the alternate directory first
in the Android(/iOS