java - 如何使用 Intent.ACTION_PICK 带响应,但不带 Activity?

标签 java android ane

我在 onCreate Activity 类中有这段代码,但我不想使用 Activity。

Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, 1);

是否存在一些在没有 Activity 的情况下拾取图像后捕获事件/响应的解决方案?

最佳答案

Exist some solution for capture event/response after image pick without activity?

不,抱歉。 startActivityForResult() 只能在 Activity 中使用。

关于java - 如何使用 Intent.ACTION_PICK 带响应,但不带 Activity?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23716644/

相关文章:

Java泛型访问错误

java - 如何测试转换是否会导致错误?

android - 在 google play 中包含最新的先前版本是什么意思?

android - 如何在 Adob​​e Air Mobile 的 Android native 扩展中包含额外的 Jar

java - Hadoop 中的二次排序

java - 长时间运行的线程实现有问题

android - 产品 flavor : Duplicate class found

java - 如何将ListView放入Fragment中?

android - Air ANE - 链接原生 so 库

android - Admob Milkman Games ANE 在 Flex View Android 中的位置