@Receiver(actions = AuditExportService.EXPORT_SUCCESS, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause) @UiThread(propagation = UiThread.Propagation.REUSE) void onExportAuditDone(@Receiver.Extra String path) { setLoading(false); exportFile = new File(path); switch (exportAction) { case ACTION_SHARE_DOCUMENT: { shareDocument(path); break; } case ACTION_SAVE_DOCUMENT: { saveDocument(path); break; } } }
@Receiver(actions = AuditExportService.EXPORT_SUCCESS, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause) @UiThread(propagation = UiThread.Propagation.REUSE) void onExportAuditDone(@Receiver.Extra String path) { setLoading(false); exportFile = new File(path); switch (exportAction) { case EXPORT_ACTION_SHARE: { // create an intent, so the user can choose which application he/she wants to use to share this file final Intent intent = ShareCompat.IntentBuilder.from(this) .setType(MimeTypeMap.getSingleton().getMimeTypeFromExtension(MimeTypeMap.getFileExtensionFromUrl(path))) .setStream(FileProvider.getUriForFile(this, "com.orange.ocara", exportFile)) .setChooserTitle("How do you want to share?") .createChooserIntent() .addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET) .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); startActivity(intent); break; } case EXPORT_ACTION_SAVE: { createNewDocument(path); break; } } }
@Receiver(actions = AuditExportService.EXPORT_FAILED, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause) @UiThread(propagation = UiThread.Propagation.REUSE) void onExportAuditDocxFailed() { setLoading(false); onExportAuditDocxFinished(); }
@Receiver(actions = StripControlService.RAINBOW_WIPE_COMPLETE, registerAt = Receiver.RegisterAt.OnResumeOnPause) void onRainbowWipeComplete() { boundService.initStrip(adapter.getColors()); Toast.makeText(getActivity(), "ready", Toast.LENGTH_LONG).show(); isReadyForInput = true; }
@Receiver(actions = {Broadcasts.ERROR_MESSAGE}, registerAt = Receiver.RegisterAt.OnResumeOnPause) public void showErrorDialog( @Receiver.Extra(Broadcasts.Extras.ERROR_HEADER) String header, @Receiver.Extra(Broadcasts.Extras.ERROR_REASON) String reason) { CreateDialogBroadcastReceiverHelper.showErrorDialog(getFragmentManager(), header, reason); }
@Receiver(actions = {Broadcasts.REST_CA_FAILURE}, registerAt = Receiver.RegisterAt.OnResumeOnPause) public void showCertificateDialog( @Receiver.Extra(Broadcasts.Extras.ERROR_ACCOUNT) MovirtAccount account, @Receiver.Extra(Broadcasts.Extras.ERROR_REASON) String reason, @Receiver.Extra(Broadcasts.Extras.ERROR_API_URL) String apiUrl) { CreateDialogBroadcastReceiverHelper.showCertificateDialog(getFragmentManager(), account, reason, apiUrl); }
@Receiver(actions = DatabaseHelper.ACTION_TABLES_CLEARED) protected void onTablesCleared() { if (articleFrame != null) { articleFrame.removeAllViews(); article = null; } }
@Receiver(actions = "onNotifButClick") protected void notifButClick() { stopSelf(); }
@Receiver(actions = HueConfigureActivity.IsConnectedAction, local = true, registerAt = Receiver .RegisterAt.OnCreateOnDestroy) void isConnectedReceiver() { buttonConfigureLights.setEnabled(hueController.isConnected()); }
@Receiver(actions = AuditExportService.EXPORT_FAILED, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause) @UiThread(propagation = UiThread.Propagation.REUSE) void exportAuditDocxFailed() { setLoading(false); }
@Receiver(actions = ACTION_PAUSE, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause) void pauseGameReceived() { showPausedMenu(); }
@Receiver(actions = ACTION_UNPAUSE, local = true, registerAt = Receiver.RegisterAt.OnStartOnStop) void unPauseGameReceived() { gameMenu.unMute(); dismissPausedMenu(); }
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true) void onActionQuitConfirm() { finish(); }
@Receiver(actions = ACTION_QUIT, local = true) void quitReceived() { presenter.updateResumeGameView(); }
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true) void quitConfirmReceived() { presenter.updateResumeGameView(); }
@Receiver(actions = ACTION_QUIT_CANCELLED, local = true) void quitCancelled() { presenter.updateResumeGameView(); }
@Receiver(actions = ACTION_PAUSE, local = true) void pauseReceived() { presenter.updateResumeGameView(); }
@Receiver(actions = ACTION_UNPAUSE, local = true) void unpauseReceived() { presenter.updateResumeGameView(); }
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true) void quitConfirmReceived() { stopForeground(true); stopSelf(); }
@Receiver(actions = StripControlService.ACTION_GATT_SERVICES_DISCOVERED, registerAt = Receiver.RegisterAt.OnResumeOnPause) void onGattServiceDiscovery() { Toast.makeText(getActivity(), "Warming up", Toast.LENGTH_LONG).show(); boundService.doRainbowWipe(); }
@Receiver(actions = BleService.ACTION_GATT_CONNECTED, registerAt = Receiver.RegisterAt.OnResumeOnPause) void onGattConnected() { boundService.discoverGattServices(); }
@Receiver(actions = BleService.ACTION_GATT_SERVICES_DISCOVERED, registerAt = Receiver.RegisterAt.OnResumeOnPause) void onServiceDiscovery() { adapter.setServices(boundService.getGattServiceList()); serviceList.setAdapter(adapter); getActivity().setProgressBarIndeterminateVisibility(false); }
@Receiver(actions = {TagSync.ACTION_SYNC_TAGS}, registerAt = Receiver.RegisterAt.OnResumeOnPause) protected void onTagsSynced(Intent intent) { sortAndUpdateTags(intent.<Tag>getParcelableArrayListExtra(TagSync.EXTRA_TAGS)); }
@Receiver(actions = {SourceSync.ACTION_SYNC_SOURCES}, registerAt = Receiver.RegisterAt.OnResumeOnPause) protected void onSourcesSynced(Intent intent) { sortAndUpdateSources(intent.<Source>getParcelableArrayListExtra(SourceSync.EXTRA_SOURCES)); }