webOS Nation Forums >  webOS developer forums >  Vertigo Studios > My Flashlight
My Flashlight

  Reply
 
LinkBack Thread Tools Display Modes
Old 06/20/2009, 09:47 PM   #21 (permalink)
Member
 
Join Date: Jan 2004
Posts: 124
Likes Received: 0
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Awesome! Guess I can stop working on my version. I was looking through the camera app to see how they controlled the flash. Figured it'd be cleaner than using shell scripts.
TrickerZ is offline   Reply With Quote
Old 06/21/2009, 02:13 AM   #22 (permalink)
Pre Developer
 
PreGame's Avatar
 
Join Date: Jun 2009
Posts: 550
Likes Received: 0
Thanks: 24
Thanked 793 Times in 81 Posts
Default

Yea I was looking through the camera app and trying it but it is a pain. There is no clear flash call. It looks like the flash is built into one of the linux binaries.
PreGame is offline   Reply With Quote
Old 06/21/2009, 03:14 AM   #23 (permalink)
Pre Developer
 
PreGame's Avatar
 
Join Date: Jun 2009
Posts: 550
Likes Received: 0
Thanks: 24
Thanked 793 Times in 81 Posts
Default

OK, I attached a .zip of the file in the original post. Inside the .zip is the .tar. Just put that in your base / directory and run the untar. It should create the directories and add them where needed if not sorry, I have never used untar.

There is a Service I created which is required for the script to work. I am in the middle of getting rid of the .sh scripts but I haven't had time to fine tune it so for now just deal with having a .sh script to turn the light on and off.

IT IS VERY LATE so sorry if the readme sucks!
PreGame is offline   Reply With Quote
Thanked By: JonVisc
Old 06/21/2009, 03:29 AM   #24 (permalink)
Pre Developer
 
PreGame's Avatar
 
Join Date: Jun 2009
Posts: 550
Likes Received: 0
Thanks: 24
Thanked 793 Times in 81 Posts
Default

Sorry I forgot to include the actual service in there. I have updated the original post with the correct .zip file.
PreGame is offline   Reply With Quote
Old 06/21/2009, 04:17 AM   #25 (permalink)
Member
 
jack87's Avatar
 
Join Date: Jun 2009
Location: Salt Lake City, Ut
Posts: 1,225
Likes Received: 9
Thanks: 78
Thanked 179 Times in 128 Posts
Default

Quote:
Originally Posted by PreGame View Post
Sorry I forgot to include the actual service in there. I have updated the original post with the correct .zip file.
thanks for the update... i have been able to mod apps on my pre but i am not sure how i can put the files in the tar into the appropriate directories of the pre from the pc
jack87 is offline   Reply With Quote
Old 06/21/2009, 09:34 AM   #26 (permalink)
Member
 
Join Date: Jan 2004
Posts: 124
Likes Received: 0
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by PreGame View Post
Yea I was looking through the camera app and trying it but it is a pain. There is no clear flash call. It looks like the flash is built into one of the linux binaries.
That's how I felt too. I figured it was just my poor knowledge of java.
TrickerZ is offline   Reply With Quote
Old 06/21/2009, 10:08 AM   #27 (permalink)
Pre Developer
 
PreGame's Avatar
 
Join Date: Jun 2009
Posts: 550
Likes Received: 0
Thanks: 24
Thanked 793 Times in 81 Posts
Default

One other thing I might add is that you can use the Prelease service to execute commands and run scripts for your own applications. Just use the runCmd method.

IE: palm://com.pregame.prelease/runCmd '{"cmd":"echo hello"}'
PreGame is offline   Reply With Quote
Old 06/21/2009, 10:55 AM   #28 (permalink)
Member
 
Join Date: Jan 2004
Posts: 124
Likes Received: 0
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Just tried out your app. I had to change prelease to Prelease (or could probably just change the class to prelease instead of Prelease) to get it to work. Changes I made are in flashlight-assistant.js and com.pregame.prelease.service. Works great after the changes. I'm going to try and find a better icon for you, though. Hello World doesn't quite work for me lol.
TrickerZ is offline   Reply With Quote
Old 06/21/2009, 11:01 AM   #29 (permalink)
Member
 
Join Date: Jun 2009
Posts: 308
Likes Received: 0
Thanks: 18
Thanked 657 Times in 59 Posts
Default

Looks great! Any hope of you releasing the code for your service class?
aonic is offline   Reply With Quote
Old 06/21/2009, 11:25 AM   #30 (permalink)
Member
 
Join Date: Jan 2004
Posts: 124
Likes Received: 0
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Stole and modified this icon. Little better.
Attached Images
File Type: png icon.png (6.3 KB, 1626 views) Email Attachment
TrickerZ is offline   Reply With Quote
Old 06/21/2009, 11:27 AM   #31 (permalink)
Member
 
Join Date: Jul 2004
Posts: 42
Likes Received: 0
Thanks: 3
Thanked 5 Times in 3 Posts
Default

I'm using this icon.
Attached Images
File Type: png icon.png (4.5 KB, 1592 views) Email Attachment
backslide is offline   Reply With Quote
Old 06/21/2009, 11:28 AM   #32 (permalink)
Member
 
Join Date: Jul 2004
Posts: 42
Likes Received: 0
Thanks: 3
Thanked 5 Times in 3 Posts
Default

lol ... looks almost the same. One's cartoony and one kind of isn't.
backslide is offline   Reply With Quote
Old 06/21/2009, 11:52 AM   #33 (permalink)
Member
 
Join Date: Jan 2008
Posts: 69
Likes Received: 0
Thanks: 12
Thanked 6 Times in 4 Posts
Default

sorry that i have nothing to add but thanks!
scrambler is offline   Reply With Quote
Old 06/21/2009, 01:25 PM   #34 (permalink)
Member
 
Join Date: Jul 2004
Posts: 42
Likes Received: 0
Thanks: 3
Thanked 5 Times in 3 Posts
Default

Hmmm ... seems like you have to start the service after a reboot.

I had rebooted for something else and the flash wouldn't turn on. Thought maybe the permissions had changed upon reboot but all files and permissions was as they should be.

Rooted in, used the command stated in the readme and the app works again.
backslide is offline   Reply With Quote
Old 06/21/2009, 01:38 PM   #35 (permalink)
Member
 
Join Date: Sep 2008
Location: Naval Station Norfolk
Posts: 211
Likes Received: 0
Thanks: 6
Thanked 11 Times in 8 Posts
Default

you should seriously hook up with the guys at the "installing homebrew apps w/out rooting" thread and see if they could use this app as there test subject to install on a non rooted pre.
knightflores is offline   Reply With Quote
Old 06/21/2009, 01:46 PM   #36 (permalink)
Member

 
windzilla's Avatar
 
Join Date: Jun 2009
Location: The Woo, MA
Posts: 1,438
Likes Received: 3
Thanks: 287
Thanked 464 Times in 250 Posts
Default

I second the w/out rooting idea. Flashlight was a highly used function on my omnia. I use it when I do physicals or focused exams instead of carrying a pen light. I would love to get that back
windzilla is offline   Reply With Quote
Old 06/21/2009, 03:08 PM   #37 (permalink)
Member
 
Join Date: Sep 2008
Location: Naval Station Norfolk
Posts: 211
Likes Received: 0
Thanks: 6
Thanked 11 Times in 8 Posts
Default

i havent done this hack yet but i was wondering how much battery life would this take up?
knightflores is offline   Reply With Quote
Old 06/21/2009, 03:42 PM   #38 (permalink)
Pre Developer
 
PreGame's Avatar
 
Join Date: Jun 2009
Posts: 550
Likes Received: 0
Thanks: 24
Thanked 793 Times in 81 Posts
Default

Battery life is unknown. I am currently working on getting this done with an IPKG so it will install automatically.
PreGame is offline   Reply With Quote
Old 06/21/2009, 04:27 PM   #39 (permalink)
Member
 
Join Date: Jan 2004
Posts: 124
Likes Received: 0
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Did you get your script-less version working?
TrickerZ is offline   Reply With Quote
Old 06/21/2009, 04:27 PM   #40 (permalink)
Member
 
Join Date: Jun 2009
Location: Santa Barbara, CA
Posts: 54
Likes Received: 0
Thanks: 6
Thanked 31 Times in 14 Posts
Default

Nice work! One of the things I've missed since switching from my previous phone was the flashlight option, so I'm glad to have it back
dimfeld is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/vertigo-studios/187407-my-flashlight.html
Posted By For Type Date
Flashlight on the Pre - PPCGeeks This thread Refback 06/21/2009 11:53 AM


 


Content Relevant URLs by vBSEO 3.6.0