Questions tagged as 'java'

1
answer

Java: Send message on the network repeatedly in another thread?

This is my problem: I need a message to be sent by a socket repeatedly, to do this, I created another Thread, so that the application would not be locked, so: new Thread(new Runnable(){ public void run(){ try{ Socket s...
asked by 23.02.2017 / 00:59
1
answer

Error trying to include a mapfragment in an activity

I have an activity that should go up with the map (GoogleMaps). But by implementing some methods, so that I can for example, click and add a bookmark, it breaks, with the following error:    Attempt to invoke virtual method 'void   com.google...
asked by 02.02.2017 / 19:22
1
answer

MediaPlayer does not play sound file in the assets folder

How do I play sound in the assets folder in Android Studio? When the sound is in the raw folder it performs normal, but I need to run in the assets folder, to pass the name dynamically, below is the example, but it still does not work. public...
asked by 03.02.2017 / 13:58
1
answer

GoogleApiClient inside the recycleViewAdapter?

The app has a fragment with recyclerview and FAB . Clicking FAB opens a dialog where the user enters addresses, among other information. The address input fields are of type AutoCompleteTextView and receive address...
asked by 03.02.2017 / 01:12
1
answer

Target Unreachable, identifier 'users' resolved to null

My bean: package com.cliente.Bean; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.omnifaces.util.Messages; import com.sist...
asked by 05.01.2017 / 19:42
2
answers

How to save the maven dependencies inside the project folder?

I want to save all maven project dependencies inside my project folder! What should I put in the pom.xml file?  Is there a plugin for this? I would like a pom.xml template that describes how to do this. Here is my pom.xml: <?xml version=...
asked by 06.01.2017 / 00:47
1
answer

Object in java contains a JSON, I want to get the JSON information and popular my object attributes [closed]

It is the following, I have the GPS object, it is with a json as follows the image, I want to get the data of the field code and field name and place them within the attributes of the GPS object. FOLLOW IMAGE How can I do this? I tried...
asked by 09.01.2017 / 04:52
1
answer

build-impl.xml: 930: The following error occurred while executing this line:

I'm doing a college project, and every class I put to inherit from the Modelo class, I get those errors.    /home/tavz-correia/NetBeansProjects/exercicio01/AccessoriesForVehicles/nbproject/build-impl.xml:930: The following error occurr...
asked by 08.01.2017 / 06:22
1
answer

Display value from another screen

Hello, I'm working with the following code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_conversor); String t = Double.toStri...
asked by 09.01.2017 / 14:56
2
answers

How can I extract information from an XML that is stored in a String?

I'm consuming this xml tag of a api and storing your content in a String p> Its structure looks like this: <opml version="1"> <head> <title>Título</title> <status>200</status...
asked by 20.03.2017 / 19:03