Why is my searchable activity's Intent.getAction() null? Why is my searchable activity's Intent.getAction() null? android android

Why is my searchable activity's Intent.getAction() null?


That took too many hours of my life. When performing a search from the searchable singleTop activity (in my case Waypoints) you must override onNewIntent() and grab the search query there. Which after a few hours in, I was doing. The catch was that getIntent() does not return the Intent used to call the activity (head explodes). It seems to return the original Intent that opened my searchable activity before I performed my first search.

The onNewIntent method receives the search intent. I replaced getIntent() with the param from onNewIntent() and boom, progress.

Though I must admit; figuring this out eases the frustration of being unable to escape the sound of Dancing with the Stars blaring in the background.