- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我很想知道 GooglePlay 服务中的 ActivityRecognition 是如何工作的?
最佳答案
我也在寻找这个答案,您的帖子是 Google 上的热门搜索结果之一。我做了更多的挖掘,发现了这个 https://developer.android.com/reference/com/google/android/gms/location/ActivityRecognitionApi.html其中说:
The activities are detected by periodically waking up the device and reading short bursts of sensor data. It only makes use of low power sensors in order to keep the power usage to a minimum. For example, it can detect if the user is currently on foot, in a car, on a bicycle or still.
它没有明确说明它使用了哪些传感器,但我们可以放心地假设加速度计是其中之一。因为它说传感器(复数),所以它显然使用了其他传感器。但是因为它说低功率你不必担心它使用 GPS 或类似的东西。但是,它确实表示它会唤醒设备,从而使其退出 super 省电模式。因此,即使它的功率很低,您仍然可能不希望它整天每 5 秒运行一次。进一步向下的文档说:
A common use case is that an application wants to monitor activities in the background and perform an action when a specific activity is detected. To do this without needing a service that is always on in the background consuming resources, detected activities are delivered via an intent. The application specifies a PendingIntent callback (typically an IntentService) which will be called when activities are detected. See the documentation of PendingIntent for more details.
关于android - ActivityRecognition 如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24994951/
我很想知道 GooglePlay 服务中的 ActivityRecognition 是如何工作的? 我认为加速度计数据可以识别 Activity 。对吗?请告诉我详细情况如何? 最佳答案 我也在寻找这
我已经将这段代码放在一起来获取用户 Activity ,看看他是走路还是开车还是静止不动,但它不起作用,onHandleIntent 从未调用过。它正在连接到 GoogleApiClient。 这是我
我希望使用 Google Play 服务 ActivityRecognition API作为 Android 应用程序的一部分,该应用程序的大部分使用都将处于离线状态;用户通常会出门在外,并且无法保证
根据我的研究,我意识到 Google 的 Activity Recognition API 允许您检测手机用户正在进行的 Activity (步行、驾驶等),但我想检测过渡中的变化。我想知道这种转
我有一个使用 ActivityRecognition 的 DetectedActivities 的广播接收器。我注意到它确实连接了,但我没有收到任何数据。这是在三星 Note 2 上。在我试过的其他手
我正在使用 ActivityRecognitionClient 类来获取用户 Activity 的数据,无论他是走路、运行还是骑自行车等...... 问题在于使用 PendingIntent,所以我可
有没有什么好的方法可以模拟DetectedActivity.IN_VEHICLE在 Android 模拟器中。目前,我正在尝试获取 ActivityRecognitionApi通过 telnet 发送
我正在为位置使用新的 API 并尝试 ActivityRecognition。我使用了 Google Developers Training 上的代码库在我想更新 UI 之前,一切都很顺利。 (我知道
我正在寻找实现这个的通用设计: 我想注册到 ActivityRecognition API 以接收此 API 不时调用的 IntentService 中的定期更新,而我的应用程序中的其他所有内容都完全
我是一名优秀的程序员,十分优秀!