SEARCH_LONG_PRESS in a broadcast not working?
This is not working. Any idea why I can not receive long search keypress?
AndroidManifest.xml
<receiver android:enabled="true" android:name=".MainReceiver" >
<intent-filter android:priority="10000">
<action android:name="android.intent.action.SEARCH_LONG_PRESS" />
</intent-filter>
</receiver>
MainReceiver.java
public class MainReceiver extends BroadcastReceiver
{
@Override
public vo开发者_如何学Pythonid onReceive( Context context, Intent intent )
{
// Nothing comes here..
}
}
thanks guys, i found the answer in the android documentation. It looks like Search button can not be used as a broadcast action. it is only an activity action.
ACTION_SEARCH_LONG_PRESS Activity Action: Start action associated with long pressing on the search key.
精彩评论