Java Stream why does reduce requires two parameters of the functional Interface?

In other words, why does reduce require BinaryOperator, or BiFunction interface? Why doesn’t it use UnaryOperator, or Function interface instead? What is the point of having two parameters as the …

Is Android AsyncTask use multithreading because android official web says?

while learning the difference between multi-threading and Concurrency.i follow this stackoverflow answer according to my understanding AsyncTask is just used to on or off the use of main thread{ui …

How do I check if a field in another activity was filled? [closed]

Each user has its profile that is stored in a XML file linked to a Java class. But not necessarily they access this profile when they use the App, because they may just use the app without editing its …

RecyclerView Items cover entire screen

I’m trying to make a simple chat room in android studio, but for some reason each chat message covers the entire screen. I’m trying to follow the example here on github https://github.com/android/…

Should WorkManager already be working when the app is killed, or does it need to have a foreground service attached? – Android Studio

Should WorkManager already be working when the app is killed, or does it need to have a foreground service attached? I have found no solution on what to do if the app using WorkManager is killed and …

How to save bitmap in new folder in DCIM to show it in gallery on cellphone (the cellphone doesn’t have SDCard)?

I have an URL, I download the image in it and convert it to bitmap. I want to download the bitmap in the internal memory of the cellphone to be in the gallery. I found solutions but includes SDcard …

Android Studio php connection

I’m trying to get information from db using php in android studio java. The php code works 100%. The problems is that when I open the app from the Android emulator the app closes itself almost …

Displaying notifications at a certain time with Android Studio

I’m pretty new to Android Studio and Java in general. I’m trying to build an app that, based on whether a checkbox is ticked in the app’s settings menu, will display a notification everyday at 8AM. I’…

when I click on the button the app crashes

Here the error: java.lang.IllegalStateException: Could not find method OpenRadio(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget….

App crashes when connection is lost while using HttpUrlConnection

i’m making a class that get json data from an external url, it is working fine if there is a connection. also shows an error if there isn’t. the problem is if the connection lost while the class is …