Why are the borders not showing on the buttons?
Stack Overflow » Android
by DCorn
29m ago
I am building an app in Android Studio and I am trying to put a border around my buttons. Specifically here is a button I am trying to add it to: <Button android:id="@+id/activitiesButton" android:layout_width="0dp" android:layout_height="100dp" android:layout_marginStart="20dp" android:layout_marginEnd="20dp" android:text="@string/activities" app:autoSizeTextType="uniform" app:autoSizeMinTextSize="5sp" app:autoSizeMaxTextSize="30sp" app:autoSizeStepGranularity="1sp" app:layout_constraintBottom_toTopOf ..read more
Visit website
How to trigger recomposition when observing LiveData
Stack Overflow » Android
by ima robot
29m ago
I'm migrating an app from views to compose and am trying to trigger a schedule update every five minutes in which if there is a change in the data compose should recompose. Still using RxJava in my vm, but I see getDataList() get called every 5 minutes, but I'm unsure how to update the list when dealing with state. Here's my code so far: In compose val dataList by viewModel.data.observeAsState() LaunchedEffect(Unit) { while(true) { viewModel.getDataList() delay(5 * 60 * 1000) } } In viewmodel private val _data = MutableLiveData<List<Ite ..read more
Visit website
How to realise online delivery of data in Android app
Stack Overflow » Android
by Oleg
29m ago
I have two devices on which there is an application, and when adding an entry to the database on one device, a notification about adding an entry and the entry itself should appear on the other device in the same application. How to implement this? android studio I dont know how to realise that and waiting for you advices ..read more
Visit website
How Layout Composable's measure policy measure its child using parent constraints?
Stack Overflow » Android
by Yellow Flash
29m ago
I am trying to make a custom layout to understand how it works and place and measure its child composables. If I set the size of my custom composable and then measure the child in the Layout's measure scope the child is being forced to have width and height equals to the parent's max width and height: @Composable fun CustomComposable(modifier: Modifier = Modifier, content: @Composable () -> Unit) { Layout( modifier = modifier, content = content, measurePolicy = { measurables, constraints -> val placeables = measurables.map { it.mea ..read more
Visit website
OkHttp3 Request.Builder's post function won't accept FormBody as argument
Stack Overflow » Android
by SmartASCII
30m ago
Using OkHttp3 4.12.0 in Android Studio (2023.2.1 Patch 1) with Kotlin, I'm attempting to post a FormBody but the post function from Request.Builder() won't accept FormBody as an argument since it requires a RequestBody, even though the former extends the latter. Even trying to use the example straight out of their documentation provides the same issue: val formBody = FormBody.Builder() .add("search", "Jurassic Park") .build() val request = Request.Builder() .url("https://en.wikipedia.org/w/index.php") .post(formBody) .build() Type mismatch. Required: RequestBody ..read more
Visit website
Am I using Thread class correctly here?
Stack Overflow » Android
by deanresin
2h ago
private static class StopRecListenerThread extends Thread { SpeechRecognizer recognizer; StopRecListenerThread(SpeechRecognizer recognizer) { this.recognizer = recognizer; } @Override public void run() { if (!this.recognizer.stop()) Log.d(TAG, "StopRecListenerThread: listener was not stopped"); else Log.d(TAG, "StopRecListenerThread: listener was stopped"); } } I have an object that needs to be stopped but it can't be done on the main thread. I pass the object to a static Thread class and stop it from there. Is this a va ..read more
Visit website
In-App Purchase product shows as Inactive
Stack Overflow » Android
by Sergio Rey
2h ago
I just add a new product and it is showed as inactive in the Play Console. How can I turn it as active? Btw in my app I am getting this error while trying to make the purchase: Google Play error "Error while retrieving information from server [DF-DFERH-01]" Any idea what is happening? Pls help. Thank you I am trying to create an in-app purchase option ..read more
Visit website
Handler should be static or leaks may occur
Stack Overflow » Android
by deanresin
2h ago
I have the following handler called by a Thread .. private class setupHandler extends Handler { @Override public void handleMessage(Message msg) { ((TextView) findViewById(R.id.status_text)).setText(R.string.status_lstn); ((TextView) findViewById(R.id.output_text)).setText(""); } } I just want to update the UI. That is what handler are supposed to be for, no? But it complains my handler isn't static and because of that leaks may occur. But if I make the class static I can no longer use findViewById because "a non-static method cannot be called from a static contex ..read more
Visit website
Any 3rd party library for streaming audio to backend sever
Stack Overflow » Android
by Mano
2h ago
We are building a native iOS and Android app which needs to stream audio and send to our backend server. The audio recording and uploading should have offline support so that the users can record even when they are offline and it will be automatically streamed when they come back online. I am hoping to see if there is any off-the-shelf library (paid or open source) we can use so that we can build the main logic of our application and deliver sooner and not waste too much time on the edge cases surrounding the streaming and offline functionality. Any guidance or suggestions will be helpful. Use ..read more
Visit website
Pepper Robot, issues while retrieving data via php query from Altervista
Stack Overflow » Android
by Vincenzo Muolo
2h ago
i'm a University student and i'm working on a project originally made in 2021 by my university group. The project is based on a website where users can write stories and an app where stories are listed and can be told by Pepper. Now i need to take this project again and add new functionalities, but i'm having troubles when i try to retrieve data from the PHP query. PHP queries are stored in Altervista shared space where is also stored and handled the project database (Altervista includes phpMyAdmin). In the inithial development in 2021 we had no issue trying to retrieve query results from Alte ..read more
Visit website

Follow Stack Overflow » Android on FeedSpot

Continue with Google
Continue with Apple
OR