Gaia/Hacking: Difference between revisions

Jump to navigation Jump to search
Line 293: Line 293:
=== Launching an App Directly ===
=== Launching an App Directly ===


A "--runapp" option has been added to the b2g-desktop command-line.  It takes an argument that it normalizes by lower-casing and removing dashes and spaces, and then checks the argument against the similarly normalized app names from app manifests.  For example, the name of the e-mail app is currently "E-Mail", but "--runapp email" will run it.  Partial matching is not supported right now, but you can enhance b2g/chrome/content/runapp.js if your app name is unwieldy.
A "--runapp" option has been added to the b2g-desktop command-line to automatically start an applicationThe system app is loaded and everything happens like normal; this is not like the old trick where we loaded your app instead of the system app.
 
"--runapp" takes an argument that it normalizes by lower-casing and removing dashes and spaces, and then checks the argument against the similarly normalized app names from app manifests.  For example, the name of the e-mail app is currently "E-Mail", but "--runapp email" will run it.  Partial matching is not supported right now, but you can enhance b2g/chrome/content/runapp.js if your app name is unwieldy.


If you invoke "--runapp" without an argument (or an empty argument), the command will print out a list of all the apps it knows about as well as a brief usage message.
If you invoke "--runapp" without an argument (or an empty argument), the command will print out a list of all the apps it knows about as well as a brief usage message.


In summary:
One important note is that this command disables the lock-screen as part of its magic and does not re-enable it.  The assumption is that you won't use this command on a profile where you are testing the lock screen, or will turn it back on manually.  Feel free to enhance the command to behave better if this is a problem for you.
 
'''In summary:'''


   ./b2g --runapp email
   ./b2g --runapp email
Confirmed users
360

edits

Navigation menu