Can I request access to a users google location without a mobile app?

123 Views Asked by At

I'm working on an android things project that will show the location of all members in a group with each other. The android things app is meant to be the primary UI (my ultimate plan is like the Harry Potter clock that showed all the weasley family members location).

Ideally a user would create a "group" and invite people to join, and everyone in the group would share their location, and I'd imagine save each members location using Firebase or some backend to communicate and sync the location info. And the Android THings would display the info, a full map, or just a description of where they are (each member could enter their work address for instance, and it would show "Tim is at work").

My question is there an option to use the google location api and not need a client app on each group members mobile device? Would there be some way to request and give access to share location without my own custom mobile app, or will I need my own android app to set up and communicate with my backend?

I'm trying to not be too vague or open ended, I want to work on an android things project right now, but I feel like as I try to design and architect this solution, I realize the scope gets pretty large and I feel like this might become too complicated of a project. So Id love any ideas or thoughts on how to keep this simple to start, but maybe build it in a way I can work on each users client in the future. I plan on documenting this and sharing as an open source idea for tinkering. Thanks.

2

There are 2 best solutions below

0
On

My question is there an option to use the google location api and not need a client app on each group members mobile device?

You could write a mobile website, that they would connect to. But it would involve the same amount of work. Web/Native App your choice.

I don't know of any apps that expose a users location for 3rd parties to use. This is the same reason you can't "ask google" for a users location. (massive security/legal issues).

Would there be some way to request and give access to share location without my own custom mobile app, or will I need my own android app to set up and communicate with my backend?

Firebase is a good idea for the backend go with that (would work with web or native app).

For the App - it could be the same app/codebase that is used for the clock, meaning you write one app and it can either work in "display" mode or "locate" mode.

To do this you change your AndroidManifest like so:

<uses-library android:name="com.google.android.things" required="false" />

To give you any better answer, you would need to explain your reasoning as to why you don't want a client Android app.

0
On

My question is there an option to use the google location api and not need a client app on each group members mobile device?

Google Maps has a feature for sharing you location with others: https://support.google.com/maps/answer/7326816?co=GENIE.Platform%3DAndroid&oco=1

However it is a feature of Google Maps only and isn't exposed to the Google API.

Would there be some way to request and give access to share location without my own custom mobile app, or will I need my own android app to set up and communicate with my backend?

I'm afraid you'll need to write your own mobile app and related backend.