Java 类org.androidannotations.annotations.Receiver 实例源码

项目:ocara    文件:ResultAuditActivity.java   
@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;
        }
    }
}
项目:ocara    文件:ListAuditActivity.java   
@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;
        }
    }
}
项目:ocara    文件:ResultAuditActivity.java   
@Receiver(actions = AuditExportService.EXPORT_FAILED, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause)
@UiThread(propagation = UiThread.Propagation.REUSE)
void onExportAuditDocxFailed() {
    setLoading(false);

    onExportAuditDocxFinished();
}
项目:BluetoothBacon    文件:LedStripFragment.java   
@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;
}
项目:moVirt    文件:BroadcastAwareAppCompatActivity.java   
@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);
}
项目:moVirt    文件:BroadcastAwareAppCompatActivity.java   
@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);
}
项目:selfoss-android    文件:MainActivity.java   
@Receiver(actions = DatabaseHelper.ACTION_TABLES_CLEARED)
protected void onTablesCleared() {
    if (articleFrame != null) {
        articleFrame.removeAllViews();
        article = null;
    }
}
项目:wtshanxun    文件:HeartService.java   
@Receiver(actions = "onNotifButClick")
protected void notifButClick() {
    stopSelf();
}
项目:ambilike    文件:HueConfigureActivity.java   
@Receiver(actions = HueConfigureActivity.IsConnectedAction, local = true, registerAt = Receiver
    .RegisterAt.OnCreateOnDestroy)
void isConnectedReceiver()
{
  buttonConfigureLights.setEnabled(hueController.isConnected());
}
项目:ocara    文件:ListAuditActivity.java   
@Receiver(actions = AuditExportService.EXPORT_FAILED, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause)
@UiThread(propagation = UiThread.Propagation.REUSE)
void exportAuditDocxFailed() {
    setLoading(false);
}
项目:settlers-remake    文件:MapFragment.java   
@Receiver(actions = ACTION_PAUSE, local = true, registerAt = Receiver.RegisterAt.OnResumeOnPause)
void pauseGameReceived() {
    showPausedMenu();
}
项目:settlers-remake    文件:MapFragment.java   
@Receiver(actions = ACTION_UNPAUSE, local = true, registerAt = Receiver.RegisterAt.OnStartOnStop)
void unPauseGameReceived() {
    gameMenu.unMute();
    dismissPausedMenu();
}
项目:settlers-remake    文件:GameActivity.java   
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true)
void onActionQuitConfirm() {
    finish();
}
项目:settlers-remake    文件:MainMenuFragment.java   
@Receiver(actions = ACTION_QUIT, local = true)
void quitReceived() {
    presenter.updateResumeGameView();
}
项目:settlers-remake    文件:MainMenuFragment.java   
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true)
void quitConfirmReceived() {
    presenter.updateResumeGameView();
}
项目:settlers-remake    文件:MainMenuFragment.java   
@Receiver(actions = ACTION_QUIT_CANCELLED, local = true)
void quitCancelled() {
    presenter.updateResumeGameView();
}
项目:settlers-remake    文件:MainMenuFragment.java   
@Receiver(actions = ACTION_PAUSE, local = true)
void pauseReceived() {
    presenter.updateResumeGameView();
}
项目:settlers-remake    文件:MainMenuFragment.java   
@Receiver(actions = ACTION_UNPAUSE, local = true)
void unpauseReceived() {
    presenter.updateResumeGameView();
}
项目:settlers-remake    文件:GameService.java   
@Receiver(actions = ACTION_QUIT_CONFIRM, local = true)
void quitConfirmReceived() {
    stopForeground(true);
    stopSelf();
}
项目:BluetoothBacon    文件:LedStripFragment.java   
@Receiver(actions = StripControlService.ACTION_GATT_SERVICES_DISCOVERED, registerAt = Receiver.RegisterAt.OnResumeOnPause)
void onGattServiceDiscovery() {
    Toast.makeText(getActivity(), "Warming up",
            Toast.LENGTH_LONG).show();
    boundService.doRainbowWipe();
}
项目:BluetoothBacon    文件:BleDeviceFragment.java   
@Receiver(actions = BleService.ACTION_GATT_CONNECTED, registerAt = Receiver.RegisterAt.OnResumeOnPause)
void onGattConnected() {
    boundService.discoverGattServices();
}
项目:BluetoothBacon    文件:BleDeviceFragment.java   
@Receiver(actions = BleService.ACTION_GATT_SERVICES_DISCOVERED, registerAt = Receiver.RegisterAt.OnResumeOnPause)
void onServiceDiscovery() {
    adapter.setServices(boundService.getGattServiceList());
    serviceList.setAdapter(adapter);
    getActivity().setProgressBarIndeterminateVisibility(false);
}
项目:selfoss-android    文件:MenuFragment.java   
@Receiver(actions = {TagSync.ACTION_SYNC_TAGS}, registerAt = Receiver.RegisterAt.OnResumeOnPause)
protected void onTagsSynced(Intent intent) {
    sortAndUpdateTags(intent.<Tag>getParcelableArrayListExtra(TagSync.EXTRA_TAGS));
}
项目:selfoss-android    文件:MenuFragment.java   
@Receiver(actions = {SourceSync.ACTION_SYNC_SOURCES}, registerAt = Receiver.RegisterAt.OnResumeOnPause)
protected void onSourcesSynced(Intent intent) {
    sortAndUpdateSources(intent.<Source>getParcelableArrayListExtra(SourceSync.EXTRA_SOURCES));
}