Questions tagged as 'android'

1
answer

How to check the battery consumption of a device's sensors?

I'm developing an application for Android, where I'll use embedded sensors (eg GPS and Accelerometer) of mobile devices, but before I need to test the consumption of these sensors, because the energy savings of the devices furniture is my goal....
asked by 07.07.2016 / 19:32
1
answer

Encryption and Encryption Android

I'm trying to learn how to use encryption to encrypt and decrypt messages. I have a class called Encripta that has the methods, the encryption works perfectly. My method to decipher encryption decrypt , returns the following l...
asked by 22.02.2016 / 20:09
2
answers

Is it possible to call by OnClick a new Activity TextView?

Hello, I'm trying to call a new activity through OnClick in a TextView , but running the application crashes. Here is the activity from which I am trying to pass: public class sdActivity extends AppCompatActivity { public stati...
asked by 18.10.2018 / 16:27
2
answers

How to leave the screen always on with the app open?

I'd like to know how I can get the screen on without blocking while my app is open.     
asked by 02.08.2016 / 15:56
1
answer

How to call an alert, a notification for user in Android application?

When the user clicks on an option, he can receive an Alert saying, did you select a certain command, a certain option, how to make an alert of this type in an Android application?     
asked by 15.05.2016 / 19:28
1
answer

How to execute a method automatically outside Activity onCreate ()

I have a MainActivity that has 4 buttons, when the user selects one of them, the button method calls another Activity , which will display a query in an XML in a ListView of this new Activity . I'm doing this: Method% of new Activi...
asked by 20.04.2016 / 23:43
2
answers

Compare two list

I have a list List<Comentarios> comentarios List<Comentarios> comentariosSP The first list I get the data from a webserver, the second one from a SharedPreferences. I tried to compare them comentarios.equals(comentariosSP)...
asked by 05.11.2016 / 15:44
2
answers

Why every time I turn my Android phone from vertical it runs again?

When I'm making an app I usually put some print messages to know what's going on, but I realized that when I'm running the app and it changes from vertical to landscape it prints all over again in LogCat, does anyone know why this happens? Use S...
asked by 16.07.2015 / 16:32
2
answers

Migrate data from one version to another - Sqlite Android

In the application I'm working on, I have to save the data from a specific table when the application is updated. This action must happen before the table is dropped in the onUpgrade method. I need to do this because when the application is upda...
asked by 17.09.2015 / 16:18
3
answers

How to consider an empty EditText as "0"

I'm developing an Android app that calculates 3x3 arrays so I have 18 EditText , however if I want to multiply an array 2x3, 2x2, 1x2, etc. I would have to fill the fields the size of the array and leave the other fields with 0 and this w...
asked by 28.09.2015 / 14:39