本文整理汇总了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;
}
}
}
示例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;
}
}
}
示例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);
}
示例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);
}