When targeting SDK 34 there are new requirements for starting a service, where you have to include a foreground service type...
https://developer.android.com/about/versions/14/changes/fgs-types-required
There is this tutorial page, but it does not mention using the Service.StartForground...
My checklist app uses a service to upload a backup file to Google Drive when the list changes or the app exits. I first save the file locally (instant), but because it takes a few seconds to upload to the net, I thought a service would be the right way to do this (so that the service gets the...
Hi everyone,
The app I'm developing needs to detect user interaction in every part of the screen at any time in order to reset a Timeout timer.
I did this currently with B4XPages exploiting this Java method, but this needs to be put in an Activity module, more specifically, in case of B4XPages...
I'm finishing making an alarm app - in fact I've already finished -, but I wanted the warning to be displayed instantly, without going through other pages. I achieve this by placing KeepAlive on the page that will display the warning, after loading everything. It happens that the alarm becomes...
Hello
I use the following code in Service_Create in my starter to send a notification with firebase:
Sub Service_Create
Try
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
Catch
End Try
End Sub
There are also functions in this service (starter).
In these functions...
Hi everyone, I'm using this method by @Erel to take a picture from Android in my app released months ago.
Since some days, some customers told me that the "take picture" button is not working anymore, randomly.
After some investigation in my code, I could not find the problem... the only thing...
Hola
Según esta discusión nos esperan problemas con Android 12+
El debate es sobre los servicios y receptores después de android 12+
Según lo que entendí me puse manos a la obra para actualizar...
yo tengo una aplicación donde el usuario configura un recordatorio, este lo programo de la...
Hi everyone
I am trying to make an app that will start activity even if the screen is locked with password when a specific text message is received.
I'm using service intent filter for sms receiveing and it work fine when phone is on
Tank's for any help
I'm just writing to try to understand when a service running in the foreground is disabled by the Android system. I developed an alarm app and after choosing the text and time data for the alarms, I close the app and only its service is running in the foreground, sometimes it works for a day...
Hi,
I had a problem for which there was no solution:
https://www.b4x.com/android/forum/threads/startreceiverat-okhttputils2-during-phone-sleep.149687/
Somehow I managed to get a service to run in the "foreground" under Android 13 (API 33). What's interesting is that this service doesn't stop...
I have a project that needs to enable auto-start by the user and check that auto-start is enabled
Asking to enable autostart works fine but I can't figure out if autostart is enabled or not
I used the following Sub to get auto launch permission
:
Sub CheckAppAutoStartSomeDevice
Try...
Hello
I use HTTPJob in the receiver
There is no problem when the program is running and all requests are sent correctly
But
When I close the program, I get a timeout error or Unable to resolve host error 😑
What is the problem?
And one more question, is it still possible to run a service in...
Hi
How can I create a notification with a big image using a library:
https://www.b4x.com/android/forum/threads/nb6-notifications-builder.91819/#content
which when clicked run a service without bringing up any activity?
Hi everyone, i've used BLE library with Android and i have the necessity to use the SetNotify method.
On Android this method return a boolean value to tell if the operation went ok or not.
On iOS seems that the SetNotify method does not have a return value.
I use the return value to wait for...
Hello, I have searched the forum but I have not found an example that makes me understand how I can create a hidden service that is running even when my application is closed (or opened) where I can call a web service and check some data, and only if my condition it is true to display a...
Hello,
When i run my project (an activity with a service) in release mode in my Samsung Galaxy S20, after about 3 minutes of screen turned off, the complete app just freezes for a few seconds (or even minutes sometimes) until i turn on screen again, and then the program continue working...
Hi,
I am using MyLocation as a basis for my project.
I want to stop and kill the service when the user stops the program.
This is what I tried:
In tracker.bas:
Sub Service_Destroy
' Service.StopAutomaticForeground
CancelScheduledService(Me)
StopService (Me)...
Not long ago Don provided example Provider Requester Activity based communication via Intents.
Although that Activity version had some hints in it for Service based version, it took several additional steps to get it working (Service Intent must be explicit, which may reflect more on my...
Hi
I could not get the BT services list
the code line 65 return null Because code line 57 return BluetoothGatt with services size 0
I know for sure that the BT Device I am working with is working properly
This is my first task in a new job and it is very important for me to solve it as...
I am using B4XPages in my project.
There is a TTS module which is supposed to play even when screen is turned off.
It plays for a while then pauses and resumes only when screen is unlocked ( probably as long as tts queue is clear)
So after a lot of forum search - using a service seems to be the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.