wear-os

Share objects from phone to android wear

為{幸葍}努か 提交于 2019-12-05 21:45:01
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 stuff differently. Whenever you start the application on your watch, I am sending a request to the

Failure [INSTALL_FAILED_OLDER_SDK] when installing Android Wear sample app

99封情书 提交于 2019-12-05 21:19:26
I followed the instructions at this link to create a simple mobile/wearable app in Android Studio. However, upon trying to run it I am getting the error "Failure [INSTALL_FAILED_OLDER_SDK]". My problem seems to be like the one asked at this link , however unlike that user the reddit post that is linked to didn't contain any information that helped me (it basically suggested to add < uses-sdk tools:node="replace" /> to the android manifest, but android studio didn't like the tools thing." My build.gradle files are exactly the same as those at the above link. I just updated Android Studio today

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

Getting data from calendar on Android Wear

六眼飞鱼酱① 提交于 2019-12-05 20:06:00
I'm querying the calendar data like this: // Constructor of the class mCursor = context.getContentResolver().query(CalendarContract.Events.CONTENT_URI, mColumns, null, null, null); updateEvents(); //contents of updateEvents: events.clear(); mCursor.moveToFirst(); mLastUpdate = System.currentTimeMillis(); while (!mCursor.isAfterLast()) { long end = mCursor.getLong(2); if (end > mLastUpdate) events.add(new Event(mCursor)); mCursor.moveToNext(); } The code manages works on mobile device, however when it's run on a Wear device there appears to be no data. I've found a WaerableCalendarContract ,

Bitmap scale destroy quality

∥☆過路亽.° 提交于 2019-12-05 14:47:19
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.createScaledBitmap(bgImage , width, height, false); Here are the images: and this is what I get on the

Android Wear 5.1 wrist gesture API?

守給你的承諾、 提交于 2019-12-05 14:30:58
Android 5.1.1 for wearables introduced the ability to dimiss notifications by rotating/flicking your wrist. Is this API exposed for developers to use? I'm unable to find any information on this, and their wearables developer site does not seem to have been updated. It seems a bit late but this looks like what you exactly wanted. Although pushing, raising, shaking gesture is not available, flicking wrist out and in gesture is available. Each wrist gesture is mapped to an int constant from the KeyEvent class, as shown in the following table: Flick wrist out: KEYCODE_NAVIGATE_NEXT, This key code

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

Can't create “Single-action control” notification android wear

感情迁移 提交于 2019-12-05 13:33:59
The Android Wear UI patterns show the ability to make this notification on Android Wear, however I am not able to find how this is accomplished. I assumed just having one pending intent action. I.E.: .extend(new NotificationCompat.WearableExtender().addAction(action)); Would achieve this, however I am not able to get this view. Any one know if there is a special flag I need to set for this? Thanks! WearableExtender.setContentAction states: Set an action from this notification's actions to be clickable with the content of this notification. This action will no longer display separately from the

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

微笑、不失礼 提交于 2019-12-05 13:11:10
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 remote device send or receive files as well if it doesn't know it's connected? Here's breakdown between the

Unable to execute initial Android Wear Hello World App in eclipse

做~自己de王妃 提交于 2019-12-05 10:50:52
After intial Eclipse Luna setup when I try to run the intial Hello World app in the Android Wear emulator, its getting stopped showing "You cannot combine swipe dismissal and the action bar" error in logcat.Please help me to solve this issue. I had the same problem yesterday. I solved it by running the application in full screen mode, I do not think this is the best solution, but it worked, although this does not have the action bar. In you onCreate method add this before the setContentView. requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG