I’m writing an app for a client who doesn’t have an official API but wants the app to extract video links from his website so I wrote a logic using jsoup. Everything seems to work fine except some of the links don’t start with https so I’m trying to add it before the URL. Here’s …
Tag: android
i can’t reference a String that exists
Im trying to run this code: but the R.string.default_web_client_id part isnt working (Cannot resolve symbol ‘default_web_client_id’). i know that the ‘default_web_client_id’ string exists, but it isnt at the String XML, its in a generated ‘values.xml’ am i doing something w…
Can’t record with mediarecord when screen is locked. Tried WakeLock but no result
It is a ForegroundService where the OnCreate function is as follows: And the startRecording() method is as follows: The exception is thrown when i turn off the device, the stacktrace i get is: What i want is that the recordingTask keeps running even after the device is locked. I don’t care about battery…
Unable to get the clipboard data in java android
I am working on a android project in java where i need to copy paste some data in an activity, but the problem here is i am able to set the primary clip but when i try to access the primaryClip it returns false. Im setting the Primary clip using the following code, Im trying to access like this Here
Create a unique string from a selection of data (that is reverse engineerable)
I attempting to write an app that allows users to enter information/data and gives back a unique string that represents that data. I then want someone else (on a different device) to be able to enter that unique string and get back the inputted data from the first user A vastly simplified example is that I ha…
Make HTML anchor links start a new activity in Android Java
I have a String that contains HTML tags which I display in a TextView Now I want those links to be clickable, and not just clickable, but to startup an Activity when clicked. The href attributes have numbers which I want to pass as a parameter to my Intent to start my Activity. I use JSoup to extract the valu…
How can I make a ListView load parent and childs related by ForeignKey?
For now, I have a working ListView that successfully loads every “parent” object in the ListView, retrieving the parent attributes and showing them in every element. Due to I am trying to follow Android’s Model-View-ViewModel architecture patterns, I am using RoomDb, a Repository class and a…
ImageView layout BUG in the androidx.constraintlayout:constraintlayout:2.1.0
I’m using Android Studio 2020.3.1 patch 3 and the ConstraintLayout for displaying two rows UI. Here is the expected UI latyout: But the second_row_image_view is not at the expected position when using the “test.xml”, it is floating on the top of the first_row_edit_text. Here is the build.gra…
How to know that provided URL is Image or Video in Android Studio
I am Using Firebase as Database where user can Upload Image or Video so I am Fetching URL from my database so I am getting two URLs one of them can be either video or image so what can I do to detect the URL. Let Suppose this is the URL. This is the example URL. NOTE URL can be
How to track a touch on the screen
I want to write a penalty shootout application, now I have set up the background and added the ball and the goalkeeper to the map. How do I make it so that when I tap on the screen, the ball follows my touch on the screen. How to do this? How to track the touch on the screen and enter