android-wear-data-api

Is it possible to show Google map view on Android Wear?

ⅰ亾dé卋堺 提交于 2019-12-05 21:15:19
Is it possible to show Google map view on Android Wear? I want to show a particular location to user on map. You may manage to embed a MapView in your activity, but it won't work as Android Wear does not have direct access to the network. However, what you can do is using the Static Maps API . Your Wear app should send a Message to your phone application Your phone application downloads a bitmap of the map you want thanks to the static maps api Your phone app sends back the image to the wear app You show the bitmap in the wear application with an ImageView The maps static API is quite powerful

Permissions for a WearableListenerService

為{幸葍}努か 提交于 2019-12-05 14:00:18
I've implemented a WearableListenerService in both my main app and the companion Wear app. In the manifests, the service needs to be declared as android:exported="true" (or not declared at all and left to default to true ) since it's started by Google Play Services. An exported service with no permissions can be called by any app on the system, but I can't find the correct permission to add to the service declaration to secure it. I've looked through the permissions on both the phone and the Wear device with pm list permissions but I don't see anything that looks like what I need. Is there a

Android Wear: Google Play services out of date. Requires 9256000 but found 8701534

♀尐吖头ヾ 提交于 2019-12-05 05:08:13
问题 I can't get my Android Wear app to work. Every time it tries to open something on the phone I keep getting this error in the logcat: W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 8701534 Nothing should be wrong with my application, because it worked before. It stopped working when I did a factory reset on my LG G Watch. I checked the Google Play version codes on the watch with an app, and it is (as the logcat tells) 8701534 . (Why isn't it updating?)

What is the Uri for Wearable.DataApi.getDataItem() after using PutDataMapRequest?

风格不统一 提交于 2019-12-03 15:55:25
问题 I'm testing the Wearable Data Layer Api as described in the Android tutorial. There is a low level API based around DataItem, which can have only a byte array as payload, so the training recommends using PutDataMapRequest, which seems to be basically equivalent to a Bundle (i.e. a serializable map) when using Intents. You basically create an instance of this class, then fill the values, and send it. private final static String DATA_PATH = "/testdata"; PutDataMapRequest dataMap =

Send message from wearable to phone and then immediately reply

会有一股神秘感。 提交于 2019-12-03 12:17:26
问题 I've been battling with the Android Wear Message API all day today and have finally accepted I need some help with this. My app is very straightforward. The Mobile portion consists of a MainActivity (which does nothing but display "Hello world" and a Service which extends WearableListenerService . The Wear portion is just a MainActivity with a single Button, and implements MessageApi.MessageListener . The idea is simple: press the Button on the Wear device which sends a message to the Mobile.

What is the Uri for Wearable.DataApi.getDataItem() after using PutDataMapRequest?

大憨熊 提交于 2019-12-03 06:10:15
I'm testing the Wearable Data Layer Api as described in the Android tutorial . There is a low level API based around DataItem , which can have only a byte array as payload, so the training recommends using PutDataMapRequest , which seems to be basically equivalent to a Bundle (i.e. a serializable map) when using Intents. You basically create an instance of this class, then fill the values, and send it. private final static String DATA_PATH = "/testdata"; PutDataMapRequest dataMap = PutDataMapRequest.create(DATA_PATH); dataMap.getDataMap().putInt(...); PutDataRequest request = dataMap

Can I send custom objects to Android Wear?

…衆ロ難τιáo~ 提交于 2019-12-03 00:53:14
I am just learning how to develop for Android Wear, I have created a full screen Activity for Smart Watches and in my mobile part of the application I get some JSON data and create a list of custom objects from this. On my mobile app I show the information for these objects in a ListView. On the Wear piece of my application I want to show a limited version of this list, for example the top 3 from the list will be show on my full screen app on the Wearable. My problem is that there doesn't seem to be a way to send Parcelable Objects to Android Wear, there is no option to putParcelable in the

Trying to send data from Android Tablet to Android Wear device and losing

冷暖自知 提交于 2019-12-01 14:03:20
I could really use some help. I'm having trouble getting my Android Wear device to recognize data changes made by my activity that runs on my Android tablet. I'm relatively new to Android and very new to the Wear APIs so I might be missing something completely obvious or trivial without realizing. I've pieced together a project from a couple of examples from the Android Wear doc pages and from the TwoToasters example on github. I just want to get data communication set up between the devices so that I can then edit the code in order to display images from my tablet on my Wear device.

Trying to send data from Android Tablet to Android Wear device and losing

血红的双手。 提交于 2019-12-01 10:59:48
问题 I could really use some help. I'm having trouble getting my Android Wear device to recognize data changes made by my activity that runs on my Android tablet. I'm relatively new to Android and very new to the Wear APIs so I might be missing something completely obvious or trivial without realizing. I've pieced together a project from a couple of examples from the Android Wear doc pages and from the TwoToasters example on github. I just want to get data communication set up between the devices

Sending data to android wear device

断了今生、忘了曾经 提交于 2019-11-30 21:18:34
I'm trying to send a String array from my phone to my wear, I've created a service on my phone that is supposed to send the data with this code : public class SendDataService extends Service { private static final String TAG = "SendDataService"; @Override public void onCreate(){ GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() { @Override public void onConnected(Bundle connectionHint) { Log.d(TAG, "onConnected: " + connectionHint); // Now you can use the data layer API } @Override public void