Java Scanner class not working on mobile device

We want to make a great tool, help reporting any malfunction you experience
qqbb
Posts: 5
Joined: Sun Jun 03, 2018 11:15 pm

Java Scanner class not working on mobile device

Post by qqbb » Sun Jun 03, 2018 11:52 pm

Hi,
I believe there is a bug when using the Scanner class on this website. For example the following code (below) works fine on computer (OSX, Safari) but not on Android phone even though the program itself runs. On Android, the String str turns out empty it seems. Any ideas why this is?

import java.util.Scanner;

public class ScannerTest {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter text: ");
String str = scanner.nextLine();
System.out.println("Your text was: " + str);
}
}

dbremmen@gmail.com
Posts: 63
Joined: Sun Jan 07, 2018 6:30 pm

Re: Java Scanner class not working on mobile device

Post by dbremmen@gmail.com » Mon Jun 04, 2018 2:55 pm

You are right, the scanner is not working as expected on android. We will review this bug and inform when It's fixed
Thanks!!
David

dbremmen@gmail.com
Posts: 63
Joined: Sun Jan 07, 2018 6:30 pm

Re: Java Scanner class not working on mobile device

Post by dbremmen@gmail.com » Wed Jun 06, 2018 2:06 am

Hi,
We just released a new version with the scanner fixed for android. Please check if it's working now and thanks for reporting this issue. Also if you find another issue or think about some needed feature just post it in the forum
Regards
David

qqbb
Posts: 5
Joined: Sun Jun 03, 2018 11:15 pm

Re: Java Scanner class not working on mobile device

Post by qqbb » Thu Jun 07, 2018 2:13 am

Hi David

Thanks for the quick reply! The problem still exists for me with no visible difference to the earlier version. The Scanner class still doesn't read what is typed on my phone at least (Android 7.0, Chrome and Opera) in the code below (same code as before). How did you get it to work for you?

http://www.browxy.com/SubmittedCode/101088

Good luck with fixing!

dbremmen@gmail.com
Posts: 63
Joined: Sun Jan 07, 2018 6:30 pm

Re: Java Scanner class not working on mobile device

Post by dbremmen@gmail.com » Thu Jun 07, 2018 2:27 am

Hi!

Oh I see. I think that you are using the old browxy version. We freeze that version in favor of the beta version at: https://www.beta.browxy.com.
I tested the code with this URL -> https://www.beta.browxy.com/#USER_170551
Can you try using that URL to see if the scanner is working?

Thanks!

qqbb
Posts: 5
Joined: Sun Jun 03, 2018 11:15 pm

Re: Java Scanner class not working on mobile device

Post by qqbb » Thu Jun 07, 2018 5:27 am

Hi,

Ah yes, I have been using the older version as the beta version has been a bit tricky to use, but originally tested the bug on the beta version too. I tried the beta version now with your fix and it almost works on Android but still needs fixing. The scanner now shows the string except for the last character. E.g. if the input is "hello world" it will print out "hello worl" in that code. On macOS the same code works as it should though.

Btw, thanks for working on this site! It is the only site I found where the Scanner class can be used interactively. unlike the other sites I tested where the scanner input needs to be entered before running the code.

dbremmen@gmail.com
Posts: 63
Joined: Sun Jan 07, 2018 6:30 pm

Re: Java Scanner class not working on mobile device

Post by dbremmen@gmail.com » Tue Jun 12, 2018 9:40 pm

Hi!
Sorry for the delay in the response.
Yes you are right, in Android when the autocomplete is activated this error occurs. We are working in a new version to handle that problem. We will post again here when released!
Thanks again for using browxy!
David

qqbb
Posts: 5
Joined: Sun Jun 03, 2018 11:15 pm

Re: Java Scanner class not working on mobile device

Post by qqbb » Fri Jun 15, 2018 2:55 pm

I'm not sure what you mean by auto-complete, but I'm not aware of any auto-complete being used when I tested that it doesn't work on Android.

dbremmen@gmail.com
Posts: 63
Joined: Sun Jan 07, 2018 6:30 pm

Re: Java Scanner class not working on mobile device

Post by dbremmen@gmail.com » Sat Jun 16, 2018 7:51 pm

Hi!
We fixed the problem in android. To test it we used this program: https://www.beta.browxy.com/user/jpconver/ScannerTest2
Please try again and tell us if it's working as expected now.
Thanks!
David

qqbb
Posts: 5
Joined: Sun Jun 03, 2018 11:15 pm

Re: Java Scanner class not working on mobile device

Post by qqbb » Sun Jun 17, 2018 6:30 am

It works!

I don't know if you consider the following a bug, but I noticed that the output shows a '?' instead of the euro currency symbol '€' and Scandinavian letters such as å,Å,ä,Ä,ö,Ö. The input on the other hand does show these same characters correctly.

Thanks for fixing it!

Post Reply