可以穿的android从移动设备访问内容提供商? [英] Can android wear access a content provider from the mobile device?

查看:147
本文介绍了可以穿的android从移动设备访问内容提供商?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于机器人磨损和移动是两个单独的设备,是磨损装置能够从自定义应用程序,对移动的,一旦它被连接访问公共内容提供商?谢谢你。

Since android wear and mobile are two separate devices, is the wear device able to access a public content provider from a custom app that's on the mobile once it is connected? Thanks.

编辑:如果你downvote,请发表评论,为什么,因为你的downvotes不帮我什么都不懂。

edit: if you downvote, pls comment why, as your downvotes don't help me understand anything.

EDIT2:好吧,让我来解释一下。我创建一个显示一些有用的数据随着时间而要做到这一点,我需要从我的手表表面访问内容提供商表盘。我可以通过我的Andr​​oid Wear访问从我的手机上的应用程序多数民众赞成在内容提供商?到目前为止,我的测试一直未果试图直接通过 getContentResolver访问内容提供商()

edit2: Ok, let me explain a little more. I'm creating a watch face that displays some useful data along with the time and to do that I need to access a content provider from my watch face. Can I access a content provider from an app thats on my phone through my android wear? So far my testing has been unsuccessful in trying to access a content provider directly through getContentResolver().

我可以用dataApi发送信息到磨损设备,但这需要应用程序也可以在手机上运行的权利?所以,问题仍然存在,我将如何从一个应用程序检索内容提供者的信息?

I could use dataApi to send info to the wear device, but that would require the app also be running on the phone right? So question still remains, How would I retrieve content provider information from an app?

推荐答案

在手表,你没有从同伴手机向供应商直接访问。可穿戴支持库提供了访问<一个href=\"https://developer.android.com/reference/android/support/wearable/provider/package-summary.html\"相对=nofollow>日历提供商,那就是我记得唯一一个可以直接手表;其他的,你需要去通过数据层API,并有电话组件来检索数据,并在整个手表送或同步了。

On the watch, you do not have direct access to the providers from the companion phone. The wearable support library provides access to the Calendar Provider and that is the only one that I can remember is available on the watch directly; for the rest, you need to go through the data layer APIs and have a phone component to retrieve the data and send it to or sync it across the watches.

这篇关于可以穿的android从移动设备访问内容提供商?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆