Questions tagged as 'android'

2
answers

Help with login in android studio

Sorry for the beginner, but I'm recently introducing myself in this world of programming, what happens is that I want to redirect the activity login to another activity but I do not know how, when logging in correctly, the user is validated but...
asked by 24.10.2018 / 06:54
2
answers

Does the finalize () method of a java class do exactly the same as the ondestroy () method for android?

It's really funny, since the finalized method in the object class does cleaning tasks before the object has been deleted from memory, which is also done by the onDestroy class. So I have this question in which they differ and why for Androi...
asked by 14.12.2016 / 20:44
1
answer

Show plurals on Android

Is there any way to pluralize strings in Android? that is, to represent. hay 1 objeto hay 3 objetos Currently what I do is have two resources defined in string.xml and if the value is more than 1 charge one or the other.     
asked by 10.12.2016 / 17:00
1
answer

Problem when performing an Intent

Hi, I'm practicing a bit of programming on android and I've run into something strange (or so I think). Every time I try to launch a new activty the application dies. I am trying to make a kind of login for an app but it is quite simple I only r...
asked by 30.08.2018 / 04:13
1
answer

Push notification FCM does not run when the Fragment that contains it is not open

I have a Push notification code that is activated when one of the data in my Firebase Databade changes. The code works perfectly when I am inside the Fragment where it is incorporated, but when I close the app or change Fragment or Activity it s...
asked by 15.08.2018 / 22:57
1
answer

Remove the focus of an EditText by pressing outside of it on Android

I have several EditText and other components, try that when you press out of EditText you lose the focus and the keyboard is hidden. layout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"...
asked by 18.07.2018 / 18:54
1
answer

android MenuItem setVisible ()

I try that if a condition is met, an item in the side menu of the app is not displayed. It does not give error, and debugging takes well the value of the item, but does not do anything. The code is as follows: @Override public boolean onCreate...
asked by 25.05.2018 / 13:02
2
answers

AlarmManager ignores me and executes the event when he wants

I have a method that, with AlarmManager, on the 1st of each month should execute a code, but it executes it every time I open the application. It simply adds an entry to a database. I have this method: public void crack(Context context){...
asked by 24.05.2018 / 14:28
1
answer

Send information from a class to an activity

I have this class: public class WifiReceiver extends BroadcastReceiver { private static final String TAG = "WifiReceiver"; @Override public void onReceive(Context context, Intent intent) { NetworkInfo networkInfo = intent.getParcelableE...
asked by 23.05.2018 / 14:11
2
answers

getIntent () deprecated, use parseUri () and toUri () correctly

The Intent class documentation says that its method getIntent () is deprecated and instead it is recommended to use parseUri() . In turn, in the section of parseUri() it is said that the URI (its parameter) can be returned from...
asked by 19.04.2018 / 02:39