Questions tagged as 'android'

1
answer

Is it possible to change the function of the physical button even with the app in the background?

Would you like to change the function of a physical button, for example the volume, when clicking the button, down or up, is it possible to perform some function, other than changing the volume of the device? It is possible? If yes, is there an...
asked by 14.06.2017 / 23:13
2
answers

How do I make an operation take moments after I clicked a button?

I created a simple android app that starts a service just when I click on a button that I put myself, just click the button it starts to service immediately. What I want now is that clicking the service button takes some time to start. how ca...
asked by 27.06.2017 / 20:41
1
answer

How to open an AlertDialog?

Well, I'm learning about Fragments now. From what I understand, fragments are components, something you want to repeat on several screens, without having to create multiple class or activity's. I'm trying to create a dialog, it will be using...
asked by 10.06.2017 / 00:58
1
answer

Is it possible HashMap with several values?

I need to populate a bank like this:    Milk 50 kcal 20 proteins 120 carbo etc hashmap , but I can only use a key for a value, I could do with multiple values, or some other way I can do this without using HashMap ? Map<Stri...
asked by 21.11.2017 / 16:44
1
answer

How to use textwatcher?

How to use textwatcher to count how many characters it has in a textview, and show countdown, the same is done on facebook by limiting a post. Thank you in advance!     
asked by 30.07.2017 / 16:30
1
answer

JobScheduler to run every x hours

I need to run an api access in a range of hours, for example every 3 hours. I was looking for ways to do this, I read about AlarmManager and about this JobScheduler that seems to be the latest. Is it correct for my purpose to use it? Is it...
asked by 29.07.2017 / 02:33
1
answer

How to send json object from Android to API?

I need to mount a json object to send some data to my api. Here's how I'm doing. public void btnCadastrar(View view) { final EditText edtNome = ((EditText) findViewById(R.id.edtNome)); final EditText edtSobrenome = ((EditText) findVie...
asked by 25.08.2017 / 14:51
1
answer

How can I send a JSON object from my android to php?

I need to send a JSON object from my android app to my api in php. How can I do this? public void btnCadastrar(View view) throws JSONException, IOException { final EditText edtNome = ((EditText) findViewById(R.id.edtNome)); final Edit...
asked by 25.08.2017 / 18:05
2
answers

Output warning in WebView

I'm very new to android, so I did my application through Android Studio using WebView, but I'm having a question, when I press the Android back button it's already quit the app, I'd like to add that warning: do you want to leave?) AndroidActi...
asked by 07.06.2017 / 18:53
1
answer

How do I set the buttons in AlertDialog?

I'm having a problem with buttons created in AlertDialog. I'm doing an APP of sentences and at certain times the sentences are very big and causes the buttons in AlertDialog to come down. Is it possible to fix these buttons? Here is an example o...
asked by 07.06.2017 / 16:25