How to get the key of a pushed value

In Firebase Realtime Database on Android, I want to retrieve this id “-Mb1sSv-FCNr9ElxZIwN”. databaseReference = FirebaseDatabase.getInstance().getReference().child(“Registration Data1&…

Error message – Creating a new Key store (PKCS12) (Andorid Studio)

I would like to pubish my app on the play store. Therefore at first I need to create a signed APK. Everytime I would like to create a new Key store two error messages appear (see below). First one: …

findViewById not accepting type argument even with compileSdkVersion 30

I generally use kotlin for android but my college wants me to use Java. So I created a new java project in android studio. The problem is I don’t want to cast the return value of findViewById() …

Not Showing Correct Position While Searching in Listview

public class MainActivity extends AppCompatActivity { SearchView searchView; ListView listView; ArrayList list; ArrayAdapter adapter; @Override protected void onCreate(…

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 …

video streaming on Fragment of an android app

i want to stream a video from the firebase storage, in a fragment of my android app. but what even i try my video doesn’t launch or the app crash when i request the fragment. being a beginner, i have …

Sending Image files and Text from android app java HttpURLConnection multipart form-data

Hi I am trying to upload a file and a text, using multipart form-data HttpURLConnection java, sample of code below: String boundary = UUID.randomUUID().toString(); final String LINE_FEED = “…

Android File.listFiles() returns only subdirectories

I am trying to get all files and subdirectories in directory and show their names. This is the code I use: File internalStorageDir = new File(Environment.getExternalStorageDirectory().getPath()); File[…

Get the named of Collections from Document on Cloud Firestore

I want to get collections (Col01, Col02, Col03) from the document (Doc01). How can I approach this? Check the attached image. Thanks. Image

JSON file reading an array in Java AndroidStudio [closed]

I’m trying to read data from JSON file in AndroidStudio with a format as follows: { “records”: [ [1,”name1″,”1,9″], [2,”name2″,”0,74″], ……