0

I am trying to use multiple activities for my remote app, say, Activity A, Activity B.

But each time I try to create an intent(in Activity A) and start a new activity(Activity B), the Pairing Activity keeps on popping up, but I only want the pairing-activity used in the first time I start the app, and I want the pairing communication to keep on alive (untill I kill the whole app).

Is there a way to implement this? or should I keep all of my app into one Activity? like Activity AB? I'm not quite sure but I think it might have to do something with AnymoteClientService and AnymoteSender

1 Answers1

0

If your Anymote logic is kept in a service, then multiple activities can use that to send commands to Google TV. Pairing would only occur once per app.

If you are using the Anymote Library that Google open sourced (https://code.google.com/p/googletv-android-samples/source/browse/#git%2FAnymoteLibrary), then that library requires that the pairing step be done with every connection.

The Anymote-for-Java library that I open-sourced (https://code.google.com/p/googletv-android-samples/source/browse/#git%2FAnymoteLibrary) will remember the pairing information and only requires the pairing step to be done once per device.

Leon Nicholls
  • 4,623
  • 2
  • 16
  • 17
  • Thank you! But should I have to bind every single activities to the AnymoteClientService? For the activities to use the anymoteSender.send(something) right? Oh and https://code.google.com/p/googletv-android-samples/source/browse/#git%2FAnymoteLibrary and https://code.google.com/p/googletv-android-samples/source/browse/#git%2FAnymoteLibrary were quite similar to me so I googled your github, that was a great help also! Thank you again! – user1721990 Nov 26 '12 at 11:20
  • You have to bind to the service if you are using the Anymote capabilities of the Google TV Anymote library. My library has a different design. – Leon Nicholls Nov 26 '12 at 13:48