Example usage for android.os Handler dispatchMessage

List of usage examples for android.os Handler dispatchMessage

Introduction

In this page you can find the example usage for android.os Handler dispatchMessage.

Prototype

public void dispatchMessage(Message msg) 

Source Link

Document

Handle system messages here.

Usage

From source file:org.kde.kdeconnect.Plugins.MprisPlugin.MprisPlugin.java

public void setPlayerListUpdatedHandler(String id, Handler h) {
    playerListUpdated.put(id, h);//from   www .  j  a  v a2  s.  c o  m

    h.dispatchMessage(new Message());

    //Get the status if this is the first handler we have
    if (playerListUpdated.size() == 1) {
        requestPlayerList();
    }
}

From source file:org.kde.kdeconnect.Plugins.MprisPlugin.MprisPlugin.java

public void setPlayerStatusUpdatedHandler(String id, Handler h) {
    playerStatusUpdated.put(id, h);/*from   w ww .  j a  v a  2 s  .  co m*/

    h.dispatchMessage(new Message());

    //Get the status if this is the first handler we have
    if (playerListUpdated.size() == 1) {
        requestPlayerStatus();
    }
}