• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

parameters

webrod

Lurker
Hi,

I am a newbie with android.
I'de like to know if an application has the possibility to get parameters?

I have an automation software that allows me to run an application from my tablet by pushing a button.

I can provide the path of the application with, I beleive parameters.

Does it work like windows?

like
myapp param1 param2?

actually I am looking for a software that would play music from my tablet and accept parameters so I could select a playlist of a list of mp3 files when I call the software from another software.

BTW,
how do I know the name of the application to call (with windows, I go to program files, I search the software folder, then I search for the xxx.exe file, or I can read from the shortcut if there is one from the start menu or desktop).
But with android, what is the procedure?

thanks a lot.
Rod
 
In Android the software would need to accept Intents that would trigger the task.


Are you asking as a developer or as a user though? As the answer to your question is very different depending on what you're trying to do :)
 
In Android the software would need to accept Intents that would trigger the task.


Are you asking as a developer or as a user though? As the answer to your question is very different depending on what you're trying to do :)

as a user.
I did a test with Talk, and it didn't ask.
(or maybe the very first time only and I don't remember).
But now it does not ask.
i just entered "talk" in the "path" field (I am using HSTouch as a client of HomeSeer, the home automation software)

thanks
Rod
 
If you are saying something like in PC browser, you put http://www.abc.com?search=xxx such stuff to trigger action in Android, it is possible but you need to formulate the correct Intent that is recognizable to the app. Intent has concept of categories,data etc to fine-tuned which app get the Intent to work on.
 
Yep as sohguanh said, it's possible for a dev to implement. An example is putting a shortcut on your desktop. That's basically sending a "parameter" to the browser to launch that particular page.

This is much the same as Windows, in that a dev would need to plan to accept the parameter, or it wouldnt do much.

However it's a bit different for Android, in that the dev has to set up a way for users to make shortcuts. You cant just add a shortcut to the screen, and add data to it like windows ("myprogram.exe" -launchbig)

Rather the dev needs to provide a list of available "parameters" to the Android OS in a way that allows the user to select a specific parameter as a shortcut.


All that said, you should be able to make a playlist and save it -- then later add it as a shortcut with most media players out there (though maybe not stock or Google Music)
 
Back
Top Bottom