Advice from a developer

58 views
Skip to first unread message

P5music

unread,
Mar 9, 2021, 2:48:34 AM3/9/21
to CodenameOne Discussions
Already done debugging on Android in regard to this:
 
Mouse events for long press are not working. I filed an issue.
It seems that you released the CEF without even bothering to check some HTML-Javascript content inside.

Now I cannot publish my app because the very first functioning of a BrowserComponent is not available. And I already wasted a month of Apple developer program, not mentioning being on this project from June 2020.

I have a free account but one could look at it from a different perspective: you released a new feature without any testing and luckily you have an early tester for free.
But you are not listening to it.

When I subscribed as CN developer I received an e-mail saying like "please help us to spread the use of the CodenameOne" or something similar.
But how are we supposed to help if you do not fix issues of such importance, that are already deployed in fact.

Believe me, many times I returned to my Swift project, not difficult to update it because a few lines of development were possible for me to do in months with this very painful day-to-day before-going-bed "free" assistance you think is doing good for CN here and on StackOverflow,

but Swift/SwiftUI is so awful that I had to continue with the CN project, 

that I like, do not misunderstand me, it has many avantages I want in a project,

and I believe in having an easy way to develop for iOS without surrendering to Apple. 
This it the "plus" of CodenameOne, not the cross-platform stuff for Android or Blackberry or desktop.

How do you see it?
Regards

Javier Anton

unread,
Mar 9, 2021, 5:09:04 AM3/9/21
to CodenameOne Discussions
Hi P5,

I feel from your tone that you are coping with frustration. The CEF bit seems to not be a 100% finished product but I know the reasons for adopting it were very compelling. I don't think it's fair to judge CN1 too harshly on this. Testing a browser can be very time consuming. Having us users do the actual testing probably is the right way in this case. I've seen a lot of activity from CN1's side in solving CEF issues so I don't think they're really ignoring them either. As a developer, I know that every new released feature goes through many rounds of "testing" with real users. There simply are too many use cases (and then you also have to multiply them by the number of different devices, user settings, etc). In short, making a platform (CN1) that relies on other platforms (Android/iOS/CEF) is a huge task. Let's encourage CN1 to keep going :)

Are you developing a desktop app? If not, I'd focus on testing and debugging directly on your device (android/iOS). You can capture any js error by adding the following to your html and passing it back via a callback

window.onerror = function (message, file, line, col, error) { 
   //pass back to app via callback
 };

Shai Almog

unread,
Mar 9, 2021, 10:35:14 PM3/9/21
to CodenameOne Discussions
I think you have unreasonable expectations. I spend a lot of time supporting and trying to help regardless of your subscription status.
We do resolve a lot of issues for all subscription levels but our general rule of thumb is about blockers and big issues. This is a big issue for you but it isn't for anyone else. Most people don't mix HTML and Java code too much. These have always been the difficult edge cases in every platform that mixes those.
Yes CEF does have issues but those issues are limited to the simulator for the most part. On the device the implementation has been the same for years and literally no one complained about the problem you ran into. 
Since it happens on Android you can debug this using Android Studio. I don;t know if it happens on iOS but I repeatedly made it clear that you need an iOS device and need to test iteratively. There's a limit to working with the simulator and when you work heavily on native peers (and HTML is a native peer) you need a device.

P5music

unread,
Mar 10, 2021, 2:33:30 AM3/10/21
to CodenameOne Discussions
Thank you for answering.
I have to say that nothing is personal here but I think it is good for you and CN that I say something more.

As you can see in the most recent comments here
and

you are not paying attention to what it is written in the requests, especially when they are subtle, you forget also what you said before.
Maybe you literally address the requests at the end of the day when you are tired.

As you know not many questions here or on StackOverflow are issued every day (very few) so
nobody is harassing you with continuous questions, and nobody is overwhelming you with questions.

It is unconceivable that even comments on SO are addressed at the end of the day, for the next day.

It's you who are multiplying the questions here:
It takes an average three-days of exchanges to get a focused answer about the real thread subject, followed by denials, negations, looping and so on.
Sometimes just non-sense is issued to postpone to tomorrow.  I am not so naive not to realize that.

A reasonable kind of assistance would encompass supporting a thread until conclusion, 
not this way (also, very often you forget what has been said in the thread the previous days).
If a developer is harassing you with many new threads in a day, you can simply ignore him/her until the next day.

[My issue about CEF is very important, if you consider that your CEF on Android is not able to handle long-press events,
but it's not all about mouse events, it does not handle text selection correctly too as I said in the same issue:
think about a new enterprise customer that does not want that the user can select text in the BrowserComponent,
if they create a prototype they see that CEF is not able to do so and the text is selectable, such a simple basic issue,
they check if there is an issue on github and they see that it has been opened for months,
well, they go away immediately.
Yes, maybe it is important only for them now but you are aware that it is technically important nonetheless,
and fix it, feeling lucky to have the possibility to prevent other customers from stumbling into it.]

I have a free account but after 10 months I cannot be dismissed at the final stage of publishing the app. 
This is just common sense.

I hope this does not upset you tonight, but it is important because you can improve.
Regards

Shai Almog

unread,
Mar 10, 2021, 10:37:11 PM3/10/21
to CodenameOne Discussions
You only see a small portion of the support I do daily.
I read your answers fast because you specifically have an issue with getting to the point.

You're complaining about my reading of your questions when clearly you still think CEF is on Android (it isn't) CEF only impacts the simulator and nothing else!
I wrote that before. I also warned you about some choices and about your approach of ignoring device testing which is crucial and I very specifically warned you about that when you started. So don't put this on me.

I'm still trying to help but there are limits to what we can do.

P5music

unread,
Mar 11, 2021, 1:52:05 AM3/11/21
to CodenameOne Discussions

I know you are very busy.
:) I still suspect Shai,Shanna, and Lianna are the same person.

I couldn't check on StackOverflow for other questions other that mine but I think you provide the assistance with the same one-answer/comment-a-day.
If it is so I think you missed the opportunity to create hype and traffic about CN on StackOverflow.
You should be happy if someone creates questions and questions, especially programming ones. (I avoid using SO not to expose the many problems CN has)

As I said, in my case, you also go off track here.

About what you said about me not testing on physical devices, you are wrong.

You slowed down my development to 10 months instead of 1 (the Android version took me 2 months, the Swift version about 1).

But I appreciate any kind of help you could give. 
I also created things that you said it were impossible to achieve.

When my development has finished I started to test on Android devices 
and it was me that discovered the nasty issue about the BrowserComponent,
because
 
you did not perform the test on the hardware devices.

Regards

Steve Hannah

unread,
Mar 11, 2021, 10:30:22 AM3/11/21
to codenameone...@googlegroups.com
Did you take my advice from a few posts back?
1. Isolate your HTML/Javascript and test in device browsers.
2. When that works, test in Codename One webview, loading from a web server - without any Java <-> javascript communication.
3. When that works proceed to adding the java <-> javascript communication piece.
4. Use Safari debug tools to debug on iOS device.  Use Chrome desktop debugger to to debug on Android device.

Unless you've put in the work on that, I can't help you.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/fa8ca097-ab2d-4db7-b8d4-6e89d112bf85n%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

P5music

unread,
Mar 11, 2021, 11:56:36 AM3/11/21
to CodenameOne Discussions
@Steve Hannah
I will try to please you testing as you say, although in the next days because I am busy trying to resume my Swift project just in case this issue is not solved.
Please be patient.

In the meanwhile you can ponder about this:

You can see that it is very likely that:

1-there is a problem with the mousedown/mouseup events when a long press is performed by the user on the Android device (for CodenameOne apps)
2-this causes that gesture being not detected, so the events are like "floating" or "bubbling" so the text is selected even when it is explicitly forbidden, indeed the text selection interface appears (with handles, copy/paste commands, and so on)
3-I am no security expert but this could even exploitable
4-this breaks the user experience
5-this lets the user select text where it is unwanted

I do not understand why you do not directly address what is in the issue I opened:
CEF BrowserComponent: mouse events handled differently in Android device than simulator · Issue #3378 · codenameone/CodenameOne · GitHub
No web server code is involved, the case was built to Android and tested on a real device.
The issue is about mouse events so this should be enough for you to try to fix it because long-press gesture is not handled on the Android devices as far as I can see.

Regards

Javier Anton

unread,
Mar 11, 2021, 3:16:14 PM3/11/21
to codenameone...@googlegroups.com
Hi P5,

BrowserComponent on Android is nothing more than a native window into a webview. 

Testing embedded html in any app needs to be done directly on a device, because each device uses a different browser engine to render (ios uses safari, Android uses Chrome).

This isn't an issue with CN1, CN1 doesn't own Apple/Google and can't be held responsible for issues there. Although I bet that the real issue is in your js code


P5music

unread,
Mar 11, 2021, 4:37:00 PM3/11/21
to CodenameOne Discussions
Maybe I have an idea, thanks to you Javier! 
I just have to handle the events in JS, and using the callbacks only after having detected the right longpress timing.
I hope it works. As soon as possible I will test.
Regards


Javier Anton

unread,
Mar 11, 2021, 5:01:35 PM3/11/21
to codenameone...@googlegroups.com
That sounds like the right thing to do

Reply all
Reply to author
Forward
0 new messages