不同文本磨损设备和所述移动设备 [英] Different text for the wear device and the mobile device

查看:114
本文介绍了不同文本磨损设备和所述移动设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能有一个通知,展示了Android的磨损设备和移动设备?

Is it possible to have a notification that shows a different text (content title and content text) in the Android wear device and in the mobile device?

推荐答案

目前不。但是,可以实现这样的效果,在以下方式:

Not at the moment. However, you can achieve this effect in the following way:

  1. 后在手机上的通知与 setLocalOnly(真)
  2. 发表的DataItem 使用 DataAPI 描述的通知和更改的文本
  3. 当耐磨收到的DataItem ,后用不同的文字通知,再次设置 setLocalOnly(真)
  4. 在每个通知ALSE调用 setDeleteIntent 让你知道,当有解散
  5. 当上了通知被辞退,从点2 delte的的DataItem
  6. 的DataItem 被删除,您将收到一个回调;删除剩余的通知
  1. post a notification on the phone with setLocalOnly(true)
  2. post a DataItem using a DataAPI that describes the notification and changed text
  3. when the wearable receives the DataItem, post the notification with different text, again setting setLocalOnly(true)
  4. on each notification alse call setDeleteIntent so you know, when there are dismissed
  5. when on of the notifications gets dismissed, delte the DataItem from point 2.
  6. when the DataItem gets deleted, you will receive a callback; delete the remaining notification

可能有一些角落情况下,在这里,我没有立即看到,但一般的做法应该让你实现你想要的。

There might be some corner cases here I don't see immediately, but the general approach should allow you to achieve what you want.

这篇关于不同文本磨损设备和所述移动设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆