//App1
//Service1
//read gyro data, write it to application space(db or sharedpreferences)
//App1 Activity
//read data from application space and show it to the user
//App2
//Service2
//read gyro data, write it to application space(db or sharedpreferences)
//App2 Activity
//read data from application space and show it to the user
# 1 楼答案
你不能同时在两个应用程序中使用任何东西,因为Android操作系统会在应用程序失去焦点后阻止应用程序工作。但是,您可以使用2
services
来实现这一点,并且可以在需要时从应用程序中获取数据例如:
因此,您可以在同一时间为每个应用程序提供连续的数据流