Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] best practices #52

Closed
moovida opened this issue Apr 29, 2020 · 6 comments
Closed

[question] best practices #52

moovida opened this issue Apr 29, 2020 · 6 comments

Comments

@moovida
Copy link
Contributor

moovida commented Apr 29, 2020

I have some questions that I think might interest others. I would be happy to gather the answers and make them a documentation page in the wiki. Not sure if the issue format is the best for this, but I will try:

what is the best practice to stop the background logging on IOS?

On Android I am able to intercept the back button and unregister properly the location listener. What is usually done in IOS? Is there a difference between switching off the screen and pushing the home button?

In an app that allows background logging you have to explicitly make a difference between switching it off and just sending it to back and work on something else in the meanwhile.

is there a way to tell if the user has the gps switched on at all?

In the current situation I initialize the logging but then am not sure if no point is coming because the GPS is off or because it doesn't have a fix. Is there a way to tell?

notification dynamic info

Is there a way to send notification updates. It is almost a pity to have the LocationSettings be static at first startup. It would be great to be able to send updates, let the user know the current accuracy and if the gps has a fix or when not.

what is the best practice to change locationaccuracy?

Do I have to go through the whole

    if (IsolateNameServer.lookupPortByName(_isolateName) != null) {
      IsolateNameServer.removePortNameMapping(_isolateName);
    }
    await GPS.BackgroundLocator.unRegisterLocationUpdate();

and restart from scratch? It is not much work, just wanted to know if this is the proper way.

Thanks for any insight.

@gpibarra
Copy link
Contributor

for "notification dynamic info"
#53

@mehdok
Copy link
Collaborator

mehdok commented May 6, 2020

Sorry for late answer.

Is there a difference between switching off the screen and pushing the home button?

There is a bug in iOS #54 and right now I don't have any straight answer for your question.

In the current situation I initialize the logging but then am not sure if no point is coming because the GPS is off or because it doesn't have a fix. Is there a way to tell?

Right now there is no way to tell the difference, But is would be a nice feature to add.

what is the best practice to change locationaccuracy?

Do I have to go through the whole

    if (IsolateNameServer.lookupPortByName(_isolateName) != null) {
      IsolateNameServer.removePortNameMapping(_isolateName);
    }
    await GPS.BackgroundLocator.unRegisterLocationUpdate();

and restart from scratch? It is not much work, just wanted to know if this is the proper way.

There is no need to re-register the solateNameServer. If your app is open and you need to change the accuracy just stop the plugin, init it with new accuracy setting and start it again.

@moovida
Copy link
Contributor Author

moovida commented May 6, 2020

Hi @mehdok, thanks for your reply. Is there a better way to help you out with the documentation, if I am to contribute some? I see the IOS Setup part is not yet up and I feel back, because you should not have the burden. Would it be possible to get write access to the wiki part, so that I could add the setup part and maybe start an FAQ page? Write access could also be just for a little while. The missing of pull requests for wikis makes it difficult to contribute docs without stressing you :-)

@mehdok
Copy link
Collaborator

mehdok commented May 6, 2020

@moovida Sorry for not adding your file into the wiki. I wanted to ask you add a separate part for iOS integration and I got stuck into my work and forgot that.

Please separate your walkthrough and add a separate section to wiki and then follow the steps in this qa or just email me your .md file and I will add it to wiki.

@moovida
Copy link
Contributor Author

moovida commented May 6, 2020

Hi @mehdok , maybe I gave the wrong impression, I just wanted to help and not stress. :-)

I will look at that wiki PR walkaround.

Just to be sure, you want me to extract the whole IOS setup part into a new page or just the one I added?

@mehdok
Copy link
Collaborator

mehdok commented May 6, 2020

Just the integration from objective-c to swift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants