我的問題的過程是下一個:防止從開始並阻止其發射
當用戶保持搜索的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>
任何想法? 感謝您的回答!