android-wear-data-api

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

二次信任 提交于 2019-12-22 10:36:32
问题 Is it possible to show Google map view on Android Wear? I want to show a particular location to user on map. 回答1: 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

Unable to push data to android wear (Emulator)

百般思念 提交于 2019-12-17 22:41:02
问题 I have been trying to push data to the android wear emulator. But all in vain. My listener on the emulator is not receiving any calls whatsoever. If anyone else has tried working on wear and pushing data to wear please HELP. This is what my receiver code looks like private GoogleApiClient mGoogleApiClient; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_qrcode_generation); mGoogleApiClient = new

Send file Google Wear to mobile

青春壹個敷衍的年華 提交于 2019-12-12 15:49:14
问题 I'm trying to send a file from my Google wear to my Nexus 5. I've read some tutorials and came up with the following code but my phone isn't receiving a file. Mobile: private GoogleApiClient mGoogleApiClient; private int count = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .addConnectionCallbacks(this)

How do I draw icons on a watch face from an Android wear complication provider?

混江龙づ霸主 提交于 2019-12-12 12:34:08
问题 Using the Complications API there's an icon type, but when it comes to drawing the icon I'm not sure how to do it. When I'm drawing the actual watch face there doesn't seem to be a drawIcon method. E.g. something like canvas.drawIcon(icon). I can only see how to draw a bitmap. In my drawComplications method I have this: } else if (complicationData.getType() == ComplicationData.TYPE_ICON) { Icon icon = complicationData.getIcon(); How do I then draw the icon to the canvas? The code lab here

Wearable.NodeApi.getConnectedNodes result never called

元气小坏坏 提交于 2019-12-12 08:25:09
问题 i developing an app for android wear. Below code with explanation of the problem if(mGoogleApiClient.isConnected()){ K.i("Always called!"); Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).setResultCallback(new ResultCallback<NodeApi.GetConnectedNodesResult>() { @Override public void onResult(NodeApi.GetConnectedNodesResult nodes) { K.i("Never called :( "); for (Node node : nodes.getNodes()) { Wearable.MessageApi.sendMessage(mGoogleApiClient, node.getId(), message, null); } } }); } UPD: I

Cannot send an Asset to an Android Wear device

ぐ巨炮叔叔 提交于 2019-12-12 07:17:04
问题 I'm trying to send an Asset to my Sony SmartWatch3. I followed the Google's documentation (https://developer.android.com/training/wearables/data-layer/assets.html) but it doesn't work. My handheld activity's code : public class MainActivityHandheld extends ActionBarActivity { private GoogleApiClient mGoogleApiClient; private static final String MY_KEY = "com.example.andy.key.mykey"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

onDataChanged isn´t called on android wear

一曲冷凌霜 提交于 2019-12-12 06:01:45
问题 I want to send just simple Strings from Smartphone to android wear. I looked in this Question before: Unable to push data to android wear (Emulator) and tried to do the same way, but onDataChanged only when i delete the hole App on my Phone, but not when push StringstoWear is called. Hope for Help... Here is my Code on Phone: package de.gruppe8.culturehelper; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import

Is NodeApi specific to Android Wear?

浪子不回头ぞ 提交于 2019-12-12 03:19:15
问题 I want to detect the connected Android Wear device in my app. I found the solution here using NodeApi. But the documentation doesn't say anything about that is it specific to Android Wear or not: Exposes an API for to learn about local or connected Nodes. Node events are delivered to all applications on a device. What is a Node here? Is it any device that connected over bluetooth or specific Android Wear device connected over bluetooth? I want to detect if the device connected is Android Wear

Android Wear Google Play Services

假装没事ソ 提交于 2019-12-12 01:24:54
问题 I developing an android wear app. While synchonization the data I have to use Google Play Services in order to update information between devices (phone and wear). I have some problems: While synronization Google Play Services have to update to the lates version. The original version is 8.7. But after sycning they become 9.8 ! Not the latest: 10.0.1! WHY? The phone have got the latest (10.0.1). So, it is not possible to sync the data. Will this problem appear for published APK file? Will

Android Wearable API: how to pass a dynamic List?

风格不统一 提交于 2019-12-12 01:17:00
问题 This is how I'm using DataAPI PutDataMapRequest dataMapReq = PutDataMapRequest.create(PATH); dataMapReq.getDataMap().putFloatArray(KEY, list); PutDataRequest putDataReq = dataMapReq.asPutDataRequest(); Wearable.DataApi.putDataItem(mGoogleApiClient, putDataReq); list could be an array[] or ArrayList<> . If I add a new element then I'll have to put the list in the data map again. This will cause a retransmission of every previously inserted elements? 回答1: Yes, if you change an element in the