374 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
47
views
How to Prevent App B from Being Retained in Background When Switching Back to App A in Android?
I have two Android apps, App A and App B, and I am using Intents to switch between them.
Scenario:
App A opens App B using an Intent.
App B completes its task, and now I need the user to switch back ...
1
vote
1
answer
240
views
WorkManager with `.setRequiredNetworkType(NetworkType.UNMETERED)` has no active internet connection inside `doWork`
I am creating a backup app which backs up some files at night. Because it needs to be every night around the same time I'm using a OneTimeWorkRequest which will be scheduled again after the last time ...
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 ...
1
vote
1
answer
159
views
Background worker doesn't work on real devices
The application requires periodic (15-30 mins) data synchronization with the backend.
I implemented this using the WorkManager API, but I encountered the issue that synchronization only triggers when ...
2
votes
0
answers
224
views
Background location using WorkManager in Android 13 returns null when app is closed
Manifest file :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission ...
0
votes
2
answers
4k
views
How to use NotificationListenerService in Android 14?
How I can be valid to use NotificationListenerService in Android 14? (API 34)
This application is going to be run on Android 14 or above only,
so it does not consider backward compatibility in order ...
1
vote
1
answer
741
views
How to Bluetooth LE background connection?
Sorry for my bad English.
Context
My main goal is to build a electronic lock, the key would be a phone connected in BLE. The proximity of the phone must unlock the lock.
What I want to do
A ...
1
vote
0
answers
129
views
How to hide the app content with splash screen when app is in backgorund/inactive in flutter with package or method channel
Hey guys i am working on an app where the client wants to show the splash screen when app is in background mode not a black screen using flag secure, anyone who can help me with it for android and ios
...
0
votes
1
answer
75
views
Pick a color from a list, array not found in Android
In the app, I am developing, I have to choose a color based on a number from 0 to 4. I have decided to create an int-array in the colors.xml but it's not working. The kotlin code, is not able to ...
0
votes
1
answer
379
views
AsyncTask onBackground() throws error - Caused by: java.lang.IllegalStateException: Method addObserver must be called on the main thread
Today I opened my project which haven't been updated for about 6 months now and I decided to update all the libraries to make it up to date with recent Android development environment.
After updating ...
0
votes
1
answer
793
views
React Native Socket.io not working in background
In my app the user via a button can start a special mode where various GPS, BLE etc services are activated. Among these, I need the server to know in real time which users have this mode enabled. I ...
1
vote
0
answers
420
views
Black Background instead of transparent screen in an activity
I have an activity which uses the theme - Theme_Dialog (https://developer.android.com/reference/android/R.style#Theme_Dialog).
I am trying to test my app in the upcoming Android14(A14) Beta build, but ...
0
votes
0
answers
164
views
How do I modify or remove system-defined shortcuts such as "app info" and "Pause app" in android
I have tried retrieving all the existing shortcut using
shortcutManager.getShortcuts(ShortcutManager.FLAG_MATCH_PINNED) with all existing flag but it didnt retrieve "App info" and "...
0
votes
2
answers
435
views
How to programmatically show/hide only the background/image of an ImageView in Android?
I have an ImageView, and its alpha is set to 0 in the XML. The XML looks like this:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="&...
3
votes
2
answers
461
views
How to force stop an app with Android Studio to test background lifecycle mechanism?
So I would like to test what happens with my application when the user puts it to the background and after a while the OS would free up memory thus kill the app, and I would like to re-open it again ...