如何获取startActivityForResult方法跳转到的子activity的键盘事件

superlongda 2010-12-27 01:46:04
RT,如何获取startActivityForResult方法跳转到的子activity的键盘事件
我的startActivityForResult方法中的Intent是实现语音识别的....既

mIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);


startActivityForResult(mIntent, VOICE_RECOGNITION_REQUEST_CODE);


该子activity应该是android内部自动生成的吧....
现在问题是要获取弹出的子activity的键盘事件,不知道我的问题描述清楚了吗....求解!谢.


public static final String ACTION_RECOGNIZE_SPEECH
Since: API Level 3
Starts an activity that will prompt the user for speech and sends it through a speech recognizer. The results will be returned via activity results (in onActivityResult(int, int, Intent), if you start the intent using startActivityForResult(Intent, int)), or forwarded via a PendingIntent if one is provided.

Starting this intent with just startActivity(Intent) is not supported. You must either use startActivityForResult(Intent, int), or provide a PendingIntent, to receive recognition results.


...全文
120 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
superlongda 2010-12-27
  • 打赏
  • 举报
回复
使用ComponentName resolveActivity(PackageManager pm)方法有用吗?
superlongda 2010-12-27
  • 打赏
  • 举报
回复
唉 回复被删了...貌似这个问题没有合适的解决方法么...

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧