Show a toast-like message for the specified duration

@param message
@param duration in seconds
509243
public void showToast(final String message, float duration) {
        final float quadWidth = 1.2f;
        final GVRTextViewSceneObject toastSceneObject = new GVRTextViewSceneObject(this, quadWidth, quadWidth / 5,
                message);

        toastSceneObject.setTextSize(6);
        toastSceneObject.setTextColor(Color.WHITE);
        toastSceneObject.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.TOP);
        toastSceneObject.setBackgroundColor(Color.DKGRAY);
        toastSceneObject.setRefreshFrequency(GVRTextViewSceneObject.IntervalFrequency.REALTIME);

        final GVRTransform t = toastSceneObject.getTransform();
        t.setPositionZ(-1.5f);

        final GVRRenderData rd = toastSceneObject.getRenderData();
        final float finalOpacity = 0.7f;
        rd.getMaterial().setOpacity(0);
        rd.setRenderingOrder(2 * GVRRenderData.GVRRenderingOrder.OVERLAY);
        rd.setDepthTest(false);

        final GVRCameraRig rig = getMainScene().getMainCameraRig();
        rig.addChildObject(toastSceneObject);

        final GVRMaterialAnimation fadeOut = new GVRMaterialAnimation(rd.getMaterial(), duration / 4.0f) {
            @Override
            protected void animate(GVRHybridObject target, float ratio) {
                final GVRMaterial material = (GVRMaterial) target;
                material.setOpacity(finalOpacity - ratio * finalOpacity);
            }
        };
        fadeOut.setOnFinish(new GVROnFinish() {
            @Override
            public void finished(GVRAnimation animation) {
                rig.removeChildObject(toastSceneObject);
            }
        });

        final GVRMaterialAnimation fadeIn = new GVRMaterialAnimation(rd.getMaterial(), 3.0f * duration / 4.0f) {
            @Override
            protected void animate(GVRHybridObject target, float ratio) {
                final GVRMaterial material = (GVRMaterial) target;
                material.setOpacity(ratio * finalOpacity);
            }
        };
        fadeIn.setOnFinish(new GVROnFinish() {
            @Override
            public void finished(GVRAnimation animation) {
                getAnimationEngine().start(fadeOut);
            }
        });

        getAnimationEngine().start(fadeIn);
    }
1242117
public void handleMessage(Message<?> message) {
        if (logger.isDebugEnabled()) {
            logger.debug("received Integration Message: " + message);
        }
        AsyncMessage flexMessage = new AsyncMessage();
        flexMessage.setBody(message.getPayload());
        MessageHeaders headers = message.getHeaders();
        flexMessage.setMessageId(headers.containsKey(FlexHeaders.MESSAGE_ID) ? headers.get(FlexHeaders.MESSAGE_ID, String.class) : headers.getId().toString());
        Long timestamp = headers.containsKey(FlexHeaders.TIMESTAMP) ? Long.parseLong(headers.get(FlexHeaders.TIMESTAMP, String.class)) : headers.getTimestamp();
        flexMessage.setTimestamp(timestamp);
        Long expirationDate = headers.getExpirationDate();
        if (expirationDate != null) {
            flexMessage.setTimeToLive(expirationDate - timestamp);
        }
        if (headers.containsKey(FlexHeaders.MESSAGE_CLIENT_ID)) {
        	flexMessage.setClientId(headers.get(FlexHeaders.MESSAGE_CLIENT_ID));
        }
        for (Map.Entry<String, Object> header : headers.entrySet()) {
            String key = header.getKey();
            if (!filteredHeaders.contains(key)) {
                flexMessage.setHeader(key, header.getValue());
            }
        }
        flexMessage.setDestination(this.getDestination().getId());
        MessageService messageService = (MessageService) getDestination().getService();
        if (filterSender && headers.containsKey(FlexHeaders.FLEX_CLIENT_ID)) {
        	Set<Object> subscribers = new HashSet<Object>(this.subscriberIds);
        	FlexClient flexClient = messageService.getMessageBroker().getFlexClientManager().getFlexClient(headers.get(FlexHeaders.FLEX_CLIENT_ID).toString());
        	for (Object subscriberId : this.subscriberIds) {
        		if (flexClient.getMessageClient(subscriberId.toString()) != null) {
        			subscribers.remove(subscriberId);
        		}
        	}
        	messageService.pushMessageToClients(subscribers, flexMessage, true);
        } else {
        	messageService.pushMessageToClients(flexMessage, true);
        }
        messageService.sendPushMessageFromPeer(flexMessage, true);
    }
54469
public final void setMinimumDuration(Duration duration) {
        Objects.requireNonNull(duration);
        if (minimumDuration != null) {
            minimumDuration.set(duration);
        } else {
            _minimumDuration = duration;
        }
    }
448377
@SuppressLint("ShowToast")
  public Toast build() {
    Toast toast = Toast.makeText(context, message, duration);

    TextView toastMessage = setupToastView(toast);
    setToastMessageTextColor(toastMessage);
    setToastGravity(toast);

    return toast;
  }
180931
public void didSendMessage(final String message, final Date timestamp) {
        new Handler(Looper.getMainLooper()).post(new Runnable() {
            @Override
            public void run() {
                if (null != listenerReference) {
                    Listener listener = listenerReference.get();
                    if (null != listener) {
                        listener.onMessage(message, timestamp, RespokeEndpoint.this, true);
                    }
                }
            }
        });
    }
657322
function(message) {
            $log
              .append( settings.templates.message(message) )
            ;
            module.message.scroll.test();
            $.proxy(settings.onMessage, $log.children().last() )();
          }
141960
def showMessage(self,
                    title,
                    message,
                    icon=QtGui.QSystemTrayIcon.Information,
                    timeout=10000):
        
        tray = self.trayIcon()
        if tray:
            tray.showMessage(title, message, icon, timeout)
11004
public static void showOnUiThread(Context applicationContext, String message, int duration) {
        Handler handler = HandlerUtils.getMainHandler();
        showOnUiThread(applicationContext, message, duration, handler);
    }
34964
public final synchronized void onHttpCallback(final byte[] message) {
    final long endTime = System.currentTimeMillis() + WAIT_TIMEOUT;
    while (cmdOutput != null) {
      final long waitTime = endTime - System.currentTimeMillis();
      if (waitTime <= 0) {
        break;
      }

      try {
        wait(WAIT_TIME);
      } catch (final InterruptedException e) {
        LOG.log(Level.WARNING, "HttpServeShellCmdHandler onHttpCallback InterruptedException: {0}", e);
      }
    }
    LOG.log(Level.INFO, "HttpServeShellCmdHandler OnCallback: {0}", HttpShellJobDriver.CODEC.decode(message));
    cmdOutput = HttpShellJobDriver.CODEC.decode(message);

    notify();
  }
203097
public void setDuration(final LocalTime DURATION) {
        if (null == duration) {
            _duration = DURATION;
            fireTileEvent(REDRAW_EVENT);
        } else {
            duration.set(DURATION);
        }
    }
1307119
private boolean okayToSendMessage(IRTMPEvent message) {
        if (message instanceof IStreamData) {
            final long now = System.currentTimeMillis();
            // check client buffer size
            if (isClientBufferFull(now)) {
                return false;
            }
            // get pending message count
            long pending = pendingMessages();
            if (bufferCheckInterval > 0 && now >= nextCheckBufferUnderrun) {
                if (pending > underrunTrigger) {
                    // client is playing behind speed, notify him
                    sendInsufficientBandwidthStatus(currentItem.get());
                }
                nextCheckBufferUnderrun = now + bufferCheckInterval;
            }
            // check for under run
            if (pending > underrunTrigger) {
                // too many messages already queued on the connection
                return false;
            }
            return true;
        } else {
            String itemName = "Undefined";
            // if current item exists get the name to help debug this issue
            if (currentItem.get() != null) {
                itemName = currentItem.get().getName();
            }
            Object[] errorItems = new Object[] { message.getClass(), message.getDataType(), itemName };
            throw new RuntimeException(String.format("Expected IStreamData but got %s (type %s) for %s", errorItems));
        }
    }
1118655
public void toast(final CharSequence message) {
        if (act == null)
            return;

        act.runOnUiThread(new Runnable() {
            public void run() {
                Toast.makeText(act, message, Toast.LENGTH_SHORT).show();
            }
        });
    }
28993
private void toast(@StringRes int message) {
        if (mCrouton != null) {
            mCrouton.cancel();
            mCrouton = null;
        }
        mCroutonView = new CroutonView(this, getString(message));

        mCrouton = Crouton.make(this, mCroutonView, R.id.activity_artist_main_container);
        mCrouton.show();
    }
222213
public void onMessage(Message msg) {
	        try {
                    LOG.debug("Queuing msg [" + msg.getJMSMessageID() + "]");
                } catch (JMSException e) {
                }
		this.queue.offer(msg);
	}
233754
public static void message(String message) {
           getMessageCenter().notify(new Message(message, Message.Severity.Info));
       }
306211
public static synchronized void log(RTMessage message)
	{
		if (enabled)
		{
			eventCount++;

			for (IRTLogger logger : loggers)
			{
				logger.log(message);
			}
		}
	}
493411
public void show (final Toast toast, float timeSec) {
		Table toastMainTable = toast.getMainTable();
		if (toastMainTable.getStage() != null) {
			remove(toast);
		}
		toasts.add(toast);

		toast.setToastManager(this);
		toast.fadeIn();
		toastMainTable.pack();
		root.addActor(toastMainTable);

		updateToastsPositions();

		if (timeSec > 0) {
			Timer.Task fadeOutTask = new Timer.Task() {
				@Override
				public void run () {
					toast.fadeOut();
					timersTasks.remove(toast);
				}
			};
			timersTasks.put(toast, fadeOutTask);
			Timer.schedule(fadeOutTask, timeSec);
		}
	}