How to send a flag/data as an input to installed android app? Is there a way to send a flag or a single number or character to my app running on a device using android developer console or by using any other way, without touching the mobile device ?  

Example :
Say I have a mobile. I install my app-test.apk in the device by downloading it from google play or by transferring it to the sd card.
Now the app is running in my mobile.
What I want is to send a message/a flag/a number/a character or anything to the app so that the app identifies it and perform some action, some sort of a trigger for some condition. Like app shows a toast messages saying "I am running".  All this without touching the device.
If it is not possible how can I achieve this by just shaking the device or pressing the volume button with device in locked state or by minimal touching the device ?
Is this possible ?  

Thanks !
Yes, this is exactly what ADB is for. Part of the Android SDK, it's designed for developers but useful for any user. After you turn on "USB Debugging" in the device's developer options, it can connect to the device via Wi-Fi or USB. Depending on the particular app you want to control, you might control it by:


sending an intent the app understands, using am start
copying a file to the device using adb push
sending fake keyboard or touch-screen inputs using adb input


Find out more about ADB on the official site or the tag on this site: adb.

Another option is to use an automation app such as tasker or automate. With these tools, you can visually create something like a "script" of actions: changing system settings, and sending intents to apps. Many apps integrate with these tools, offering special intents to control them and even a nice menu to choose them from. You can set this script to be triggered directly by a single touch on the screen, or indirectly by a change in some other state: e.g. when the phone sees a particular Wi-Fi network, when it's in a geofence, or when it connects to a Bluetooth device.