Legacy webOS 2.x, 3.x Camera, Image Picker

Hello Enyo folks,
I've been round in circles trying to figure this out...
Is there a way to call up the legacy webOS native image picker / new image camera launcher from Enyo 2? I want to be able to pick and existing image or launch the camera for a new image and return that image handle to Enyo 2. It would then be base64 encoded and sent to an XML-RPC server API.
It seems like webOS-ports/webos-lib or enyo-webos may be required, but I'm having a hard time figuring this out without an example.
I hope someone has already done this and can point me to some working code.
-Thanks!

Comments

  • I want to achieve the same - but I have not investigated. Would not phonegap (for webos) help with this?
  • My understanding is that phonegap is not needed for legacy webOS and in fact is no longer a supported phonegap platform.
  • My understanding is: phonegap is not needed for legacy webOS if you hardcode the webOS specific interfaces into your Enyo2 app. But then this Enyo2 app will only work for webOS - and you can not have it for other platforms.
    Public phonegap no longer supports webos (tooo bad!!) - but I think for LG webOS they maintain a special version of phonegap. Not sure how much that differs from legacy HP webos or open webos.
  • If I manage to put together a 'hello world' that pulls up the native image picker / new image camera launcher I'll post it here, but don't hold your breath ;)
  • thanks for trying.
    --
    I'm still kind of lost with trying to build Enyo2 apps for legacy HP webos devices. I tried phonegap integration (I use latest phonegap version with webos support) which comes with Ares2 - but I must be missing some pieces. I even don't get a working first screen to display. I still need to find a good tutorial/ cookbook for this use case.
  • edited May 2014
    I have gotten that far.
    Using bootplate I added the webos-lib into "lib" folder.
    https://github.com/webOS-ports/webos-lib
    Modified package.js in the source folder like so:
    enyo.depends(
    	// Layout library
    	"$lib/layout",
    	// Onyx UI library
    	"$lib/onyx",	// To theme Onyx using Theme.less, change this line to $lib/onyx/source,
    	//"Theme.less",	// uncomment this line, and follow the steps described in Theme.less
    	// webOS library - Added
    	"$lib/webos-lib",
    	// CSS/LESS style files
    	"style",
    	// Model and data definitions
    	"data",
    	// View kind definitions
    	"views",
    	// Include our default entry point
    	"app.js"
    );
    From there I was able to run deploy, then copy a appinfo.json into the build deploy folder and run palm-generate and palm-package to create an ipk that works in webOS 2.2.4
    (I think I remembered all the steps - its been a couple of weeks...)

    I haven't tried Ares, so I'm not sure how that works...
  • It sounds like you would need to include the external webos-lib into Ares and then if it makes a deploy folder for you and you have the SDK installed you can then make a appinfo.json in that deploy folder and use the palm command line tools to create the ipk.
    https://developer.palm.com/content/resources/develop/command_line_tools.html
Sign In or Register to comment.