webOS Nation Forums >  Homebrew >  webOS patches > [Patch] GPS On Top Bar
[Patch] GPS On Top Bar

  Reply
 
LinkBack Thread Tools Display Modes
Old 04/26/2010, 07:28 PM   #1 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default [Patch] GPS On Top Bar

Hi All.

This patch adds an icon to the top bar whenever your GPS receiver is turned on, similar to the Wifi or Bluetooth icons. Because I have not found a way to subscribe to GPS like you can with Wifi or Bluetooth, the icon update routine piggy backs on the power update routine. Because of this, the icon won't update immediately when changing the GPS setting. I hope to find a better way in the future, but I think its good enough to put it out there for now.

Interestingly, the icon and a little bit of code already existed on the phone, so I'm guessing Palm was planning or is planning to add this feature at some point. A second icon also exists for when your GPS has a location lock. I'd like to add functionality for that to my patch in the future as well.

This is my first patch attempt, so I'd appreciate any feedback or comments. I've done some testing and it seems to work fine, but I can't make any guarantees for your device or how well it will behave with other patches. Also, if anyone has suggestions to improve how this works, I'm all ears.

Hopefully someone finds this useful!

--Todd

Update (5/4/10):
I have new patches available.

The "Version 2" patch is just an update to the original patch that should provide better compatibility with already installed patches. If the original worked for you, there is no advantage of reinstalling with this one.

The "With Lock Icon" adds the additional feature of changing the GPS icon to glow green when you have a location lock. A location lock is defined as having a GPS accuracy of less than 140 meters, which is the requirement for Sprint Navigation to work. Due to the frequent polling of the location service required for this to work, my testing shows that this patch has a noticeable effect on battery life. "Version 2" is most likely the better choice, but maybe someone will have better results or have thoughts on ways to improve it.

Also, don't try to install both patches simultaneously. It's either one or the other.

Enjoy!

Last edited by roto22; 05/04/2010 at 09:22 PM.
roto22 is offline   Reply With Quote
Old 04/27/2010, 11:54 AM   #2 (permalink)
Member
 
givver's Avatar
 
Join Date: Mar 2010
Posts: 21
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good Idea, I will try it out.
givver is offline   Reply With Quote
Old 04/27/2010, 01:11 PM   #3 (permalink)
rpr
Member
 
Join Date: Aug 2009
Location: Brampton
Posts: 212
Likes Received: 0
Thanks: 10
Thanked 21 Times in 18 Posts
Default

I'd like to try it, but it seems to conflict with at least one of my other top bar patches installed. I have Add Date, Change EV Icon to 3G (that one shouldn't be a problem), Ringer Switch Icon, and Rotated Battery Icon. I'm thinking it's either or both of the last two. iI haven't tried to debug it yet, should just be a matter of moving things around a bit.
__________________
Pilot 1000 -> Palm Pro -> Palm III -> Handspring Visor -> Palm V -> Palm TX -> Palm LifeDrive -> Kyocera 6035 -> Kyocera 7135 -> Treo 650 -> Palm Pre
rpr is offline   Reply With Quote
Old 04/27/2010, 01:27 PM   #4 (permalink)
Member
 
Butters3605's Avatar
 
Join Date: Jun 2009
Location: Puyallup,Wa
Posts: 766
Likes Received: 0
Thanks: 613
Thanked 200 Times in 147 Posts
Default

If you could get this working as stated in the OP that would be awesome!! I would love to know when My phone is accessing the GPS, even better with Location lock!!

Keep up the good work
__________________

Sprint Pre- Meta-Doctor 2.1.0 w/Flash

Everything is Amazing & Nobody is Happy, "People with their mobile phones, "uh... oh... it won't..."... GIVE IT A SECOND... IT'S GOING TO SPACE!" Louis C.K.
Butters3605 is offline   Reply With Quote
Old 04/27/2010, 03:16 PM   #5 (permalink)
Member
 
jp22382's Avatar
 
Join Date: May 2009
Location: Seattle
Posts: 364
Likes Received: 0
Thanks: 173
Thanked 200 Times in 47 Posts
Default

Quote:
Originally Posted by roto22 View Post
...the icon won't update immediately when changing the GPS setting.
I have GPS in the device menu, so a quick way to get the icon to toggle:
Pull down device menu, enable GPS
Close device menu
Pull down device menu again, icon appears


Seems to work the same way when disabling it.

Quote:
Originally Posted by rpr View Post
I'd like to try it, but it seems to conflict with at least one of my other top bar patches installed. I have Add Date, Change EV Icon to 3G (that one shouldn't be a problem), Ringer Switch Icon, and Rotated Battery Icon. I'm thinking it's either or both of the last two. iI haven't tried to debug it yet, should just be a matter of moving things around a bit.
Worked ok here. I have the following top bar patches:

Palm carrier string
18pt Font
EVDO to 3G
Ringer Switch Icon
jp22382 is offline   Reply With Quote
Old 04/27/2010, 03:21 PM   #6 (permalink)
Member
 
Jason Black's Avatar
 
Join Date: Dec 2009
Posts: 2,226
Likes Received: 2
Thanks: 154
Thanked 198 Times in 160 Posts
Default

It conflicts with a patch for me. I running Jason's add media volume top bar patch.....add date..add ringer button...really silent button. And thats it.
Jason Black is offline   Reply With Quote
Old 04/27/2010, 05:41 PM   #7 (permalink)
Member
 
Join Date: Mar 2010
Posts: 134
Likes Received: 0
Thanks: 4
Thanked 2 Times in 2 Posts
Default

any pics of it in action??
churro is offline   Reply With Quote
Old 04/27/2010, 09:09 PM   #8 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default

Quote:
Originally Posted by rpr View Post
I'd like to try it, but it seems to conflict with at least one of my other top bar patches installed. I have Add Date, Change EV Icon to 3G (that one shouldn't be a problem), Ringer Switch Icon, and Rotated Battery Icon. I'm thinking it's either or both of the last two. iI haven't tried to debug it yet, should just be a matter of moving things around a bit.
Yeah, the patching system is strange. I have 4 other patches that if I have any of them installed first, my GPS patch won't apply. However, if I install my patch first, all 4 others will apply correctly afterward. I'm not sure what location in the file the patch should modify for the best compatibility. If anyone has ideas, please let me know.

--Todd
roto22 is offline   Reply With Quote
Old 04/27/2010, 09:11 PM   #9 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default

Quote:
Originally Posted by churro View Post
any pics of it in action??
Here it is running on my device. It's pretty basic, but fits in nice with the other icons.

--Todd
Attached Images
File Type: png Unknown_2010-27-04_220354.png (306.1 KB, 228 views) Email Attachment
roto22 is offline   Reply With Quote
Thanked By: Vij
Old 04/27/2010, 10:06 PM   #10 (permalink)
rpr
Member
 
Join Date: Aug 2009
Location: Brampton
Posts: 212
Likes Received: 0
Thanks: 10
Thanked 21 Times in 18 Posts
Default

Well, I removed everything that I think could possibly interfere with the patch, still won't install, I even ran the Emergency File Verification tool, and it doesn't even mention any of the files in the patch as being modified, so I'm a bit stumped. I'm going to try and do it manually and see how far I get.
__________________
Pilot 1000 -> Palm Pro -> Palm III -> Handspring Visor -> Palm V -> Palm TX -> Palm LifeDrive -> Kyocera 6035 -> Kyocera 7135 -> Treo 650 -> Palm Pre
rpr is offline   Reply With Quote
Old 04/28/2010, 10:18 PM   #11 (permalink)
rpr
Member
 
Join Date: Aug 2009
Location: Brampton
Posts: 212
Likes Received: 0
Thanks: 10
Thanked 21 Times in 18 Posts
Default

I manually patched the files, and it works great! roto22, what WebOS version are you running on? I can see why the patch failed for me, my files were a fair bit different.
__________________
Pilot 1000 -> Palm Pro -> Palm III -> Handspring Visor -> Palm V -> Palm TX -> Palm LifeDrive -> Kyocera 6035 -> Kyocera 7135 -> Treo 650 -> Palm Pre
rpr is offline   Reply With Quote
Old 04/28/2010, 10:24 PM   #12 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default

Quote:
Originally Posted by rpr View Post
I manually patched the files, and it works great! roto22, what WebOS version are you running on? I can see why the patch failed for me, my files were a fair bit different.
I'm running 1.4.1.1 on a Sprint Pre. I probably should have mentioned that in my original post.

Glad to hear you got it working, but what version are you running? Maybe I can make a separate patch for it for the benefit of others.

--Todd
roto22 is offline   Reply With Quote
Old 04/28/2010, 11:01 PM   #13 (permalink)
Vij
Member
 
Vij's Avatar
 
Join Date: Jul 2009
Location: Toronto, ON, Canada
Posts: 272
Likes Received: 13
Thanks: 279
Thanked 30 Times in 23 Posts
Default

Awesome! Can't wait to try it out. Would love to see it on Preware eventually
Vij is offline   Reply With Quote
Old 04/29/2010, 12:31 PM   #14 (permalink)
rpr
Member
 
Join Date: Aug 2009
Location: Brampton
Posts: 212
Likes Received: 0
Thanks: 10
Thanked 21 Times in 18 Posts
Default

Mine is 1.4.1.1 on Bell, I can't see there being that much difference, but it definitely was different. I will try and get a patch file made to show the difference.
__________________
Pilot 1000 -> Palm Pro -> Palm III -> Handspring Visor -> Palm V -> Palm TX -> Palm LifeDrive -> Kyocera 6035 -> Kyocera 7135 -> Treo 650 -> Palm Pre
rpr is offline   Reply With Quote
Old 04/30/2010, 04:18 PM   #15 (permalink)
Member
 
Join Date: Sep 2009
Location: Miami, FL
Posts: 640
Likes Received: 2
Thanks: 206
Thanked 4,294,967,295 Times in 40 Posts
Default

thanks a lot. i had asked for this a while back. we all knew the png was in the phone, but not active. I tried to install, and got an error.

------------------------------------------------------
PATCH INSTALLATION Fri Apr 30 16:30:14 EDT 2010
------------------------------------------------------
/media/cryptofs/apps/usr/palm/applications/ca.canucksoftware.patches.gpsiconontopbar/gpsiconontopbar.patch

----------------------------------
Dry run patch attempt...
----------------------------------
patching file usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
Hunk #1 succeeded at 28 (offset 5 lines).
Hunk #2 FAILED at 1775.
1 out of 2 hunks FAILED -- saving rejects to file usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js.rej
patching file usr/lib/luna/system/luna-systemui/app/views/bar/bar-scene.html
Hunk #1 succeeded at 31 (offset 2 lines).
patching file usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
Hunk #1 succeeded at 415 (offset 27 lines).

----------------------------------
dry run failed, checking if -R would succeed
----------------------------------
patching file usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
Unreversed patch detected! Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js.rej
patching file usr/lib/luna/system/luna-systemui/app/views/bar/bar-scene.html
Unreversed patch detected! Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file usr/lib/luna/system/luna-systemui/app/views/bar/bar-scene.html.rej
patching file usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
Unreversed patch detected! Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file usr/lib/luna/system/luna-systemui/stylesheets/systemui.css.rej

----------------------------------
Installation FAILED!
----------------------------------
1 out of 2 hunks FAILED -- saving rejects to file usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js.rej
ls -R /media/cryptofs/apps/usr/palm/applications/ca.canucksoftware.patches.gpsiconontopbar
/media/cryptofs/apps/usr/palm/applications/ca.canucksoftware.patches.gpsiconontopbar:
gpsiconontopbar.patch
package_list
*** FAILED ***
Help please.
NABRIL15 is offline   Reply With Quote
Old 05/03/2010, 09:14 PM   #16 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default

Quote:
Originally Posted by NABRIL15 View Post
Help please.
Do you have other patches installed? The patch is not very forgiving if other patches related to the top bar or device menu are already installed. Remove those first, add my patch (hopefully successfully) and then you can most likely reapply the patches you had to remove.

I'm testing a new version of the patch which seems to play better with other patches. It also changes the icon when you have a position lock. Hopefully it will test well and I'll be able to release it soon.

--Todd
roto22 is offline   Reply With Quote
Thanked By: NABRIL15
Old 05/04/2010, 08:42 AM   #17 (permalink)
Member
 
Join Date: Sep 2009
Location: Miami, FL
Posts: 640
Likes Received: 2
Thanks: 206
Thanked 4,294,967,295 Times in 40 Posts
Default

yes. 17 font, rotated battery, and device menu megamix.
i will try your suggestion to remove those, install gps, and then install them back.
NABRIL15 is offline   Reply With Quote
Old 05/04/2010, 09:26 PM   #18 (permalink)
Member
 
Join Date: Aug 2009
Posts: 25
Likes Received: 0
Thanks: 2
Thanked 18 Times in 6 Posts
Default

I have new patches available. See the first post for the details (and the patches). If there are no major issues found, I plan to submit "Version 2" to Preware soon.

Due to the limitations of the GPS/Location service, I think this is the best I can make this work. I am not planning on making any additional improvements at this time.

--Todd
roto22 is offline   Reply With Quote
Old 05/06/2010, 04:10 AM   #19 (permalink)
Member
 
Join Date: Jan 2010
Posts: 23
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not working fo me
Using 1.4.1 pre plus, GSM French
mika91 is offline   Reply With Quote
Old 05/06/2010, 04:10 AM   #20 (permalink)
Member
 
Join Date: Jan 2010
Posts: 23
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not working fo me
Using 1.4.1 pre plus, GSM French
mika91 is offline   Reply With Quote
Thanked By: gwhelan
Reply

 

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-patches/243684-patch-gps-top-bar.html
Posted By For Type Date
dBsooner's webOS-Patches Web Portal This thread Refback 05/26/2010 11:19 AM


 


Content Relevant URLs by vBSEO 3.6.0