Easiest way to implement getLocation for android app - android

My group is building an app that ties a message to a location. So basically, the app is supposed to get the current coordinates, then save the coordinate with a message to a mongodatabase. Anyone who uses the app at the same location can see all the messages stored in the location.
I've worked with python to make HTML wesbsites before.
Problem is, this is my first time working with android. Right now, I have no idea how to transfer the coordinates from android to an app.py
Would it be easier to use the android's GPS and LocationManager? Someone in my group said something about using google maps api instead, and json? How's that work? Thanks.

Getting location from Android device go through this :
Get current location during app launch
Process Initiated from device :
now you have coordinates now in you application so what you can do on launching of a web make an AsyncTask to hit the webservice passing these longitude and latitude and get the corresponding message as response.
Process Initiated from server:
for that you need to implement a GCM push functionality in your application what server needs to do it will push a message to device and after getting the push do the same thing as mentioned in process initiated from device.

Related

getting infrequent location update without notification?

I want to get location update few times an hour from android device.
I think the following paragraph implies I can achieve what I want..
https://developer.android.com/about/versions/oreo/background-location-limits#tuning-behavior
Consider whether your app's use cases for running in the background
cannot succeed at all if your app receives infrequent location
updates. If this is the case, you can retrieve location updates more
frequently by performing one of the following actions:
Bring your app to the foreground
I understand it as app can receive infrequent location updates without bring your app to the foreground (is my english bad ? :()
Google Map does track where you go without notifying you that "it is tracking you" when the map app is in the background , even when it's killed.
How can I achieve that ?
I've looked at
https://github.com/mauron85/react-native-background-geolocation.
https://github.com/transistorsoft/react-native-background-geolocation
and there seems to no way to not display the notification.
How can I achieve what google Map does?
tracking device location without showing the notification?
Is google having an unfair advantage at this?

Is it possible to launch an Instant App based on location?

I'm wondering if you can launch a given Instant App based on the user's location. Is this kind of thing possible? I suppose it would require some kind of server to be always running on the device.
Edit: To clarify a bit, this would be like if App A has a service that tracks the user's location and if they go to a certain spot it would launch Instant App B.
Thanks!
it would need a constant running service and launching the app might be a problem since this particular function could be ransomware like but a notification could be instead that's.
beside that it would a continuous location request at all time.

Receiving location information without having my app open in the background

I have no knowledge in android development nor in ios apps.
Is there a way to get the user's location without my app (android/ios) being open in the background (with the user's acceptance)?
Thanks!
Yes you can have an Android Service that listens for location changes. See LocationManager in service as one example. Depending one what you are doing, the question is how should you start your service.

Android launch your app based on user location

Is it possible to launch an app depending on the user location. I want the app to start only when I enter certain location say my office. I m aware about services running in background but I dont want my app to continuously check for location and deplete the battery.
Is it possible to register for some sort of geo-fencing broadcast ?
You can Create and Monitor Geofences with a standard Google API.
However, if you want to know if you've arrived at your office, I think a better and more battery-friendly way would be to see if you're connected to the office Wifi network.

Appinventor data triggered by GPS location

I want to create an app in appinventor which will be using gps coordinates to show some data. What I mean is that I want to make an app which will show a message whenever you go to an exact position. I already got the GPS coding that needs to be done but I'm not sure if I can save the data to somehow inside the gps. Im new at this so don't be too harsh with me! Is it even possible to do something like that in appinventor?
Unfortunately what you're describing is a service, in which your program runs in the background waiting for the GPS to hit a trigger location. App Inventor at his time does not have the capability to let you program a service.
You have to open your app manually and have it run in the background. As long as all permissions are enabled, it can then send push notifications using the appropriate block. I personally haven't experimented with what they display, but when properly done, it can show an image and text at the same time, one, or the other.
This means you could call the GPS when you reach a certain location, send a push notification with said text/image, which you can then view by the pulldown bar.
You could also have the app send yourself information via a text, replacing this with the push notification block, whenever you reach a certain latitude and longitude.

Categories

Resources