Questions tagged as 'java'

0
answers

recover the audioSession of the player being played

I'm trying to retrieve the audioSession of the current player on android in order to send it to the Visualizer class, but all attempts are not working. I tried this: AudioManager audioManager = (AudioManager) getContext().getSystemService(...
asked by 06.09.2018 / 14:26
1
answer

javax.net.ssl.SSLException when sending mail using JavaMail

Good morning. I'm having trouble sending an email using JavaMail. Returns the following exception:    (javax.mail.SendFailedException) javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.MessagingException...
asked by 06.09.2018 / 14:14
3
answers

Error Code: 401 () when sending FCM notification using a server

I'm having trouble sending notification using Firebase Cloud Messaging on Android. I'm using the method below: public void enviaNotificacao(String mensagem, Pedido pedido, String token) { Sender sender = new Sender(apiKey); Message m...
asked by 06.09.2018 / 15:07
0
answers

Problem with While in Java [duplicate]

Hello, good evening. So I'm trying to make this program work though, it's skipping the part of giving Scan in variable escolha , but when I leave it alone in do it does not ignore and works perfectly .. import java.util.S...
asked by 05.09.2018 / 00:36
0
answers

How to create an object through a String? [duplicate]

Suppose I have the following object: public class ItemDePedido { private int qtde; private double subtotal; private Produto produto; } In memory this (already created) object is interpreted as:    model.ItemDePedido@40c8f9...
asked by 05.09.2018 / 02:17
1
answer

AsyncTask in infinite loop when using WallpaperMananger

My app strangely runs in infinite loop wildly. This is a simple code to download an image and apply as wallpaper. But when removing this line of code, the loop disappears, ie asynctask returns to work as expected: WallpaperManager.getIn...
asked by 01.09.2018 / 20:49
0
answers

JAVA - How to reference a static attribute in a static method that has the same signature as the parameter? [duplicate]

I created this small example class to show my doubts. How can I reference an attribute in which the signature is the same as the parameter passed in the method? package Teste; public class Pessoa { static String nome; p...
asked by 16.09.2018 / 03:16
1
answer

Does not show the correct output

I believe that I can be the result of my ordering that is influencing the output, eg if it was 6 8 10 it should show TRIANGLE RETURN but it is showing ACTUALLY TRIANGLE The code I made is at the end of the statement    Read 3 decimal numbe...
asked by 15.09.2018 / 21:38
0
answers

How to back up data in an android application

Oops, all right? I developed an Android app in which there is a lot of information that is saved in the native Sqlite. The app is a CRUD and has a login system ("localhost only, no webserver yet") and some columns are given the id, which is A...
asked by 31.08.2018 / 17:41
0
answers

how to include a new item in the same user id already included?

I'm creating an app for the first time, I'm new, but I'm learning. However, I hired the inclusion of a new data in the same user of a certain product. I've seen a few examples and studied query, push, and other documentation. In the simple code...
asked by 31.08.2018 / 16:58