wear-os

Passing different Extras to different setDisplayIntent, but same is received

て烟熏妆下的殇ゞ 提交于 2019-12-13 00:52:40
问题 I am in a case where my Watch application has updated data and will display these data in multiple pages. According to this answer: https://stackoverflow.com/a/30133449/327402 , I created a displayIntent for each one of my page. List extras = new ArrayList(); //This is a loop to create every individual Notification for (Route aRoute : myRoutes) { Intent viewIntent = new Intent(getApplicationContext(), MainActivity.class); String toSend = aRoute.detail; Log.d("CVE",toSend); viewIntent.putExtra

Using google speech recognition on android wear without showing specific ui

怎甘沉沦 提交于 2019-12-12 17:05:29
问题 This is my first question here on stackoverflow, so sorry if i am doing something wrong. I have an app on android wear, where the user shall select an item from a list. I want to enable the user to select the item via voice commands. I managed to do it as suggested in the google documentation, but i have to implement a button to start speech recognition, and it will show up as a fullscreen activity. I want the user to be able to see the list while speech recognition is active. Is there any

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

Android OpenGLRenderer “Dirty” error

白昼怎懂夜的黑 提交于 2019-12-12 11:10:09
问题 While programming an Android wear application I ran into the following log message(Well, 15 of them in a row): ... W/OpenGLRenderer: Dirty 145.00 306.00 175.00 320.00 doesn't intersect with 0 0 320 290 ? (The question mark is part of the log message) I am not explicitly using OpenGl in my application, this error is generated when a fragment with an animated custom view is swiped to in a GridViewPager. Whether or not this appears depends on the device, this does not occur on an Android

Is it possible to get GPS location from Android Wear SDK?

北城余情 提交于 2019-12-12 10:12:53
问题 I have connected my Samsung GEAR Live to my Android device through bluetooth . I have active internet connection & GPS enabled on my Android device. Now, I am trying to get the GPS location from Wearable App . LocationManager locationManager = (LocationManager) getSystemService(Activity.LOCATION_SERVICE); // getting GPS status boolean isGPSEnabled = locationManager .isProviderEnabled(LocationManager.GPS_PROVIDER); // getting network status boolean isNetworkEnabled = locationManager

Pair Wear Emulator with Android Emulator

回眸只為那壹抹淺笑 提交于 2019-12-12 08:27:49
问题 I'm sure this is a simple question, but I seem to be spinning my wheels here. I want to connect and android wear device (emulated) with and android device (also emulated). I've tried port forwarding but that doesn't seem to do the trick for me. Does anyone have any good documentation for this? 回答1: Genymotion + Wear Emulator Download and install genymotion image 4.3+; Download Gapps for the selected version of the image; Install gapps in genymotion and configure; Download and install Android

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

Heart rate sensor API for Android

时间秒杀一切 提交于 2019-12-12 08:08:10
问题 Google has published apis with respect to wearable devices. Since many smart watch manufactures state they have a heart rate sensor, I'm wondering if android published apis for it. I checked the web and didn't find anything. Anyone who's interested in wearable developing that happens to know about it? Thanks. 回答1: (As of now) those APIs belong to each smartwatch maker not Google. Please check my project here: http://blog.kii.com/?p=3942 and specifically this file: https://github.com

Showing Android Wear style AlertDialog

寵の児 提交于 2019-12-12 07:46:53
问题 I'm looking for a way to recreate the alert dialog in the Setting application of Android Wear: Which is swipe to dismissable. But instead, what I got is this: Just a barebone Android dialog. How can I show the AlertDialog in the Settings.apk style? (Which I think must be default for Android Wear application) 回答1: I found no default way to do this, also setting a custom view to an AlertDialog did not look good. You can still try though, maybe a different Theme works. What I did was create a