android-wear-notification

Is DataApi Reliable and Practically Real Time? Extremely Delayed [duplicate]

可紊 提交于 2019-12-24 17:03:35
问题 This question already has an answer here : WearListenerService onDataChanged strange behavior (1 answer) Closed 4 years ago . I have had an Android Wear app on the market for about 10 months now and it's stopped working (Not sure when it stopped working). I'm trying to update my wearable application with some statistics that I record in my mobile app. As I say, this used to work fine and reliably. I even added the timestamp to this so it was unique as the onDataChanged is only called if data

Android: Grouped notifications and summary still shown separately on 4.4 and below

被刻印的时光 ゝ 提交于 2019-12-18 11:17:18
问题 I want to implement stacked notifications on Android Wear To do that I create 1 summary notification and N individual notifications for each "item". I want only the summary to be shown on the phone. Here's my code: private void showNotifications() { NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); showNotification1(notificationManager); showNotification2(notificationManager); showGroupSummaryNotification(notificationManager); }

Custom UI for Android Wear Notifications

a 夏天 提交于 2019-12-17 21:17:48
问题 Hii I want to create Custom UI for android wear notification, and not AW app. Please suggest if there are any libraries or anything available for this. 回答1: It is not available yet, most likely it will be in the future. EDIT: Future is now. You can do this by passing own custom Activity by setDisplayIntent() , code sample: public Notification buildNotification(Context context) { Intent displayIntent = new Intent(context, AnimatedNotificationDisplayActivity.class); displayIntent.putExtra

Android Wear : Custom Notifications

戏子无情 提交于 2019-12-13 17:28:24
问题 In handheld devices, custom notifications can be displayed using RemoteViews . RemoteViews allows the developer to fully customise the notification. What is the way to do the same for Android Wear? Which class should be used to override the default notification UI with my own customised one? 回答1: if you want to customize text only, you can use SpannableString. It allows you to change color, background, align of your title/content text. if you want to create totally different notification you

Launching an activity on micro app (android wearable)

依然范特西╮ 提交于 2019-12-12 06:39:42
问题 I am creating notification from my app on Phone in the below way. private void launchMicroAppFromWearableNotif() { int notificationId = 001; // The below action has been defined in the micro app Intent i = new Intent("com.microapp.action.PLAY_MUSIC"); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent playPendingIntent = PendingIntent.getActivity(this, 0, i, 0); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.play_music)

Insistent notification on Android Wear

心不动则不痛 提交于 2019-12-12 06:00:07
问题 Notification.FLAG_INSISTENT works on my Android device. Notification vibrates and sounds repeatedly. However it only vibrates once on my Android Wear. I have followed the Android Developer guide to create an Android Wear notification, but no luck. https://developer.android.com/training/wearables/notifications/creating.html I want the effect of the stock Android Alarm Clock app's notification. Any hint before I dig into the source code of the app? 回答1: You need to add an Android Wear app to

NotificationListenerService Wearable

会有一股神秘感。 提交于 2019-12-11 23:44:09
问题 I am trying to implement a way to detect the notifications that are sent to the android wearable devices. After googling around, I have found it is not possible to use notificationListenerService on the wearable. In current implementation, I have implemented the notificationListenerService on the mobile handheld and am using the DataLayer to send the notifications over. My issue is: With the notificationListener, it detects everything that appears. Is there a reliable way to detect which

Android Wear setContentAction starts and soon stops Activity causing: Performing pause of activity that is not resumed

痴心易碎 提交于 2019-12-11 20:35:01
问题 I am doing Android Wear project. Notification is displayed to user with contentAction , so user can tap it. After taping it SomeActivity is displayed with DelayedConfirmationView giving user time to cancel upcoming API request. When DelayedConfirmationView finish API call is made. After API call succeeds ConfirmationActivity is shown. When ConfirmationActivity returns we finish() SomeActivity and cancel the notification. The problem I face is that after SomeActivity starts it is mysteriously

Can Android Wearable apps detect the power button as a KeyEvent?

爷,独闯天下 提交于 2019-12-09 03:42:59
问题 Can Android Wearable apps detect the power button as a KeyEvent or by other means? I would like to run a listener service to detect the wearable power button. I tried this but no log corresponding to a KeyEvent occurred. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { Log.e(">>>>>>", "FindPhoneActivity event "+event); if (keyCode == KeyEvent.KEYCODE_POWER) { // Do something here... Log.e(">>>>>>", "FindPhoneActivity onKeyDown"); //event.startTracking(); // Needed to track

Create a background service in android wear

早过忘川 提交于 2019-12-08 02:49:09
问题 I have been trying to create an alarm application for my watch for past few days. And unable to find any clue that how we can create a background service for android wear. Even I didn't find anything in the developer guide for android wear. But, I just want to create this application only for android wear and don't want to synchronize data from my cell phone. 回答1: Android Wear is based on the same architecture as regular Android phones. So if you want to create a background service, you do it