2,440 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
65
views
Can I leave in onBackPressed() method call in my Android activity for future Android 36+ versions?
Issue:
I've been updating my apps for the Android 36 updates. I've implemented the onBackPressedCallback for my activities. I've tried adding a DrawerListener that will set the DrawerLayout's ...
0
votes
0
answers
38
views
The dialog from DialogFragment appears twice
I have one activity called TourMapActivity and StopChoiceDialogFragment.
This is a map route type app. When the user starts the route, this modal opens. If the user clicks on any of the options, when ...
0
votes
1
answer
73
views
Why does Android ExoPlayer get started twice when my activity is re-launched after an in-app update?
When my Compose-based launch activity is run, it displays a video using ExoPlayer. This works fine, but when it happens after an in-app update the video starts playing briefly then restarts from the ...
0
votes
1
answer
72
views
Is it possible to bind and unbind a bound service via button click in Android?
Can I safely perform bindService() and unbindService() when a button is clicked inside an Activity or Fragment, instead of binding in onStart() and unbinding in onStop()?
Will it cause any issue if ...
0
votes
0
answers
56
views
Safe way to call findNavController.navigate/popBackStack during detached state
We recently got an exception where a findNavController.navigate() call was made from a fragment that seems to have been in the process of being destroyed, while another (the new/top one) was being ...
0
votes
0
answers
47
views
When using Voyager, Configuration Changes create problems with lifecycle handling. Demo Project included
This is a Demo Project to illustrate a basic problem with Voyager navigation, lifecycle handling and configuration changes.
Using Voyager (HomeScreen wrapped by Navigator) leads to problems with ...
1
vote
0
answers
201
views
Not executing the registerActivityLifecycleCallbacks in the Andrid Application class. How to make this to execute and show the ads
I am fetching the network preferences from the remote config and based on the value I am showing the ads to user. But it failed to show the ads when it is from the Application class.
@Override
...
1
vote
0
answers
45
views
How to know if fragment is recreated after back press and popBackStack()?
I have a two fragments, A and B. Let say fragment A is a person form and B is a city searcher.
In fragment A, I query the database server for some data, and until I get this info I display a ...
2
votes
1
answer
48
views
Android: Kotlin: running tasks upon app closing [closed]
While a user moves around my app I collect key events in a list. When the user quits the app I want to:
write that list to a file; and
upload that file to the cloud for analysis on the backend
I put ...
3
votes
2
answers
157
views
Why is my WorkManager worker not being triggered in onDestroy?
I’m facing an issue with triggering a WorkManager worker from the onDestroy method of my MainActivity. Here's the scenario:
I’ve implemented a ClearCacheWorker using WorkManager to handle background ...
0
votes
1
answer
29
views
Sticky eventbus only gets called when I enter to activity
I have two Activities, I am trying to send event from activity A to activity B without entering to activity B.
I am trying to do it with sticky eventbus, the problem is the event does not get trigger ...
1
vote
1
answer
67
views
How to specify which Android Activity should be launched after a configuration change?
I have two activities - LaunchActivity and GameActivity. It's necessary for LaunchActivity to open first because it launches GameActivity with configuration parameters. This is working fine except ...
2
votes
0
answers
46
views
onResume begin called when app is in background on launch
On Android 14, If I'm launching an app while the device is locked, it will call onResume/onPause, while the app is in the background. This is causing issues with NFC intent registration, because the ...
0
votes
1
answer
105
views
Text display in random position in all other activities of app, by triggering from one activity
I have Main, Home activities are there Launcher app side (.apk). PlayActivity, Profile, and Init are there on the library side (.aar)
from the server side 1 message will trigger, then I want to show ...
1
vote
1
answer
103
views
How to Refresh a Feed When Returning from the Background in Android?
I want to refresh my feed in an Android app, but only when the app is brought back to the foreground (e.g., from the background or when the user minimizes and reopens the app).
The refresh should not ...