Action view intent does not work

960 views Asked by At

Action view Intent for Search widget does not send Intent i am using Toast to show whether intent is sent when user choose item from suggestion in Quick Search Box

  • here is snippet where intent is received in searchable Activity

    if (Intent.ACTION_VIEW.equals(intent.getAction())){
       /* Intent countryIntent = new Intent(this, RecordActivity.class);
        countryIntent.setData(intent.getData());
        startActivity(countryIntent);
        */
        Toast.makeText(this,"click",Toast.LENGTH_LONG).show();
        finish();
    }
    
  • snippet from searchable.xml where search widget support Action View

android:searchSuggestIntentAction="android.Intent.action.VIEW"

there is no Uri sent at-all from action_view intent I do not know the reason ,although action_search work

1

There are 1 answers

0
Simas On BEST ANSWER

Intent action names are case sensitive. Use this:

android.intent.action.VIEW