Questions tagged as 'android'

1
answer

Intent to open link in browser does not work

How do I get my button to send the user to a link? String url = "LINK"; Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); startActivity(i); I tried this way but it did not work     
asked by 03.04.2017 / 17:03
1
answer

Send an SMS to one of your contacts

I have an application and in the end I wanted to send a msg to one of the user's contacts about my application. var columnNumber = cursor.GetColumnIndex(ContactsContract.CommonDataKinds.Phone.Number); contacto_numero = cursor.Get...
asked by 18.05.2016 / 13:32
2
answers

Exception vs RuntimeException, when using one or the other?

I was this doubt , and when I was informed of it, another one came up to me, which I would like to clarify. What is the difference between Exception and RuntimeException ? When using Exception or RuntimeException...
asked by 24.03.2015 / 20:56
2
answers

How to save the data in the internal memory of an Android device?

I am writing files in the external memory of the device, I am doing the following: File arquivo = new File(Environment.getExternalStorageDirectory()+"/"+ nomeArquivo.getText().toString() + ".txt"); I'm writing the file in the external memor...
asked by 11.02.2014 / 18:51
2
answers

How to display a Toast within a Thread on Android?

I'm developing an application and I needed to display a Toast at some point inside a Thread, but I'm not getting it, does anyone know how it's possible and if it's possible to do so? Thank you in advance. Note: if it is not a toast, it could...
asked by 28.10.2015 / 15:19
2
answers

How does AsyncTask really work?

Still, sometimes I get a bit confused with AsyncTask . Here's an example below: private class MyAsyncTask extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) {...
asked by 21.06.2017 / 17:44
1
answer

Unit Tests on Android

How to do unit testing on Android? As far as I've researched, you can only use the framework Robotium . Is there another way to do unit testing on Android?     
asked by 27.04.2014 / 03:02
1
answer

How do I configure the back button action on android?

How do certain activities in the app perform when the back button is heard?     
asked by 11.04.2015 / 21:12
2
answers

What is the command to close or exit the game created in Unity?

I'm learning Unity and would like to know the command to quit the game, ie close the application and also knowing this command as I apply when pressing the back button of the mobile Android execute this command.     
asked by 30.12.2015 / 18:35
1
answer

CPF / Cnpj Mask in Edittext [duplicate]

I have an Edittext field, I want to know how I can set a mask for it to format the text entered in the corresponding format, CPF or CNPJ, I tried using the method described in this one question however when the text entered reaches 11 digits...
asked by 15.01.2016 / 20:04