Difference between revisions of "Luna Send"

From WebOS Internals
Jump to: navigation, search
(Storage)
Line 77: Line 77:
 
Enter usb storage mode:
 
Enter usb storage mode:
 
<pre><nowiki>
 
<pre><nowiki>
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":false,\"enterIMasq\":true}
+
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false}
 
</nowiki></pre>
 
</nowiki></pre>
  
Enter usb storage mode:
+
Exit usb storage mode (toggle):
 
<pre><nowiki>
 
<pre><nowiki>
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":false,\"enterIMasq\":false}
+
luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false}
 
</nowiki></pre>
 
</nowiki></pre>
  

Revision as of 21:33, 26 January 2010

NOTE: You have to run with root perms.

Using luna-send to refresh the Launcher panel.

luna-send -n 1 palm://com.palm.applicationManager/rescan {}

Get a list of all installed apps:

luna-send -n 1 "palm://com.palm.applicationManager/listLaunchPoints" "{}"

Using luna-send to launch an application:

luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\"}
luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\",\"params\":{\"scene\":\"page\",\"target\":\"http://www.google.com\"}}

The second command shows how to open www.google.com when the browser is launched.

Using luna-send to download a file to /media/internal/downloads/:

luna-send -n 1 palm://com.palm.downloadmanager/download {\"target\":\"http://www.google.com/index.html\"}  

Replace www.google.com/index.html with whatever file you want downloaded.

Using luna-send to control the palm progress animation (The pulsing "palm" logo seen at boot):

luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"start\"}
luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"stop\"}

TODO: These should probably be plugged into the Tracker app.

luna-send -n 1 palm://com.palm.location/setUseGps {\"useGps\":\"true\"}
luna-send -n 1 palm://com.palm.location/setAutoLocate {\"autoLocate\":\"true\"}
luna-send -n 1 palm://com.palm.location/getCurrentPosition {}

List all of the processes which are running:

sudo luna-send -n 1 palm://com.palm.applicationManager/running {}
** Message: serviceResponse Handling: 2, { "running": [ { "id": "com.palm.launcher", "processid": "1006" }, { "id": "com.palm.systemui", "processid": "1007" }, { "id": "com.palm.app.email", "processid": "1000" }, { "id": "com.palm.app.phone", "processid": "1001" }, { "id": "com.palm.app.contacts", "processid": "1002" }, { "id": "com.palm.app.camera", "processid": "1003" }, { "id": "com.palm.app.messaging", "processid": "1004" }, { "id": "com.palm.app.calendar", "processid": "1005" }, { "id": "com.palm.app.phone", "processid": "1008" }, { "id": "com.palm.app.camera", "processid": "1014" } ] }

Interesting note: Seems everything with a processid below 1008 are static. As seen above, open camera app has pid 1014 and startup app is pid 1003

Close a process:

luna-send -n 1 "palm://com.palm.applicationManager/close" "{\"processId\":\"1058\"}"

Activate the vibrator:

luna-send -n 1 palm://com.palm.vibrate/vibrate {\"period\":1,\"duration\":1000\}

The duration value is in milliseconds and can be adjusted as desired.

Photos Info - list album and image from mediadb.db3:

luna-send -n 1 luna://com.palm.mediadb/image/listalbums {}
luna-send -n 1 luna://com.palm.mediadb/image/listimages {}


Storage

Enter usb storage mode:

luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false}

Exit usb storage mode (toggle):

luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false}

--WOOT--

Finding luna-send Command

These commands come from inside given applications. The best way to find luna-send commands is to do a search for the term "method:" in the Applications code. Once you find method: you might see parameters: which is also used by luna-send here is an example.

searched for "method:" in the com.app.palm.AppYouAreTesting

found

"method: test"

luna-send command based on example:

luna-send -n 1 palm://com.palm.AppYouAreTesting/test {}

General luna-send command:

luna-send -n 1 palm://ApplicationName/MethodValue {ParameterValues}