0

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

Atul O Holic
  • 6,692
  • 4
  • 39
  • 74

1 Answers1

1

Intent action names are case sensitive. Use this:

android.intent.action.VIEW
Simas
  • 43,548
  • 10
  • 88
  • 116