Questions tagged as 'java'

1
answer

Update ProgressBar in the background java android

How do I make the background service update ProgressBar on Android ? My code: public void onClick(View v) { // inicial o progressbar progressBar = new ProgressDialog(v.getContext()); progressBar.setC...
asked by 20.04.2014 / 03:06
1
answer

commit with @Transactional annotation in Spring

Good afternoon! I am new to java and Spring and am needing help in the code below. I need to commit every commit iteration, but it is only done at the end of the transaction, I created the persist method, thinking it would open a new transaction...
asked by 20.09.2018 / 20:01
1
answer

How to change AppTheme?

I have 2 styles files. With a click on a button I want to switch from AppTheme to AppTheme2. how to do? Manifest.xml <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_nam...
asked by 28.07.2018 / 03:27
0
answers

Get http request cookies [closed]

Good afternoon, I'm having trouble catching cookies when I make an HTTP request for a given address. Using firefox + firebug I display 5 cookies. Already through my program in Java I can only see 1 of them. follow the program code: public s...
asked by 01.12.2014 / 18:35
0
answers

how to perform all tasks at the same time? [closed]

I can not get it to execute all these tasks at the same time, it only executes the rest when it receives some data in InputStream . And after receiving this data he does not receive any more. Help me please, I'm newbie and I've tried sever...
asked by 01.12.2014 / 00:27
0
answers

Find controls in a separate class from the main Activity

I need to look for controls to change values in the layout. However passing the context per parameter to the class it does not find controls declared in xml returning null for each cast done. The class where I'm trying to retrieve this data e...
asked by 01.12.2014 / 18:26
0
answers

Start service with TimerTask [closed]

I'm trying to start an Android notification service with TimerTask but it returns me the following error: 02-03 16:06:00.164 15051-15379/com.celiogarcia.setapp E/AndroidRuntime﹕ FATAL EXCEPTION: Timer-0 java.lang.NullPointerException...
asked by 03.02.2015 / 16:13
0
answers

How to maintain the connection between Android client Java server?

When I connect to the server, I should receive a message saying that it is connected, but when I send a message to the server, the application pops up. This is the button code to connect to the server: public void connect(View view) { T...
asked by 07.02.2015 / 19:18
2
answers

How to break an infinite loop using Ctrl-C in Java

I have a multithreaded server that sits in an infinite loop waiting for new connections and I want to be able to stop this loop when I press Ctrl-C (or something similar). I tried this solution and tried to do something like this: private vo...
asked by 12.04.2018 / 18:00
0
answers

Starting tomcat v7.0 server at localhost has encountered a problem [closed]

I'm trying to start Tomcat Server locally, but this problem occurs. Could anyone help me?     
asked by 13.08.2014 / 15:14