当前位置: 首页>>代码示例>>Java>>正文


Java Receiver.Extra方法代码示例

本文整理汇总了Java中org.androidannotations.annotations.Receiver.Extra方法的典型用法代码示例。如果您正苦于以下问题:Java Receiver.Extra方法的具体用法?Java Receiver.Extra怎么用?Java Receiver.Extra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.androidannotations.annotations.Receiver的用法示例。


在下文中一共展示了Receiver.Extra方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onExportAuditDone

import org.androidannotations.annotations.Receiver; //导入方法依赖的package包/类
@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;
        }
    }
}
 
开发者ID:Orange-OpenSource,项目名称:ocara,代码行数:20,代码来源:ResultAuditActivity.java

示例2: onExportAuditDone

import org.androidannotations.annotations.Receiver; //导入方法依赖的package包/类
@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;
        }
    }
}
 
开发者ID:Orange-OpenSource,项目名称:ocara,代码行数:30,代码来源:ListAuditActivity.java

示例3: showErrorDialog

import org.androidannotations.annotations.Receiver; //导入方法依赖的package包/类
@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);
}
 
开发者ID:oVirt,项目名称:moVirt,代码行数:8,代码来源:BroadcastAwareAppCompatActivity.java

示例4: showCertificateDialog

import org.androidannotations.annotations.Receiver; //导入方法依赖的package包/类
@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);
}
 
开发者ID:oVirt,项目名称:moVirt,代码行数:9,代码来源:BroadcastAwareAppCompatActivity.java


注:本文中的org.androidannotations.annotations.Receiver.Extra方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。