Questions tagged as 'totalcross'

1
answer

PUT and DELETE Methods with HttpStream?

Does anyone know if I can use HttpStream with methods PUT and / or DELETE ? HttpStream.Options options = new HttpStream.Options(); options.setCharsetEncoding(HttpStream.Options.CHARSET_UTF8); options.httpType = HttpStream.G...
asked by 16.06.2017 / 21:29
2
answers

consume REST service with totalcross

I would like to know how to consume a REST service using totalcross. I made an example following what is in the documentation, I am using HttpStream. String url = enderecoWS + servico; HttpStream hs = new HttpStream(new URI(url)); byte[] bu...
asked by 22.03.2017 / 13:53
3
answers

Totalcross - Whiteboard starts dash with difference from the point initially pressed

I'm using the Whiteboard component for signatures, but when I draw a line, it draws with a difference from the starting point where I pressed the screen, making a vertical scratch of approximately 30 points, to make the dash depressed on the scr...
asked by 05.04.2017 / 21:04
1
answer

How to format a String or put mascara with Totalcross

I'm using the following way, but it does not work because of the compiler for using things from javax.swing.text.DefaultFormatter. public string formatar(String text, String mask) throws ParseException { return new MaskFormatter(mask).valu...
asked by 31.05.2017 / 22:11
1
answer

How to extract an attribute of type totalcross.util.Date from a JSON

I'm using a webservice that returns me a list of an Object in JSON, and I'm trying to use JSONFactory to extract the JSON information to a List. HttpStream httpStream = new HttpStream(new URI(VarGlobais.url + "/descarga/listDescarga"), options...
asked by 09.06.2017 / 20:28
0
answers

Totalcross - Version 3.30 is supported until version of Android

I generated an apk with version 3.30, installed it on Android 7.1 and when running the application, it only renders a black screen. Even Android 6 ... works correctly.     
asked by 05.04.2017 / 21:39
2
answers

How to capture the action of a click on a title that is inside a container and this container is inside a scrollContainer?

How to capture the action of a click on a title that is inside a container and this container is inside a scrollContainer? public void onEvent(Event e) { if(e.type == ControlEvent.PRESSED && e.target == ???????){...
asked by 01.11.2018 / 18:24
1
answer

Is it correct to throw an exception within a synchronized?

In my app there are some threads that access the database and control this competition using the lock from totalcross. My question is: Can I allow exceptions to be thrown within a synchronized block? or do I have to do something to get the ex...
asked by 25.05.2017 / 15:13
2
answers

How do I Generate Hash MD5

We need to generate an MD5 hash, to pass an encrypted password. Could someone give us an example?     
asked by 07.06.2017 / 20:11
0
answers

Is it possible to save a file to "Downloads" using Totalcross?

To contextualize .. Initially I was trying to implement opening a PDF using Totalcross as can be seen in this question: How to open a PDF using Totalcross? However, there is no solution to this problem. So, another way is to save the file t...
asked by 16.10.2017 / 18:43