Android 実行設定
キットに選択した実行デバイスでアプリケーションを実行するための設定を指定するには、Projects >Run Settings に進みます。
Android デバイス上でアプリケーションを実行およびデバッグするには、Android 用の開発 で説明されているように、開発ホストからデバイスへの接続を作成する必要があります。
amスタートオプション
Qt Creator は、アプリケーションの起動時に、Android Activity Manager(am)のデフォルトの起動オプションを適用します。Activity manager start arguments フィールドに追加の開始オプションを指定できます。ただし、デフォルトのオプションと追加したオプションが競合すると、アプリケーションが起動しないことがあります。
通常実行時のアクティビティ・マネージャのデフォルト引数:
am start -n <package_name>/<QtActivity_name>
デバッガ・モードのアクティビティ・マネージャのデフォルト引数:
am start -n <package_name>/<QtActivity_name> -D
例えば、特定のユーザーとしてアプリケーションを実行するには、開始オプション--user 10 を入力します。10 は、ユーザー・アカウントのユーザーIDです。

シェル・コマンド
アプリケーションの起動前と終了後に実行するシェル・コマンドを指定できます。例えば、Pre-launch on-device shell commands に以下のコマンドを入力すると、アプリケーショ ンの実行前に画面のロックが解除され、デバイスのユーザーアカウント10 に切り替わります:
input keyevent 82 am switch-user 10
Post-quit on-device shell commands に以下のコマンドを入力すると、デフォルト・ユーザー0 に切り替わり、アプリケーショ ンの終了後に画面のロックが解除されます:
am switch-user 0 input keyevent 82
プロジェクトのキットをアクティベートする」、「実行するプロジェクトを設定する」、「How To: Develop for Android」、「キット」も参照してください 。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.