GPS Satellite count

505 views
Skip to first unread message

Daniele Di Alessandro

unread,
Aug 13, 2015, 3:23:37 AM8/13/15
to Tasker
Hi friends

there is a way from Tasker to know how many satellites are connected (not just visible) with GPS ?

I'm looking for something from days but found nothing

Thanks.


nanobrain

unread,
Aug 13, 2015, 11:52:29 AM8/13/15
to Tasker
It is probably possible calling java code from Tasker. Unfortunately that's the extent of help I can give you :( I really should start learning java.

Plepleus

unread,
Aug 13, 2015, 2:26:57 PM8/13/15
to Tasker
Try this:

    A1: Java Function [ 
        Return:lm 
        Class Or Object:CONTEXT 
        Function:getSystemService {LocationManager } (String) 
        Param:location ] 
    A2: Java Function [ 
        Return:loc 
        Class Or Object:lm 
        Function:getLastKnownLocation {Location} (String) 
        Param:gps ] 
    A3: Java Function [ 
        Return:bun 
        Class Or Object:loc 
        Function:getExtras {Bundle} () ] 
    A4: Java Function [ 
        Return:%sats 
        Class Or Object:bun 
        Function:get {Object} (String) 
        Param:satellites ] 
    A5: Flash [ 
        Text:%sats 
        Long:Off ] 


On Thursday, August 13, 2015 at 3:23:37 AM UTC-4, Daniele Di Alessandro wrote:

Tobias Hau

unread,
Aug 26, 2015, 1:54:54 PM8/26/15
to Tasker
I tried but get error:
19.54.12/E Java Function: bun -> bun
19.54.12/JU analyse: target: loc expected: null
19.54.12/JU target: analyse done: loc: class: ??? obj: null partWithoutMods: null static: false const false casted: false
19.54.12/JU analyse: returnval: android.os.Bundle expected: null
19.54.12/JU returnval: analyse done: android.os.Bundle: class: android.os.Bundle obj: null partWithoutMods: null static: true const false casted: false
19.54.12/JU initClass: class: android.os.Bundle obj: null partWithoutMods: android.os.Bundle static: true const false casted: false
19.54.12/JU initClass: retnovar: init with array handling -> class android.os.Bundle
19.54.12/JU initClass: class: ??? obj: null partWithoutMods: loc static: false const false casted: false
19.54.12/JU initClass: target: null: class: ??? obj: null partWithoutMods: loc static: false const false casted: false
19.54.12/E Java Function: failed to init target class loc
Message has been deleted

nanobrain

unread,
Aug 26, 2015, 4:34:32 PM8/26/15
to Tasker
Works for me. Export the description of your task as see where it differs from Plepleus's.

Odysseos

unread,
Aug 29, 2015, 1:00:36 PM8/29/15
to Tasker
Hi Tobias. You get this error due to the fact that the "loc" object from A2 action is null (no data inside it). To fix it you need your "GPS" toggle  will be turned on (no need to start a "get location" action, just turn on GPS, since it gets last known location). If you again get an error, then start a get location action to get your location and all goes on.

Tobias Hau

unread,
Jun 28, 2016, 5:17:23 PM6/28/16
to Tasker
After one year I tried it again but I'm really stuck with code above. Get the error again. What I'm doing wrong? I tried it also with GPS fix before but it also sticks on error.

Tobias Hau

unread,
Jun 28, 2016, 5:34:08 PM6/28/16
to Tasker
Edit. It worked, but only when I have a fix. Some way to get the satellite in view too?

Geofilho Ferreira Moraes

unread,
Feb 18, 2017, 7:40:46 PM2/18/17
to Tasker
Could they share those profiles and tasks with me?
Reply all
Reply to author
Forward
0 new messages