Posts by WiseTap • 329 points
22 posts
-
1
votes2
answers104
viewsA: Priority running android thread
Just as @Piovezan answered the start method is asynchronous, so I suggest a callback, a callback serves for "call it back" (call it back) when a certain asynchronous action has finished Let’s create…
-
0
votes2
answers1348
viewsA: Problem with Google Maps API key
In production, if you use Google Play App Signing, you can easily find the SHA-1 on: https://play.google.com/apps/publish/ > Click your app > Version management > App subscription > App…
-
0
votes2
answers143
viewsQ: ASP Net Core - Server receives multiple GET requests repeatedly
Hello, I have a server hosted on an EC2 instance, Ubuntu Server on Amazon AWS. No one is making requests to this server, however, logs presented in Cloudwatch indicate multiple GET operations…
-
0
votes1
answer50
viewsA: Error when complilar app created in Android Studio
Try to clean up your project (Build > Clean Project) and compile it again
-
0
votes1
answer311
viewsA: Attempt to invoke virtual method
Context is null, you are calling the method alertDialog(int title,int mensage...) too soon. You are probably calling the method alertDialog before Oncreate (calling by constructor, for example), and…
-
3
votes2
answers190
viewsA: Check connection at every instant
I use this class in my projects: public class ConexaoInternet extends BroadcastReceiver { public enum TipoConexao {TIPO_NAO_CONECTADO,TIPO_WIFI, TIPO_MOBILE}; private TipoConexao tipoConexaoATUAL =…
-
0
votes1
answer341
views -
1
votes1
answer566
viewsA: Access a JSON key
I don’t understand why json is a size 1 array, so you can use Jsonarray to take the first (and only) object from the array and then take the properties you want from the object, like this: @Override…
-
1
votes1
answer43
viewsQ: Android - How to identify exceptions released on mobile phones?
When an untreated Exception is launched the application is closed (e.g., Nullpointerexception), even then it’s okay when you’re testing the application by the IDE, but when you generate an apk and…
-
0
votes1
answer33
viewsA: Edittexts in wrong position
Try removing the if/Else to leave only editParams.addRule(RelativeLayout.BELOW, -1 ); I think it might work, because as far as I can tell e > 0 (parcel 2) is creating an edittext in the same…
-
1
votes1
answer44
viewsA: Send message from button
Example: Button botao = (Button) findViewById(R.id.meuBotao); String mensagemEscritaNoBotao = botao.getText(); botao.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //…
-
0
votes2
answers1441
viewsA: How to call a method of a Fragment in an Activity?
Hello! : ) There is no ideal solution for this type of problem, at most one can identify names, for example, you can find out the name of Activity that called another Activity through the method…
-
1
votes1
answer686
viewsA: App does not appear in emulator
Opa beleza :) Already installed the Genymotion plugin in Android Studio? File > Settings > Plugins > Browse repositories... > Search for Genymotion and install it More information…
-
1
votes1
answer1132
viewsA: How do I grab each JSON object, add it to a list, and show it in Activity?
Ideally, you can create object classes with attribute names identical to those of json (or if you prefer you can map using the @Serializedname annotation). I suggest you download the Gson library…
-
1
votes2
answers593
viewsA: How to prevent the user from typing in Edittext, but allow clicking on it to open a Datepicker?
To avoid editing in Edittext set Keylistener to null edtData.setKeyListener(null);
-
0
votes1
answer67
viewsA: Progress bar does not appear
I believe that it is not possible to access the context, because you are calling a context from outside the Istener, which only exists outside the Istener So instead of using in Context…
-
1
votes1
answer133
viewsA: I have the following error in Volley " jsonexception : end of input at char 0 "
You must be getting an empty answer, check if postParam is correct, also check the code of the server part and if the emulator is actually communicating with the server. I hope I helped :)…
-
1
votes1
answer45
viewsA: APP database
You can choose to use Parse Server. It is an Open Source API that allows you to create a server for mobile applications easily and still save to the local user what you want. Link:…
-
0
votes6
answers56799
viewsA: What is Nullpointerexception and what are its main causes?
In Java, every variable or constant needs an instance to be used, assuming we have a User class, and we pass the name in the constructor: Usuario usuarioVariavel = new Usuario("João");…
-
1
votes1
answer177
viewsA: Check if field contains a date
public static boolean isValidaData(String dataStr){ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); //Formate a data do jeito que for necessário, outro exemplo: ("dd/MM/yyyy") try {…
-
1
votes2
answers83
viewsA: I don’t understand why it doesn’t work
You need to assign an initial value to the variable "quantity" in the Students class private static int quantidade = 0; Hug
-
1
votes2
answers1543
viewsA: Aggregation in Java
There are 2 errors in your code The first is that to calculate the workload you are increasing the load variable, but it has not been declared, nor given an initial value to it The second is that as…