685 questions
1
vote
1
answer
105
views
AudioFocus requests ignored on Samsung devices (Android 15, targetSdk 35) even with foreground service
When I updated my app’s targetSdk to 35, I noticed an issue on Samsung devices running Android 15:
Even if my app is running a foreground service, AudioFocus requests are ignored whenever the app ...
1
vote
0
answers
49
views
onSensorChanged() isn't work only pedometer
The intent of the code I created is that whenever the data from the Pedometer changes, the data is passed in real-time via the onSensorChanged() function.
However, even though data is being collected ...
0
votes
0
answers
15
views
How do I change the foreground color of a bars:RibbonTabItem label in Actiprosoftware
I am having trouble changing the foreground color of a label in Actiprosoftware. It does not appear to change when I put foreground = "red". I also tried some things in the resource ...
-1
votes
2
answers
146
views
ExecStart systemd start a foreground shell, timeout failure
ExecStart=/opt/prometheus-2.53.0.linux-amd64/prometheus --config.file=/opt/prometheus-2.53.0.linux-amd64/prometheus.yml failure.
timeout. because prometheus keeps in foreground.
ExecStart=/opt/...
1
vote
1
answer
317
views
How do I tell the foreground program to send output to spool vs display?
I have a program that is running in foreground, with simple WRITE statements. When List Processing is complete, the program displays the contents of the output. When I run this program in background, ...
1
vote
2
answers
1k
views
Android Service Error: android.app.ForegroundServiceDidNotStartInTimeException
I want to create a Service in Android to start a long activity but it crashes with the following message shown:
android.app.ForegroundServiceDidNotStartInTimeException: Context.startForegroundService(...
0
votes
1
answer
54
views
Sharing WebView object between Activity and WindowManager in foreground
I am trying to show webview in foreground with floating view, i am taking webview from companion object of activity, and i added this to the floating view by removing webview' parent, and it worked ...
-1
votes
1
answer
1k
views
When to use the foreground service types on Android 14
i have an app that targets Android 14 and uses the camera and location feature with the necessary manifest permissions.
When i run my app and use one of those features it doesn't produce any ...
0
votes
1
answer
57
views
List box color for each iteme with Databinding WPF
I use a Listbox that showing different test , I'd like to show a test in green color when the test is OK and red color when the test is not OK , I use data binding for showing ma list of test and also ...
0
votes
1
answer
124
views
Xamarin Forms: Issue with reading notification data in foreground mode
Below is my MainActivity code:
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
using static Firebase.Messaging.RemoteMessage;
using Android.Gms....
0
votes
0
answers
39
views
Suitable Android Foreground service
Does android have some suitable foreground service for the job who will keep track of time, very similar to the work of an alarm clock?
User choosing the time then the app creates request, close the ...
1
vote
0
answers
281
views
Get Push Notifications on App's Foreground mode in SwiftUI
I am getting Push Notifications, when my app is in background mode but the notification is not showing when the app is in foreground mode.
I searched a lot about this issue and they say, you have to ...
0
votes
1
answer
188
views
Is there a way to set a ConsoleColor value equal to a variable?
I am working on creating a class to support a console app I am developing, and I would like to create a method within to change both the background and foreground color. Is there a way to set a ...
0
votes
0
answers
212
views
Storage of android sensor data with foreground service
I am developing an app that uses a foreground service to monitor and record sensor data on a realm database. A sensors data object which holds all the values is stored every second in the database. I ...
3
votes
1
answer
1k
views
React Native: Can you detect when app is closed down, as opposed to backgrounded?
In my React Native app I'm using AppState to try and detect when the app goes to the background, vs when it's completely closed down. I want to trigger separate functions for each. But from their ...
0
votes
2
answers
127
views
Foreground property for Button in QML
I am trying to change the foreground visibility of a QML button. Based on the content i read from internet and QML documentations, i have developed the below example.
import QtQuick 2.15
import ...
1
vote
0
answers
162
views
How to get the packagename of the app that is running in the foreground on an Amazon firetv stick 4K Max?
I’m messing around with this problem for a long time and I’m very clueless how to get this going.
I want to create an app for the Amazon firetv stick 4k max (Android 9 - API level 28), that monitors ...
0
votes
1
answer
321
views
Xamarin.Android Broadcast Receiver is being fired properly after boot completion on Android Emulator but on Android 9 (Techno Spark 4) it doesn't
I am trying to get my xamarin.android foreground service to run after boot completion on my Android 9 (Techno Spark 4 Air) Mobile Phone. It is working very well on the android emulator.
This is what I ...
0
votes
0
answers
401
views
Toast Notification launches app in background instead of foreground
I need help with Toast Notifications. I've written a script that creates and sends a Toast notification with custom buttons and protocols. The issue is that it launches apps in background. How would I ...
10
votes
1
answer
4k
views
Foreground service notification takes a few seconds to appear/show up
Foreground service notification shows too slowly on Android 12. Used ContextCompat.startForegroundService(...) and mContext.startForegroundService(...). It still shows in 5-10 seconds.
Here is an ...
0
votes
0
answers
1k
views
How to get a contrast color for a given color using contrast ratio?
I need to get the contrast color for a text foreground using the background color and contrast ratio between colors.
Example:
Background - Colors.Red
Contrast ratio - 7.0
With the above inputs, I ...
0
votes
1
answer
323
views
Foreground Service for sensor data stops after a small period of time
I am developing an android application where sensor data are recorded from the sensors, displayed in graphs and also stored in an SQLite database. I want the sensor data process to run when the app is ...
0
votes
1
answer
797
views
Notification update from a service when app is closed?
I am learning services (and android) with the Pedometer of this web:
https://github.com/nintendaii/unity-background-service
Unity create a service in android that counts the steps done.
I am trying to ...
1
vote
1
answer
386
views
What's the best way to get the package name of the application in the foreground?
I'm working on an AOSP project and as part of that I'm modifying the Bluetooth SDK. I have made changes in android.bluetooth.BluetoothAdapter::getDefaultAdapter() method and I'd like to know which ...
0
votes
1
answer
99
views
I am trying to build an android application that use location information, but I am confused what to use foreground or background location permissions
I am trying to build an android application that use location information, but I am confused what to use foreground or background location permissions
my goal is to get location information always ...