Status Update
Comments
er...@gmail.com <er...@gmail.com> #2
If you are using location, you should be using the permissions API to ensure that you have the permissions you need to track background location before any attempts to use APIs that require that permission.
SystemForegroundService
just provides a convenient entry point for the ListenableWorker
. If you require additional permissions, its the app's responsibility to ask for permissions and check that those permissions are granted.
su...@gmail.com <su...@gmail.com> #3
We are performing location checks before submitting the WorkManager job. However, the problem exists if the location permission is removed by the User after the job has been submitted. The OS is force killing the app (when the location permission is removed), and the OS is trying to restart the SystemForegroundService which then crashes our app immediately on launch. We are not interacting with the WorkManager in this scenario other than initialising it which is necessary on app start, e.g.
val workManagerConfig = Configuration.Builder()
.setWorkerFactory(entryPoints.getWorkerFactory())
.build()
// Initialize WorkManager with the custom configuration.
WorkManager.initialize(context, workManagerConfig)
return WorkManager.getInstance(context)
ja...@shuttlecloud.com <ja...@shuttlecloud.com> #4
I think it might be best for now if your foreground worker does not declare that it is a location foreground service and instead it is either a 'short' service or a 'special use' service such that WorkManager's SystemForegroundService
redeliver intent restarts your foreground worker and in it you can check for location permission and then start a real foreground location service.
Meanwhile we have to adapt WorkManager's SystemForegroundService
to Android 14 requirements to have a foreground service type along with its permission runtime check as otherwise many of the types have runtime permissions pre-requisites.
er...@gmail.com <er...@gmail.com> #5
Sorry, I just re-read the changes for Android 14, and for this to work elegantly, we will need to change the implementation of SystemForegroundService
to do the right thing.
Will try to land this in the next WorkManager release.
hu...@gmail.com <hu...@gmail.com> #6
[Deleted User] <[Deleted User]> #7
cl...@gmail.com <cl...@gmail.com> #8
co...@gmail.com <co...@gmail.com> #9
Hey - We are working on a fix that will prevent WorkManager from crashing when the foreground worker is restarted due to permission loss. Be aware though that WorkManager won't be able to set the app in a foreground state and it is expected for the worker to self check the required permissions and to probably return a Result.failure()
from the work override.
e....@inspheris.fr <e....@inspheris.fr> #10
Branch: androidx-main
commit 4616a739983e6316819dc515057677edf40a41c1
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 24 08:59:34 2024
Catch SecurityException in startForeground
In API 34, startForeground() will throw SecurityException if the service type prerequisites are not met. WorkManager won't be able to start the foreground service but the worker is likely to continue and ideally fail once it checks the permission needed to do the actual work. The worker will also be subject to JobScheduler limitations.
This change mitigates the crashing issue of a foreground worker running and the app losing the prerequisite permission, causing the app to restart and due to SystemForegroundService being sticky, it restarting too but failing at startForeground() due to missing permissions.
Bug: 333957914
Test: Manual
Change-Id: I96607f62fdd456290163ee6f2774f9d31c64e79e
M work/work-runtime/src/main/java/androidx/work/impl/foreground/SystemForegroundService.java
ro...@gmail.com <ro...@gmail.com> #11
Branch: androidx-main
commit c540fa0564df85fa4e3cfd2d98f532f4120e12d8
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 24 09:48:38 2024
Add foreground worker with location
Updates WorkManager integration app to validate Android 14 foreground service type requirements, including the addition for a foreground worker who uses location APIs.
Bug: 333957914
Test: n/a
Change-Id: I9ac76d029ab0f0e4d1256145bdc2e3cb20b27c36
M work/integration-tests/testapp/lint-baseline.xml
M work/integration-tests/testapp/src/main/AndroidManifest.xml
A work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundLocationWorker.kt
M work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt
M work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.kt
M work/integration-tests/testapp/src/main/res/layout/activity_main.xml
M work/integration-tests/testapp/src/main/res/values/donottranslate-strings.xml
[Deleted User] <[Deleted User]> #12
<[ https://android-review.googlesource.com/3190158 :// = > https://android-X-review.android-X-source. com/3190158 and I didn't get my addresses I need <[ Android-X-Developer.com ]> <[Android-X-GloblaleWaybandTelcomPrivateGovSecurityServices.com ] [ Android-X-GlobaleEcosystemEnterprise ]
:// I need everything of this to be Android-X Object script because they are trying to say it's their's and they can't even run it and I need it back ]>
vf...@zalando.de <vf...@zalando.de> #13
lc...@dalai.com <lc...@dalai.com> #14
am...@gmail.com <am...@gmail.com> #15
ad...@mypocketxp.com <ad...@mypocketxp.com> #16
[Deleted User] <[Deleted User]> #17
mi...@gyde.io <mi...@gyde.io> #18
+1 Our business case highly depends on being able to list the messages in a dm or room.
he...@gyde.io <he...@gyde.io> #19
ei...@gmail.com <ei...@gmail.com> #20
ro...@gmail.com <ro...@gmail.com> #22
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #23
Hi there!
The Google Chat API is for bots and thus is limited to the action the bots are able to do. Right now the way of retrieving user messages on a bot is by receiving an event when they are sent (MESSAGE
event
What use case do you have that requires you to fetch all messages?
Many thanks!
PS: Adding a comment with +1
does absolutely nothing to bring an issue to Google attention. The proper way of doing so is to click at the white star (☆) on the top-left.
hh...@nervecentresoftware.com <hh...@nervecentresoftware.com> #24
an...@google.com <an...@google.com> #25
Actually, Google Chat has notifications on multiple platforms (
Also, the Chat API is just for bots (
Cheers!
gu...@cpqd.com.br <gu...@cpqd.com.br> #26
I understand that this can entail privacy concerns. Perhaps this should be available just for room conversations and not for DMs. Also, there should be a configuration to keep the conversations in a room private or public for this API.
hh...@nervecentresoftware.com <hh...@nervecentresoftware.com> #27
ro...@gmail.com <ro...@gmail.com> #28
What use case do you have that requires you to fetch all messages?
my case: I use a helpdesk google chat room where any user can send question and any user who knows the answer can help. So I am interesting and trying to chreate chatbot which can find answers in FAQ database and answer automatically. Moreover any should have ability to ask some more detail without mention bot. Seems that ability to receive all new messages in chat is the essential point in this issue. May be option to allow/disallow this feature will be good choice
ha...@gmail.com <ha...@gmail.com> #29
We are having trouble finding a way to back up those threads and share them with non-chat-members.
When this API is implemented, we will output the threads that we mention to the bot to Spreadsheet or other formats for storage and sharing non-chat-members.
jo...@gmail.com <jo...@gmail.com> #30
an...@google.com <an...@google.com> #31
The features requested
There are 2 kind of features which are a bit different:
- Allow the bot to interact with other messages. A good example would be to be able to quote other messages with a command.
- Get the messages on a space (usually a room). This wouldn't need to be bot. A good example would be generating message statistics.
The second request would be a new API and not part of the current one. Also notice that any of the two features could be used to work around the other:
- If the first gets implemented, you would add your bot to read the messages.
- If the second gets implemented, you would be able to make the call when needed.
Possible workarounds
If you need to automate some questions and answers, you can make users to start a chat your bot instead of using a room. The bot will receive all the DMs (even if not mentioned). This would also remove the need to create rooms every time.
Another possibility would be to use
Final notes
I've made an internal report on feature #1 as it is the one related to this component. If there are any further updates or inquiries about it, they'll be posted here.
Have a wonderful day!
cg...@redhat.com <cg...@redhat.com> #32
ja...@pinnacol.com <ja...@pinnacol.com> #33
The bot would look at all the messages in the thread it's mentioned in and turn it into the body of a support ticket and sent it to the appropriate team.
sp...@positrak.com <sp...@positrak.com> #34
I am also interested in some sort of chat notification. I realize the browser and phone can be set up for alerts, but I want a big flashing alarm that's impossible to overlook when I have a new chat message.
After realizing the chat api is only for bots and cannot be used unless the messages are addressed to it or a space, I stumbled on the original issue at (
Even though the unread message count didn't work for the CHAT label, I could just track the current message count and implement a last reviewed count. That lead me to the watch function and creating a pub/sub client to listen for changes in messages.
However, chat message changes are not published. I can send myself a couple chats with no update, but an email will fire one. Then, when I check the message count again, the chat count has indeed incremented along with the inbox count, but without any notification.
So I guess that only leaves polling the gmail api every so often to get a new message count. I was hoping for a more elegant solution, especially when I realized the depth of the Google cloud platform, but it looks like this is it.
Hopefully I've missed something, or something related will come from this feature request.
is...@google.com <is...@google.com>
vf...@thoughtworks.com <vf...@thoughtworks.com> #35
71...@gsuite.airbus.com <71...@gsuite.airbus.com> #36
[Deleted User] <[Deleted User]> #37
jo...@hcss.com <jo...@hcss.com> #38
th...@cybelangel.com <th...@cybelangel.com> #39
[Deleted User] <[Deleted User]> #40
[Deleted User] <[Deleted User]> #41
[Deleted User] <[Deleted User]> #42
sw...@redhat.com <sw...@redhat.com> #43
I use thread_key to send messages to the same thread in a given space. It would be very helpful to check the existing messages in that thread first.
ht...@allianceitsc.com <ht...@allianceitsc.com> #44
ja...@gmail.com <ja...@gmail.com> #45
What use case do you have that requires you to fetch all messages?
I just want to be able to make my own search app that isn't a horrible experience to use on threads that are longer than a page or two.
al...@gmail.com <al...@gmail.com> #46
With all messages, I can build a summary report, and ChatGPT acts as a secretary who replies to the message while I take a leave.
bm...@gmail.com <bm...@gmail.com> #47
am...@schrodinger.com <am...@schrodinger.com> #48
[Deleted User] <[Deleted User]> #49
GET /spaces/XXXXX/messages gets you the paginated message history. Here's the documentation for the endpoint
And here's a link to apply for the developer preview program:
Description
In order to fetch all conversation in the room, this API will be useful, At present Hangout chat provides API to get the message using message ID, and Message-ID is sent/obtained only when I create a message using Create message API, I didn't found any API to get Message list.
What is the purpose of this new feature?
To fetch conversation of Hangout chat.
What existing APIs would this affect?
No APIs will affect because of this.
What existing data does this use?
It will only use space Id.
Please provide any additional information below.
This API will really help to maintain logs and It will help to study how/when people need Bots.