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.
Related
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?
I'm working on Android project that related to GPS I still new to android so I don't know a lot about it.
My project is an app where it calculates the distance between user location and a specified other location so if the distance is less than (X) say 1KM the app will send a notification to the user.[[I know how to calculate the distance between two
locations]].
My problem is: how can I do this even if the user didn't open the app (I mean if there's anyway that I can make the app calculates the distance in the background while the app is closed).so I want the GPS feature works in the background.
Thanks in Advance.
You can use a service for background process.
For your question for getting location, you should try these links:
Best way to get user GPS location in background in Android
Get GPS location via a service in Android
My solution for this problem was simply :-
you can use Services for working in the background (when the Activity isn't showing)
check this : -Get GPS location via a service in Android
**if you want this service to run for ever, even if the app is closed/killed you can use broadcast receivers **
To get the app to run in the background, you'll need to learn about a service.
Service is a service that causes applications to run in the background such as gps, notification and more ..
link:
https://developer.android.com/reference/android/app/Service.html
User services. They are simple to use and all you need.
Here is the documentation.
A service is another component of an android application (like activity). You need to define the service in manifest. After that you could start the device using startService (intent). If you need to take some info (communicate with one activity) you can use bindService instead of startService. (Also need to implement onBind).
Another solution is to sendData using a broadcast receiver. Or you can simple set a notification in service and use it.
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.
I am working with the Geofence API Sample application I've got it running and seems to work alright. I did make the modifications to it to use BroadcastReceiver instead of the IntentService.
But I will only get the notifications if I have some other app open that is using GPS such as Maps, or GPS Tester app.
If I don't have one of those apps open and I walk into the geofence zone nothing happens. But as soon as I launch one of them I will get the notification within a few seconds.
I ended up creating a service that forces the GPS to stay active by requesting location updates on a relatively quick interval.
While this is admittedly a poor work around for a "real" application. It worked for my purposes. In which I needed to be able to present a working proof of concept to an audience, which impeded my ability to use a geo points which were further spread out.
Even I too had a struggle with getting Geofence notification as soon I entered Geofence or Exit the one.There were always delays in notifications until I found a really nice Location Library called little-fluffy-location-library which serves my purpose.Location updates will be broadcast to your app periodically.
According the Documentation it says that:
The library works by using Froyo's passive location listener (only possible with Android 2.2 and up, hence why it works best with it), which listens to location updates requested by other apps on your phone. The most accurate location is broadcast to your app approximately every 15 minutes. If a location update hasn't been received from another app for an hour, the library forces a location update of its own.
I think you should give a try with this Library and Let me know if it works for you!!
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.