To get query string value in an url, for example to get ‘user_id’ value from an url
var i = q.split('=');
if(i.toString() == sParam)
queryStringValue = i.toString();
var gcm_id = GetQueryStringParams('user_id');
If you encounter this error, it indicates that your environment variables are not properly set. We will add these environment variables by editing “.profile” file present in your home directory.
If you have installed android sdk through Android Studio, it is likely to be present in /home/your_user_name/Android/sdk, otherwise in /home/your_user_name/android-sdk-linux.
If you have installed it through android studio then add following line in your “.profile” file
else add this
$ export ANDROID_HOME=~/android-sdk-linux
Then add the paths to the platform-tools and tools sub-directories
You should now be able to run android from the shell. Note that you might need to reopen the terminal to make it work