Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

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

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().

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
138 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...