2,522 questions
0
votes
0
answers
75
views
How to disable the “minimize” button in AndroidX CustomTabs?
I’m using androidx.browser.customtabs with a CustomTabsIntent to open a webpage inside my Android app.
Chrome shows a minimize button (a small arrow/down icon) in the Custom Tab UI, allowing the user ...
0
votes
1
answer
38
views
Androidx's cardview with rounded corners showing gray color on the edges
This is my layout:
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
...
0
votes
0
answers
27
views
Testing warm start deeplinks using ActivityScenario
I'm trying to switch from the deprecated ActivityTestRule to ActivityScenarioRule but facing an issue with some of the tests. I found out that I need to move from startActivity to ActivityScenario....
0
votes
0
answers
34
views
UWB ranging does not start with multiple peers using multicast mode in androidx.core.uwb
I am working on an Android UWB application using androidx.core.uwb.
When I add multiple peers to the device list and use multicast mode, ranging does not start at all.
With a single peer, ranging ...
0
votes
0
answers
193
views
Why is Android Room not found even though I included the Google Repository?
I'm working in a Kotlin project and want to use the Room library for SQlite.
So like explained on this site, I added the line
id("androidx.room") version "2.7.2"
to the ...
1
vote
1
answer
118
views
Android: how to fix "Cannot resolve symbol 'R'" with androidx and search_close_btn?
In my Android project, I have an onCreateOptionsMenu(Menu menu) to show a SearchView. The below line sets up an "X" graphic as a close button for the SearchView, which is shown when the ...
1
vote
2
answers
167
views
Lifecycle of ViewModel injected in root composable
I am facing weird behaviour in my application and it's probably because of lifecycle of ViewModel (injected in root composable), but I can't find any information about it in documentation.
Problem:
...
1
vote
0
answers
47
views
Fragment leaked by androidx.fragment.app.SpecialEffectsController$FragmentStateManagerOperation
I have Navigation Component (version 2.9.0) with androidx Fragments (version 1.8.6) and Predictive Back and androidx.transitions (version 1.6.0) with gesture navigation enabled. I'm seeing this leak ...
1
vote
0
answers
41
views
Could not find dependency for ComplicationManager (androidx.wear.watchface:watchface-complications:1.2.1)
I am trying to the use facilities of the ComplicationManager in AndroidX, and to do so the Gemini AI engine tells me I need to include the following implementation directive in the dependencies block ...
-1
votes
1
answer
66
views
Why does adding a provider crash android app? [duplicate]
Here is the problem in its minimal version. I have an android app that does nothing except print the sdk version in its onCreate method. I am using the AndroidManifest
<?xml version="1.0" ...
1
vote
1
answer
62
views
How to download screenshots created using androidx.test.core.graphics.writeToTestStorage
I'm in the process of changing the Screenshots created by my Android instrumentation tests androidx.test.runner.screenshot.ScreenCaptureProcessor (which worked) to the new androidx.test.core.app....
0
votes
0
answers
13
views
Responding to fragment navigation changes in androidx.navigation
The documentation for FragmentNavigator says
The current Fragment from FragmentNavigator's perspective can be retrieved by calling FragmentManager.getPrimaryNavigationFragment with the ...
0
votes
0
answers
62
views
When I try adding a typography style or even basic the text disappears from the layout
I'm developing an Android application using Jetpack Compose and facing a peculiar issue with text rendering. In my MainScreen composable, I have AnalyticsBox and HabitListItem components where text ...
0
votes
1
answer
95
views
Androidx: Cannot resolve method 'getDialog' in 'ListPreference'
I have used a custom ListPreference which worked well before. Then upgrading to Androidx, it appears this error:
> Cannot resolve method 'getDialog' in 'ListPreference'
import androidx.preference....
0
votes
0
answers
42
views
Why can't my Android app find game-text-input/gametextinput.cpp?
My game uses the AndroidX game text input module. It's been working for a couple years but I recently updated to the latest version 4.0.0 and now Android Studio/Gradle can't find the source file and I ...
0
votes
0
answers
33
views
How to avoid the AndroidX Photo Picker to display duplicates for photos with multiple formats (RAW+JPG)
I am using the new Android Photo Picker (https://developer.android.com/training/data-storage/shared/photopicker) in my app, but when the user configured the camera to store both RAW and JPEG images, ...
0
votes
0
answers
54
views
TypeError : cannot read property EventEmitter of undefine stack: anonymous@197745:50 loadmoduleImplementation@267:13
In my old React Native project with version 0.60.4, react-native-background-downloader (version 2.3.4) worked well. However, after upgrading React Native to version 0.77, I encountered the following ...
0
votes
1
answer
140
views
MAUI Java class resolution fails even with dependencie added
I want to launch from dotnet maui an Android activity implemented in Kotlin, that uses Jetpack Compose elements.
For that, I have my Kotlin class
open class ExampleActivity : ComponentActivity() {
...
0
votes
1
answer
241
views
Problem with Jetpack Compose dependencies in a C# Android Binding Library
I have an Android Library (.aar) built with Android Studio that uses Compose @Composable.
I am trying to create an Android Binding Library in Visual Studio to use my Android Library in a MAUI ...
0
votes
0
answers
40
views
Why does TaskStackBuilder.startActivites briefly start all Activities?
I am trying to use Backstack to handle navigation when opening my app via a deeplink. Basically, the deeplink opens a details page, and I want pressing Back to take the user to a home activity for the ...
1
vote
1
answer
229
views
androidx.credentials.exceptions.CreateCredentialUnknownException: During save password, found password failure response from one tap
I am trying to use CredentialManager to save username and password. I am using xml layout and testing on Android 12, I keeping getting error saying androidx.credentials.exceptions....
0
votes
1
answer
583
views
How to Set a Custom PNG Image as a Splash Screen on Android 12+ (API 31+)?
As I understand, from Android 12 (API 31+) the correct way to set the SplashScreen of the app is via the androidX core SplashScreen library:
<style name="Theme.App.Starting" parent="...
5
votes
1
answer
2k
views
How can I display a PDF in-app using the AndroidX PdfViewer?
How to load or display a PDF within my app instead of using an external app by using an Uri? I want to use the official androidx,pdfviewer library.
My app-level build.gradle looks like this:
...
0
votes
0
answers
18
views
How to restore module in android studio
I uninstalled the module that should not have been deleted by mistake. What should I do to solve the problem caused by the uninstalled module? .gradle, build, and src folder turned red and I received ...
0
votes
1
answer
25
views
SlidingPaneLayout consumes edge touches
I have two fragments within a SlidingPaneLayout, fragment A and fragment B. Fragment A is the main fragment and fragment B is the pane that can slide in. On a device which cannot fit both fragment A ...
1
vote
1
answer
80
views
listOf, immutableListOf, objectListOf
I know the listOf is from the kotlin collections and we usually use that.
listOf(1,2,3)
When I started developing in Compose I learned about the Immutable Kotlin collections library and been using it ...
0
votes
1
answer
34
views
How to skip SearchView in back stack of navigation controller?
The call docPageSearchView.show() opens SearchView. Then, pick an item from the search result and open a new instance of the same fragment to display the new content ("viewer fragment"). Now,...
6
votes
0
answers
118
views
How to receive Bluetooth headset play/pause events when TextToSpeech.speak()?
I am trying to handle the pause/play button from a Bluetooth headset (e.g. Jabra Elite 7 Pro) by simply logging into Logcat a message whenever it is pressed. The “twist” is that this is during ...
0
votes
1
answer
47
views
How to get a list of items from user using RecyclerView
So, the problem statement is I want to implement a feature in which user can add and remove as many items in the list as they want. I thought of using RecyclerView with edittext in each view and ...
2
votes
1
answer
1k
views
Android Resource Linking Failed: android:attr/lStar Not Found with external_app_launcher
I'm facing a build issue in my Flutter project when using the external_app_launcher package. The build fails with the following error:
Execution failed for task ':external_app_launcher:...
2
votes
0
answers
61
views
Web service references not available after migration from xamarin.android to .net8.0 android
I am migrating my xamarin android app to the new .net8.0 framework. This is a nightmare of a task and I have almost completed it apart from migrating my web references successfully.
On my previous ...
0
votes
2
answers
139
views
Why aren't photo editors accepting URIs from the photo picker?
I want to request a photo from the user using the system photo picker (i.e. with a PickVisualMedia request), then send another Intent for a photo editor to crop the photo. If I just send the URI ...
0
votes
1
answer
62
views
Easiest way to customize a ListPreference using AndroidX namespace
I've searched for this all over place and have found a lot of answers that don't compile, or use deprecated APIs. It's a simple thing really that I thought would have been incorporated in the core ...
1
vote
1
answer
275
views
Crash when using androidx.window on OnePlus and Oppo devices
I added this code to my books app to recognize foldable devices (deleted unrelevant code).
On OnePlus and Oppo devices (not foldable) the app crashes.
It happens only in Android OS bigger than 13.
...
1
vote
0
answers
225
views
Can't find androidx.appcompat
I want to start android development. As Android Studio is hungry for memory, I don't want to use Android Studio. I built a maven project and tried to add androidx library to my project. I spent the ...
0
votes
0
answers
57
views
Wear OS Layout Issue: Only Upper Left Quadrant Usable on Samsung Galaxy Watch 4
I'm developing a Wear OS toy app for a Samsung Galaxy Watch 4. Despite what I believe to be correct configurations (i.e. no errors in app building or deploying - except for the "glitch" I ...
0
votes
1
answer
597
views
.NET MAUI Android app build fail due to JAVA0000 error
While migrating a Xamarin.Forms app into .NET MAUI and fixing different issues, I'm getting "Type android.support.v4.app.INotificationSideChannel$Stub$Proxy is defined multiple times" from ...
1
vote
0
answers
202
views
How to process each video frame when using Exoplayer play a RTSP stream?
Here is a similar question, I am using exoplayer to pull and decode a RTSP stream, it can display the video now, but I want apply a deep learning model to detect something appeared on each frame.
From ...
2
votes
2
answers
2k
views
.NET MAUI Android app not building due to Java error related to AndroidX dependencies
I'm migrating a Xamarin.Forms app into .NET MAUI and after fixing various issues and errors, last of which was solved by adding two references:
Xamarin.AndroidX.Collection
Xamarin.AndroidX.Collection....
0
votes
1
answer
85
views
sync jitpack.io in gradle 7.0+ (with changing settings.gradle) and confront error
after sync below code :
settings.gradle >>
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
...
0
votes
0
answers
269
views
Does androidx.appcompat.app.AppCompatActivity work in Android Studio Jellyfish | 2023.3.1?
I am using the latest Android studio build (of 2023.3.1.) I'm trying to include the following package:
import androidx.appcompat.app.AppCompatActivity
I get the following error: (referring to line 3 ...
0
votes
2
answers
47
views
Unable to get path file ( not media ) using Intent [duplicate]
I have this code where basically i got a file path ( not a media one ), for some reason, in some Android 10 devices I´m getting the path as
/document/msf:<number>
In the manifest I have
<...
1
vote
1
answer
269
views
Catching Exceptions inside androidx.paging.PagingData transformation methods
I have a method, where I am transforming the paging data models into UIModels.
pagingData
.map { cachedData ->
deserialize(cachedData)
}
.filter {
it.isSuccess
}
....
1
vote
1
answer
494
views
Create a simple form using `TextField`s and a submit `Button`?
Looking at a huge number of lines-of-code to do a basic task:
First the imports:
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx....
0
votes
1
answer
228
views
Cannot resolve symbol 'widget' for import androidx.appcompat.widget.AppCompatImageView;
I'm currently migrating my project to Androidx, after using the refactor option in android studio I still have few support lib imports in classes.
When I tried changing 'import android.support.v7....
1
vote
0
answers
230
views
When using navGraphViewModels with navigation graph based on kotlin DSL the app crashes
I'm initialising a graph in Activity using Kotlin DSL and using navGraphViewModels() to acquire an instance of vm in the onCreate() of the fragment. However after process death the app crashes
Caused ...
1
vote
1
answer
67
views
Customise switch appearance in AndroidX preference activity
Summary: How do I customise/style the colour and appearance of AndroidX switch preferences?
Detail: Simplifying a bit, I have an Android app that uses the AndroidX preference classes. My preference ...
2
votes
0
answers
97
views
Call activity.setLocalNightMode before activity.onCreate() leads to inconsistent resources / colors
We want to set the localNightMode of an activity before the activity is created, to avoid an activity restart.
Therefore, in the onCreate we call:
delegate.localNightMode = NIGHT
delegate....
0
votes
1
answer
26
views
Issue with Lifecycle Callback Order when Using AppCompatDelegate.setDefaultNightMode
My Activity stack order is: MainActivity, SettingActivity, ThemeSettingActivity. The ThemeSettingActivity is top activity.
When I use AppCompatDelegate.setDefaultNightMode(AppCompatDelegate....
1
vote
0
answers
871
views
Can't find Transformations in androidx.lifecycle
I've got an unresolved failure while importing androidx.lifecycle.Transformations after adding the related dependencies in the build.gradle.kts:
enter image description here.
Following are the ...