Closed Bug 782862 Opened 8 years ago Closed 8 years ago

Add a --runapp command to b2g-desktop to automatically start an app

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

Details

Attachments

(1 file, 1 obsolete file)

It used to be cool to add a pref like the following to automatically start an app:

user_pref("browser.homescreenURL","http://email.gaia.localhost:8080");

Unfortunately, this does not startup the system app which provides the on-screen keyboard, notification tray, and all kinds of other stuff.

I am assuming this is a desired feature.  I will send a mail to dev-gaia to provide for limited discussion/heads-up for people.

So I've created a shell command in the vein of djf's --screen command.

So, for example, if I do "./b2g --runapp email" it will start the e-mail app after disabling the lockscreen.

NB: The logic does not currently re-instate the lock-screen setting after disabling it to turn off the lock screen.  It might be reasonable to do that.

If you run ./b2g --runapp without an arg, it looks like:
======
Opened socket on 4242
The --runapp argument specifies an app to automatically run at
startup.  We match against app names per their manifest,
ignoring capitalization, dashes, and whitespace.

The system will load as usual except the lock screen will be automatically be disabled.

Known apps:
  Dialer
  Music
  E-Mail
  Contacts
  PDF Viewer
  System
  Video
  Gallery
  Calendar
  Clock
  Homescreen
  Calculator
  Messages
  Browser
  Settings
  FM Radio
  Keyboard
  Camera
  Test Agent
  UI tests
  Template
  Tasks
  CubeVid
  PenguinPop
  Cut The Rope
  CrystalSkull
  TowerJelly
  Staging Marketplace
  Dev Marketplace
  Marketplace
=====
Attachment #651969 - Flags: review?(21)
djf noticed that I was always getting the list of apps even if --runapp was not specified, and a moot comment.  Thanks djf!
Attachment #651969 - Attachment is obsolete: true
Attachment #651969 - Flags: review?(21)
Attachment #652010 - Flags: review?(21)
Comment on attachment 652010 [details] [diff] [review]
--runapp only retrieves the list of apps when specified now

Review of attachment 652010 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! I kept telling myself that something like that would be super useful. Glad you did it.
Attachment #652010 - Flags: review?(21) → review+
https://hg.mozilla.org/mozilla-central/rev/28dc3eadf4a0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.