BuilderMessage (String text, float progress) { BuilderMessage.CacheDownloadMessage.Builder cacheDownloadMessageBuilder = BuilderMessage.CacheDownloadMessage.newBuilder(); cacheDownloadMessageBuilder.setDescriptionText(text); cacheDownloadMessageBuilder.setDone(progress); BuilderMessage.Builder newBuilder = BuilderMessage.newBuilder(); newBuilder.setType(BuilderMessage.Type.CACHE_DOWNLOAD_MESSAGE); newBuilder.setCacheDownloadMessage(cacheDownloadMessageBuilder.build()); return newBuilder.build(); }