Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

No custom broadcasts are received on an android service

I'm developing some apps for a specific device running Android 11 (API level 30) in kotlin. I have 2 apps that need to communicate with each other and I have thought to do it using custom broadcasts. ...
Jon's user avatar
  • 1,123
1 vote
0 answers
39 views

Plugin for Android Application is Unable to Locate Service

my team and I are working on a plugin for the Android app CivTAK. Plugins in the context of this application are treated as individual apps with just a Service and no Activity that are discovered by ...
Gabriel Garcia's user avatar
0 votes
1 answer
97 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 ...
insider_ank's user avatar
0 votes
1 answer
69 views

Android Studio - Timeout error xml preview

The preview took too long to load. The issue can be caused by long operations or infinite loops on the Preview code. If you think this issue is not caused by your code, you can report a bug in our ...
Deepak Parmar's user avatar
1 vote
0 answers
106 views

Flutter app crashes: Context.startForegroundService() did not then call Service.startForeground()

I am using flutter background service to run a beacon scan in the background and in the foreground when the app is disconnected. I get the folowing response when the app crashes. The app only occurs ...
Dries Vandenbussche's user avatar
2 votes
1 answer
403 views

Crash with ForegroundServiceDidNotStartInTimeException on Android 14

I have foreground service with notification that tracks user location, but in the Crashlytics I see that the app crashes for some users with Android 14. I can not reproduce it. Fatal Exception: ...
Zookey's user avatar
  • 2,697
0 votes
0 answers
22 views

Have Activity and Service observe the same flow

I have an Activity and a Service who both use the Room database data. I have the following code for observing changes to the data: viewModelScope.launch(Dispatchers.IO) { repository.read().flowOn(...
theblitz's user avatar
  • 6,881
0 votes
1 answer
45 views

(Android) Calling activity from service using startActivity(intent) gets called for the first time, but fails to run second time

I have an activity which i call from service, I am using startActivity(intent) to achieve it, it works fine when i am triggering it for the first time, the activity gets launched properly. But if I ...
Vishwa Mehta's user avatar
1 vote
0 answers
29 views

Android can not start Service with ForegroundServiceStartNotAllowedException

I have a Service called ServiceTechnicianTrackingService that tracks location with foreground notification of the people using phone. public class ServiceTechnicianTrackingService extends Service { ...
Zookey's user avatar
  • 2,697
0 votes
0 answers
18 views

How can I continously send messages from an Android Service to the currently running activity , even when the service is busy

I have a running service which performs a long running operation, the user can initiate the service with a press of a button from an activity, which will show a loading spinner and disable all ...
Cruces's user avatar
  • 3,109
0 votes
0 answers
21 views

android widget item click in remote view service delays app open

I have a widget that has a grid view within it. In which I use RemoteViewService and set click listener using setOnClickFillInIntent and setPendingIntentTemplate, but problem is when I click the ...
nasibeyyubov's user avatar
  • 2,543
0 votes
0 answers
34 views

How to dynmically Register a explicit broadcast from a foreground service?

Using Android 14. As per my understanding Broadcast receivers for Implicit broadcast can not be registered statically in manifest anymore( except few ) but for Explicit intent It can be done both ways....
Soumyadip Sharma's user avatar
0 votes
0 answers
29 views

android widget remote view service onCreate is called after app is destroyed

I have a widget for my app which uses a grid view to display a number of items. Each time I enter the home screen I call backend endpoint to get latest data and I update widget using below code public ...
nasibeyyubov's user avatar
  • 2,543
1 vote
0 answers
106 views

In Android 15 can a Device Admin App start a service from the background

With the recent changes in Android 15 where there are even more restrictions on starting services from the background I have not seen if device admin apps are part of this restriction. Before I would ...
tyczj's user avatar
  • 73.5k
0 votes
0 answers
111 views

Screenshot in Android with MediaProjection

I am a newbie in android programmin and write small application with Kotlin in Android Studio 2024. I need make screenshot of another application. I see MediaProjection as good way. My app has ...
Alexander Zabolotni's user avatar
0 votes
0 answers
62 views

Broadcast between Service and Activity does not work with NOT_EXPORTED flag

I want to send and receive Broadcast between Service and Activity. I registered programmatically created BroadcastReceiver both in Service and Activity with using flag RECEIVER_NOT_EXPORTED for make ...
taehee's user avatar
  • 21
0 votes
0 answers
28 views

how can i display a fragment on a floating window using a button that is on another fragment

i try to go from one fragment to another within the floating window using buttons. I manage the fragments using a activity that contains them but when using the button on the first fragment (...
María's user avatar
  • 11
1 vote
0 answers
58 views

How to play sound from Glance widget using MediaSessionService

I'm trying to write an app that allows audio to be launched from an app and widget using Jetpack Compose and Glance Widgets. The app shows all audio from the device, which can be controlled (start and ...
Пенка Пшеничная's user avatar
1 vote
0 answers
70 views

How to startActivityAndCollapse(PendingIntent) from quick settings on locked screen of Android 14?

I want to show an activity when the users taps on a quick settings tile while the screen is locked. This works as expected using the startActivityAndCollapse method taking Intent as parameter (...
fe60's user avatar
  • 363
0 votes
1 answer
50 views

How to manage an Android service with multiple operations?

I had recently joined a new company and have taken over a project that has been on-going for years. The unfortunate problem with this picture is that some of the code has been badly maintained and the ...
shermannatrix's user avatar
1 vote
0 answers
103 views

Android Codec2 component store service crashes while stopping the service

I am debugging a crash issue reported in the Android Codec2 integration of an audio decoder. The decoder component starts as a lazy service. Please see the source code below, int main() { ALOGE(&...
Rahul M's user avatar
  • 11
1 vote
0 answers
104 views

Accessibility Permission revoke

After auto-updating the application, the accessibility permission is automatically revoked, even though it was already granted. The device's OS is Android 10. There are multiple devices on which my ...
Sachin's user avatar
  • 11
0 votes
0 answers
20 views

Acitivity is recreated after navigating to forceground

I am creating an Android application, that bounds to a Service. bindService(intent, this, ComponentActivity.BIND_AUTO_CREATE or ComponentActivity.BIND_IMPORTANT or ...
Zappy.Mans's user avatar
0 votes
1 answer
70 views

my app does not send the notifications in scheduling on android studio

I've been working on this project for a few days, and either it sends a notification at the moment I schedule it or never. As it stands right now, it creates the channel and the notification, but it ...
Yuzel Rose's user avatar
3 votes
0 answers
268 views

Foreground Service Location being killed by android after 5 mins of inactivity

First let me be clear about my project deails Requirement : I need to send my user location to server constantly for about every minute Problem : Android is killing my service after about 5 mins of ...
Sai Dilip's user avatar
  • 112
0 votes
0 answers
75 views

Binding to a DeviceAdminService and calling its methods

I have a device admin app that is the device owner and I want to bind to the DeviceAdminService class that the admin app has from another app. The problem is that the DeviceAdminService class has ...
tyczj's user avatar
  • 73.5k
0 votes
0 answers
146 views

How to avoid an Android Service being killed when app is closed?

Delphi 11.1 I need to start an Android Service which stays running even if the app is closed by the user or killed by the OS. The app has an SQLite database in the documents folder and the service ...
Guilherme Camargo's user avatar
0 votes
0 answers
34 views

Flag in android service changed for another companion object

I have an aidl interface in the client and server applications with which I connect from the Client application to the AIDLApiService service of my Server application. I call 2 methods on the ...
Sunbey13's user avatar
  • 423
4 votes
0 answers
199 views

How to avoid ForegroundServiceStartNotAllowedException on retry operation for long-running workers?

I have a long-running worker that performs network operations. If a network error happens during the operations, the worker is stopped with the Retry worker result. Android then automatically restarts ...
Jojo56400's user avatar
  • 349
3 votes
1 answer
3k views

My Foreground service is crashing on Android 14

I am implementing an android application with a service that is returning the location so , i have set the attribute foregroundServiceType to "location". Here is my service in the manifest ...
Patrick Renaud's user avatar
0 votes
0 answers
68 views

How to launch android activity in background, or minimized, when screen locked in Android 14 and start the activity with broadcast intent

I'm trying to make an android app to run Python script public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super....
necra 's user avatar
0 votes
0 answers
31 views

The slider does not move after pausing the player MediaSession Android studio

public class MediaService extends Service { public static MediaPlayer mediaPlayer; ScheduledExecutorService timer; public static Intent playPauseIntent, nextMusicIntent, prevMusicIntent; ...
Григорьев Данил's user avatar
0 votes
1 answer
54 views

Android service and thread in singleton are the equivalent?

There is my WifiConnection class that encapsulates the process of connecting and receiving data via Wi-Fi Direct (peer-to-peer). It can contain thread {} or a CoroutineScope(Dispatchers.IO) for socket ...
Viewed's user avatar
  • 1,403
0 votes
0 answers
74 views

How to ensure that my foreground service will be running as long as possible?

I am developing a mobile app on Android that will track the hours that users spend in certain location using geofencing technology. This app will be installed on phone that will be provided by ...
Nikolay Valchanov's user avatar
0 votes
0 answers
68 views

onServiceConnected not called but context#bindService return true

I am experiencing an issue where the onServiceConnected callback is not invoked in my client code, despite the service's onCreate and onBind methods being called successfully and return a binder. The ...
Kugge's user avatar
  • 38
1 vote
0 answers
478 views

How can I make an app reopen when closed on an Android device?

I have a .bat file. This file contains code that reopens an application when it is closed. So how can I run this on Android? I want it to constantly check in the background and run it if the ...
PrivateWolf's user avatar
0 votes
0 answers
17 views

stopservice does not work after ondestroy

I am developing an application that listens to a streamed audio. In the following code, when I first open the application, the stop and start service functions work fine, but when I exit the ...
Hasan Altay's user avatar
0 votes
0 answers
126 views

How to run a service in background on Android 10? Rooted device

I have a rooted Android 10 and a service. It records the mic and accesses GPS coordinates. I'm trying to launch and run it in background, with no additional notifications in the Notification tray. And ...
mandiromi's user avatar
1 vote
1 answer
127 views

How to disable TileService for Android 34+ but keep for previous versions?

So starting from Android 34 TileService doesn't allow to start a foreground service and use location | camera | mic anymore (though no official info about it, at least we still can use widgets and ...
user924's user avatar
  • 11.9k
0 votes
0 answers
18 views

Is okay to collect state from Service in ViewModel for my android app?

My program needs to continuously get data from the backend and keeop the state, so my data is maintained in Service. When the Activity needs to display, my ViewModel will collect the state from the ...
progquester's user avatar
  • 1,702
0 votes
0 answers
18 views

What is the differernce between foreground and background service in Android in terms of code?

Is the following statement correct for Android service - If we call startForeground() inside onStartCommand() or inside onCreate() of the service class then it is a foreground service and if we do not ...
Bhaskar Jyoti Dutta's user avatar
2 votes
0 answers
2k views

Users crashing because of Service.startForeground() not allowed due to mAllowStartForeground false only on Anddroid 14

I just released an update targeting API 34 and suddenly I'm getting this exception and it is happening 100% only on Android 14 devices. Caused by android.app.ForegroundServiceStartNotAllowedException: ...
casolorz's user avatar
  • 9,514
0 votes
1 answer
396 views

.NET MAUI Android - Unable to create service: class not found exception

I'm building a call screener app for Android using the CallScreeningService API. When I run the app, it registers the service OK but when I call the emulator, I get the following exception: Java.Lang....
Carl Schmidt's user avatar
0 votes
0 answers
255 views

Delphi Android service was stopped after closing the android application

I have used Delphi 12 for developing Android application and I'm trying to Service which needs to runs in the background to receive the frequent messages from Server using TCP sockets to displays the ...
Velson Infotech's user avatar
0 votes
1 answer
88 views

Recording screen from notification instead of MainActivity and using multiple notifications for each recording?

Not sure if this is the right place since this question might be flagged as opinion-based however what I need is mainly advice on the architecture. I have developed an app that record the screen (...
zaxunobi's user avatar
  • 930
4 votes
1 answer
7k views

Service.startForeground() not allowed due to mAllowStartForeground false when triggered from Activity.onStop

After exhaustive investigation based on similar issues, I have to try and get some input on my specific case. I have an Android application that consists of an activity and a service. When the ...
Werner Rösemann's user avatar
2 votes
0 answers
44 views

android widget opens application with delay when clicked

I have a widget which opens a qr scan screen in my application but, when I click widget it opens application with delay, when I put log within onReceive function I can see the logged text after like 1-...
nasibeyyubov's user avatar
  • 2,543
0 votes
0 answers
28 views

Service onDestroy Called even when there is still work left

I have a CountDownTimer that runs in a service when the app is in the background, onFinish(), the timer is supposed to check whether to start another timer or send a notification, the trouble is that ...
Blaise Lukwayi N's user avatar
0 votes
0 answers
63 views

Samsung Deep Sleep Workaround (Content Provider vs Bound Service)

I am working on a library integrated into multiple apps that need to 'talk' to each other to get a specific value. This is an issue on Samsung since the apps can be put into Deep Sleep and cannot be ...
Ayohaych's user avatar
  • 5,189
0 votes
1 answer
55 views

Alert Dialog is not showing when I call it from a VPNService class

I am creating a VPN Local Service on Android studio as my Thesis project for my university. Specifically, i have the main class on my Java File which is VPNLocalService extends Service, in that class ...
Jgianny's user avatar

1
2 3 4 5
135