wear-os

Android wear activity onKeyDown is not getting called

旧城冷巷雨未停 提交于 2019-12-23 03:20:30
问题 This is not a duplicate but a specific case to Android wear. I am trying to make Android wear app do something when certain gestures are performed. But I realized that the onKeyDown() event is not called at all. Any help or info I this regard is useful. Here is my simple code snippet. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_gesture_ema); Log.d(TAG, "Inside on create"); //Show prompt window on top

Android Wear Preview app - which smartphones are compatible?

这一生的挚爱 提交于 2019-12-23 02:34:25
问题 I got invitation to the Android Wear Developer program but when I try to install the Android Wear Preview app I see information that my device (Samsung Galaxy S2) is not compatible with the app. Is there some kind of list of devices compatible with Android Wear Preview app? Thank you, 回答1: I don't think there is a device spesific restriction, but according to developer.android.com Note: The Android Wear Preview app is compatible with Android 4.3 and higher and is not available for the Android

Using Sony Camera API on AndroidWear

℡╲_俬逩灬. 提交于 2019-12-23 02:26:21
问题 I want to create an app that can start and stop recording from a Sony AS100VR camera using camera remote API. I can get the same working from my nexus using a direct Wifi connection, but when I establish a direct wifi connection from my Sony smartwatch, it fails at the SSDP detection stage. It's definitely connected to the camera, SSID over Wifi, but it can't detect it. I have tried playing with retries and timeout values, but I have sort of run out of ideas. it's falling into the catch catch

Create a time picker screen similar to the one Alarm app in Android wear

女生的网名这么多〃 提交于 2019-12-23 01:35:28
问题 I am developing a wearable app where I need to create a Time picker for my app. The time picker that is used for mobiles wont fit for wearable. I need to create a picker similar to the one I see in Alarm app in Android watch. Can anyone help me how to implement that type of time picker screen in my app. Thanks in Advance. 回答1: TimePicker uses by default clock mode, so by setting it manually to spinner , you'll get view that is more suitable for Wear devices. Do it by setting timePickerMode to

android wear gridviewpager onClick Listener

北慕城南 提交于 2019-12-22 14:52:05
问题 I'm developing a simple application in which youb have different spots placed on google map. When I click on a spot I get its details which are displayed in a GridViewPager . For now my application is based on the GridViewPager sample available with the sdk. Here is my layout for the spot details (nothing fancy) <android.support.wearable.view.GridViewPager xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pager" android:layout_width="match_parent" android:layout

Center Text on Watch

时间秒杀一切 提交于 2019-12-22 12:23:09
问题 I've been trying multiple ways to center 3 lines of text on a watch and can't seem to figure it out. The new watch face services require you to paint to a canvas. I initialize the text offset by grabbing the length of text of each line and dividing by 2. mXDateOffset = mTextDateColorPaint.measureText("May 21, 2015") /2; mXTimeOffset = mTextTimeColorPaint.measureText("12:00:00")/2; mXBatteryOffset = mTextBatteryColorPaint.measureText("99%") /2 ; Then when I set the text and paint elements to

Share objects from phone to android wear

本秂侑毒 提交于 2019-12-22 11:13:19
问题 I created an app. Within this app, you have objects which contains 2 strings (name and age) and a bitmap (avatar). Everything is saved to a sqlite database. Now I want these objects to be accessible on my smart watch. So I want to achieve that you can go to start, start the application and scroll to the left and right to see these objects. This means I have to retrieve the objects from the phone and get them at the watch. I am currently wondering if I did everything right, or that I should do

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

Bitmap scale destroy quality

坚强是说给别人听的谎言 提交于 2019-12-22 08:45:53
问题 I have made a Watch Face for Android Wear. But the problem is image scaling. Images for background, markers and gadgets are of reduced quality when I resize them. For example, I put 480x480 background image in drawable-nodpi folder (I have tried other dpi as well), and I rescale it like this: BitmapFactory.Options options = new BitmapFactory.Options(); options.inScaled = true; Bitmap bgImage = BitmapFactory.decodeResource(context.getResources(), R.drawable.ticks_1, options); bgImage = Bitmap

Android Wear + Wearable ChannelApi openChannel not opening with remote node?

孤人 提交于 2019-12-22 08:11:34
问题 When opening a channel via a local node : Wearable.NodeApi.getLocalNode(googleApiClient) ... the onChannelOpened Listener successfully fires. However, when opening a channel via a remote node : Wearable.NodeApi.getConnectedNodes(googleApiClient) ... the onChannelOpened Listener never fires and subsequently can never share files over this channel. I know openChannel is required for both devices, but the channel listeners are only firing on the device that opened it locally... How does the