简体   繁体   中英

Android send data to background service of another app

I have several related apps that need to upload data to a server. I have another app that acts as a launcher for the other apps via intents. I would like the launcher app to be responsible for uploading the data from the other apps so if the logic changes, only the launcher app has to change.

How can the child apps send a message to a background service of the launcher app to tell it to process the upload and how can the launcher send a notification back it has finished, whilst staying within the UI of the child app?

WorkManager looks good, but it doesn't seem like you can make a work request from another app.

自己找到解决方案,使用 绑定服务

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM