title: Retrieve text from a RemoteViews Object
body: <p>I need to retrieve some text from a <code>RemoteViews</code> object. It is possible for me to get the LayoutId, but I have no idea how to retrieve text from a <code>TextView</code> that is in this <code>RemoteView</code> (namely a notification).</p>
  
  <p>Also the <code>RemoteView</code> only contains setters, but no getters, so I guess I have to use the LayoutId (somehow).</p>
  
  <p>Can you help me with that? Thanks!</p>
  
  <p><strong>/edit:</strong> The reason why I am asking this, is because I have an <code>AccessibilityService</code> that retrieves the notification. Therefore this is the only way of retrieving the value.</p>
  
  <p><strong>/edit2:</strong> I use this code for receiving the notification:</p>
  
  <pre><code>@Override
  public void onAccessibilityEvent(AccessibilityEvent event) {
      if (event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) {
          List&lt;CharSequence&gt; notificationList = event.getText();
          for (int i = 0; i &lt; notificationList.size(); i++) {
              Toast.makeText(this.getApplicationContext(), notificationList.get(i), 1).show();
          }
          if (!(parcel instanceof Notification)) {
              return;
          }
          final Notification notification = (Notification) parcel;
          doMoreStuff();
  
      }
  }
  </code></pre>
  
  <p>With the <code>notification</code> object I have access to a <code>RemoteViews</code> (<code>notification.contentView</code>) and to a <code>PendingIntent</code> (<code>notification.contentIntent</code>).
  To get the layoutId, I can call <code>contentView.getLayoutId()</code></p>