How to use the androidtv.constants.CMD_LAUNCH_APP.format function in androidtv

To help you get started, we’ve selected a few androidtv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JeffLIrion / python-androidtv / tests / test_firetv_sync.py View on Github external
def test_launch_app_stop_app(self):
        """Test that the ``FireTVSync.launch_app`` and ``FireTVSync.stop_app`` methods work correctly.

        """
        with patchers.patch_connect(True)[self.PATCH_KEY], patchers.patch_shell(None)[self.PATCH_KEY]:
            self.ftv.launch_app("TEST")
            self.assertEqual(getattr(self.ftv._adb, self.ADB_ATTR).shell_cmd, constants.CMD_LAUNCH_APP.format("TEST"))

            self.ftv.stop_app("TEST")
            self.assertEqual(getattr(self.ftv._adb, self.ADB_ATTR).shell_cmd, "am force-stop TEST")
github JeffLIrion / python-androidtv / androidtv / basetv / basetv_async.py View on Github external
async def launch_app(self, app):
        """Launch an app.

        Parameters
        ----------
        app : str
            The ID of the app that will be launched

        """
        await self._adb.shell(constants.CMD_LAUNCH_APP.format(app))
github JeffLIrion / python-androidtv / androidtv / basetv / basetv_sync.py View on Github external
def launch_app(self, app):
        """Launch an app.

        Parameters
        ----------
        app : str
            The ID of the app that will be launched

        """
        self._adb.shell(constants.CMD_LAUNCH_APP.format(app))