I have stepped through the Android Room with a View – Java codelab and wound up with an error that causes the app to crash before it loads (see “fatal exception”, below). Thinking perhaps I did something wrong, I copied the contents of each of the .java solution files from github. I tried cr…
Tag: android
Android WebRTC DataChannel is always null and ICE candidates are not sent
I’m trying to create an Android app that uses WebRTC data channels for data exchange. The data that I want to send is basic strings. Admittedly, this is my first time looking at WebRTC, and so I am a …
Error trying to launch service from non-activity class
I previously had a Foreground service that I launched from one activity. The code to launch the service was contained within said activity. Now I would like to launch this service with a non-activity class that can be called from different activities. In doing this I get an error: The working code block was p…
String variable inside OnClickListener returns null
I have a String variable userBoat that I’m trying to initialize inside an onClick if statement. Unfortunately when I try to call it from another activity the variable is returning null. I’ve tried …
how to Copy files from path to path with ProgressBar in java
i hope you are fine. i have here a code i took it from this site, for copy files from path to path. i want to use a progressBar with it, how do i use the progressBar with the counter? i used the bellow code, and there’s is no progress in progressBar ! this is the code : Answer In
Implementing exit app button in the persistent notification
My app runs a background service indicated by the persistent notification. Users need to use the toggle button in MainActivity to turn on/off this service and thus to remove the persistent notification. Now I want to implement a notification action that can turn this service off & as well as the toggle wi…
Java create a TextView without open new window
This is my code: LinearLayout linearLayout = new LinearLayout(this); setContentView(linearLayout); linearLayout.setOrientation(LinearLayout.VERTICAL); // Open new window …
Is there a way to make “folded code” stay folded in Android Studio?
I would like to keep code folded once I’ve folded it. When I’m done with a window of code for an Activity I close it. Then when I come back to it, all the code opens up again… Would be nice if it …
convert java class to kotlin inherited from FragmentStatePageAdapter
I am doing a project and the only help I have are in java, and it is making it very difficult for me to have to convert it or pass it to kotlin this is the code I have to pass to kotlin: and when trying to convert it, it was more or less like this: According to how little
Make the user waiting for activity to finish loading
everyone, I am working on a project that retrieves data from firestore and some of that contains URL for an image. when I start the app I notice a delay when loading the image. so I thought about what I’ve seen in the Facebook app that when loading an image showing a view with some animation to inform t…