我的问题的过程是下一个:防止从开始并阻止其发射
当用户保持搜索的Android手机上的按钮,而这一点,而进度条是在行动上,会显示以下错误信息:
ERROR/AndroidRuntime (16794): java.lang. SecurityException: Requesting codes from com.google.android.voicesearch (with uid 10028) to be run in process com.xxxx.myApplication (with uid 10088)
因此,进一步于该消息我尝试几件事情:杀死进程 'com.google.android.voicesearch':
JAVA代码:
if (event.getKeyCode() == KeyEvent.KEYCODE_SEARCH)
{
if (!event.isLongPress() && !Utils.getMyProgress().isShowing())
{
searchProducts();
}
else
{
android.os.Process.killProcess(android.os.Process.getUidForName("com.google.android.voicesearch"));
}
return true;
}
不成功!因此,每当电话的用户长时间保持键(触摸)“查找”其电话(例如在htc上)时,阻止进程“com.google.android.voicesearch”被启动 ,这个键(触摸)存在,而是一个物理的而不是触觉键(触摸)!)
也许有可能阻止这个进程('com.google.android.voicesearch')在在manifest.xml中,而我的应用程序启动:
的manifest.xml:
<application
android:debuggable="false"
android:enabled="false"
android:killAfterRestore="false"
android:process="com.google.android.voicesearch">
</application>
任何想法? 感谢您的回答!