2

I´m currently launching an Amazon FireTV app via the dial protocol with a parameter. This parameter can be accessed in the onCreate() by an intent like this:

Intent intent = getIntent();
paramter = intent.getStringExtra("com.amazon.extra.DIAL_PARAM");

Is there some way to know, if this intent changes while the FireTV app is running, like a listener? I know, this could be done with a while loop constantly checking if the parameter changed, but this seems not to be a good solution. Any ideas?

user3333128
  • 135
  • 4
  • 13

1 Answers1

1

You are looking for onNewIntent of Activity, that will trigger each time the Activity receives a new Intent.

This works exactly the same as for standard Android.

shalafi
  • 3,926
  • 2
  • 23
  • 27
  • thanks a lot, with your help i found this [post](http://stackoverflow.com/questions/8619883/onnewintent-lifecycle-and-registered-listeners), which resolved the problem perfectly – user3333128 May 02 '17 at 10:47