microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
7.63k stars 1.61k forks source link

[feature request] Location service after phone wakeup #469

Open herrdeh opened 6 years ago

herrdeh commented 6 years ago

As far as I understood, MicroG's localisation will only happen when an app is calling for it. In general, for power saving, this is a good thing.

When you're using a public transport companion a lot (such as I do - my favourite is "Öffi" bei Andreas Schildbach - blessed be his name! ((-:), this approach makes, that quite several times I have to wait a considerable time till localisation is finished.

For such users as me - wouldn't it be a nice idea to have

which could be set separately?

I'd be grateful if my phone already had finished the localisation job by the moment I launched the "departures at nearest bus stops" feature of Öffi, and I'd be happy to pay for it with some more battery drain. What do you fellows think?

Cheers, Wolf

ildar commented 6 years ago

I think it's a good idea but out of MicroG's scope. May I suggest looking at Android automation apps, like Easer (Event-driven Android automation) - https://f-droid.org/app/ryey.easer ?

herrdeh commented 6 years ago

Thanks for this hint. I checked easer - but could not find neither a trigger "screen switched on" nor an action "locate phone". More talented people than me might be able to create these themselves...

Maybe it could be done in tasker? - I'll have a look at it next few days.

ildar commented 6 years ago

Ah! sorry, this feature isn't implemented yet: https://github.com/renyuneyun/Easer/issues/36 Yes, I guess it's worth looking at other automation tools yet.

herrdeh commented 6 years ago

I tried it with tasker trial - and will buy tasker for that purpose. - Below you can find the code of the tasker profile - but it's simple to build the tasks.

Dear friends - try that experience - it's so much better!! - Whenever you call a location based service, you do not have to wait for a localization - it's just there, as you expect it.

But in the end, I still think this should be the default behaviour. I guess, Android must have some sort of collection of "wakeup scripts" or so - and microG localization service should be able to be triggered from there.

Tasker profile:

1516796708293 1516988297947 2 3 2 PosBest 208 0 1516988327897 1516988327897 5 4 123 1516796591557 1516988327897 Basis 3,5 2,4 mw_action_home 1516796625997 1516796694333 2 PosBest 902 1516988034450 1516988275610 4 PosBest laufend 902 30 135