Testing with Launchers and Choosers
Unit testing code that uses a launcher or chooser directly is a challenge because both types of tasks cause your app to be deactivated. No means to abstract launchers or choosers exists out-of-the-box; therefore, I have included in the downloadable sample code a set of classes that do just that.
Just as we abstracted the built-in
LicenseInformation class in the previous section, here we do the same with the
MarketDetailTask is a launcher which, when shown, takes the user to the built-in marketplace application. When showing the
MarketplaceDetailTask during a debugging session, the native marketplace application displays an error because it expects an app with an id that has been officially ...