wear-os

Android Wear OS Watch Face Support different screen sizes

十年热恋 提交于 2019-12-02 16:00:56
问题 I'm playing around Watch Faces for Wear OS Currently, I have created Background 320x320 Tick Circle 320x320 Hours, Minutes and Seconds Hands 320x40 Everything works fine on round devices with the screen size 320x320 Things are getting complicated when I am using devices with screen sizes 360x360. As you can see from the screenshot below the size of Tick Circle is not automatically adjusted. Question As I am new to developing Watch Faces and there is not much information about that on the

Android Wear OS Watch Face Support different screen sizes

最后都变了- 提交于 2019-12-02 12:53:55
I'm playing around Watch Faces for Wear OS Currently, I have created Background 320x320 Tick Circle 320x320 Hours, Minutes and Seconds Hands 320x40 Everything works fine on round devices with the screen size 320x320 Things are getting complicated when I am using devices with screen sizes 360x360. As you can see from the screenshot below the size of Tick Circle is not automatically adjusted. Question As I am new to developing Watch Faces and there is not much information about that on the Official Documentation Website, I want to understand how I should handle these cases? Should I create for

onDataChanged() not being called on android wear

痞子三分冷 提交于 2019-12-02 12:22:32
I'm trying to use Data Items to send a few strings through to my wear, but my wear never seems to receive any signal, because onDataChanged() is never called. I even set a time stamp to ensure the data is always different whenever it is sent. Is there a specific way I have to install the app onto both devices to get it to work? I'm just clicking run and selecting my phone, then switching modules and doing the same for my wear device. Here is the code from my main activity on my phone: public class HomeActivity extends Activity{ public static String TAG = "HomeActivity"; private GoogleApiClient

Android wear - how to capture touch events

 ̄綄美尐妖づ 提交于 2019-12-02 09:59:06
问题 I want to capture the touch events on Android wear (I am using Samsung Gear Live) to draw the trajectory of touch. I tried to capture onTouch event and onGenericMotionEvent event as the following code, but the event is triggered only one time or sometimes does not happen while I swiping on the screen. I need more touch events (at least 5 to 6 events when I swipe left to right) to draw the trajectory. How I can capture enough touch events on Android Wear screen? @Override protected void

W/GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 8107534

我是研究僧i 提交于 2019-12-02 05:12:57
As many other questions here on SO, I encounter a similar error message. Unlike other questions, this is regarding a hardware debugged device. My gradle wear-build file looks like this: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.support:wearable:1.2.0' compile 'com.google.android.gms:play-services-wearable:8.3.0' compile 'com.android.support:appcompat-v7:23.1.0' } Debuggin the app within the emulator works fine but as soon as I release the app and install it on my wearable, the connection between mobile and wear won't work. Debugging the wear

OnDataChanged is never called

天涯浪子 提交于 2019-12-02 04:32:15
问题 I am trying the dataitem APi and here is my code mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() { @Override public void onConnected(Bundle connectionHint) { Log.d("Inside", "onConnected: " + connectionHint); Toast.makeText(getApplicationContext(),"Inside On connected",Toast.LENGTH_SHORT).show(); // Now you can use the Data Layer API //Creating Dataitem PutDataMapRequest dataMapRequest = PutDataMapRequest.create("/count");

Always on without ambient mode? OR do not dim when enter ambient?

北慕城南 提交于 2019-12-02 03:55:16
For experiment/user study purpose, I need to keep my screen on for few minutes. I have follow the guide from http://developer.android.com/training/wearables/apps/always-on.html and it works partially for my purpose. The code allows my screen always on BUT it will enter ambient mode after few seconds. I DO NOT want ambient mode. My trick is I commented out onEnterAmbient(), onUpdateAmbient() and onExitAmbient(). So that my screen drawing is still the same color (not changing to black & white). HOWEVER the screen is DIMMED darker when entering ambient mode. I don't want the DIMMED effect, I need

Android Wear: Listen to incoming notifications

谁说我不能喝 提交于 2019-12-02 02:06:07
Is it possible to listen for incoming notifications in an Wearable Android App? I have tried to implement a NotificationListenerService , but the service's onNotificationPosted() is never called: public class MyListenerService extends NotificationListenerService { @Override public void onCreate() { super.onCreate(); Log.d("NotificationListener", "This works...."); } @Override public void onNotificationPosted(StatusBarNotification sbn) { Log.i("NotificationListener", "... but this method won't be called."); } } It's not possible to use a NotificationListenerService in Android Wear as there is

Crash loading WearableActivity

纵饮孤独 提交于 2019-12-02 01:21:46
问题 I am receiving a crash with the following message while migrating an AppCompatActivity to a WearableActivity. Caused by: java.lang.IllegalStateException: Could not find wearable shared library classes. Please add uses-library android:name="com.google.android.wearable" android:required="false" /> to the application manifest I was following this link for enabling ambient mode in my application: Keeping Your App Visible I have the following in my manifest and gradle respectively: <uses-library

GooglePlayServicesUtil: Google Play services out of date. Requires 5089000 but found 5077534

我的梦境 提交于 2019-12-01 23:30:57
问题 I have a problem with an update to the google-play-services SDK. My app builds and runs (as it did before) - but on the Android wear watch, this message is in the logs: GooglePlayServicesUtil﹕ Google Play services out of date. Requires 5089000 but found 5077534 So the app is compiling with 5.0.89 but the watch only has version 5.0.77. The communication between the watch and the phone now fails (it had worked previously). How would I make the app backwards compatible with earlier versions of