I have built an app that triggers geofences defined in the app. But after a restart, it requires me to open Maps for obtaining the current location for it to generate the notification.
Can't post the code due to security reasons. Can someone tell me a way to do whatever Google Maps is doing to do with my app during start up.
Related
I am working on one application that uses Adobe Analytics and I send language settings via Locale.getDefault().getLanguage() method. I have received a warning from Google Play service that I am using the location of user and I couldn't find anything else except this one. Is it possible that this method is using user's location?
I want to open the default google maps application from my application, let the user pin a location, and get the pinned location details back to my application.
somekind of startActivityForResult(), where the result data would be a latitude,longitude or anything like that.
is there a way to do this? is it possible?
PS: I already know/worked with the maps sdk, but in this application this is the only use case with maps, that's why i can't afford using the sdk.
No, you can't do that with the Google Maps app. Here's a PlacePicker library that accomplishes this task though:
https://github.com/suchoX/PlacePicker
I am a dummy in android app development. I have developed an app that when a button is clicked, the google maps application opens. I want to get the name of the location that has been selected in the google maps application and use it in my own application. Is it possible to do so? Plus, can it be done without integrating google maps or google places API in the application?
You want to use the "Start activity for result" construct. With that, and some data in an intent, you can request a location like that from Google Maps.
I would also recommend allowing a person to share a location from Maps to your app. Depending on what your app would be doing with the data.
You can get location name from the point you clicked on a map.
You can do it using the device to query into the Google Map Api or you can write a rest service where you pass in your location and the service hand you back the location name.
Ours is a financial app and to curb forgeries we wanted to access users location history from our android app.
The purpose behind this is if the user is requesting the service from a place where he hasn't been often or never been there, we would flag them or ignore them or implement another layer of security.
I have searched and found that google maps maintains location history and google plus may have an undocumented API also.
Please suggest how to get access to location history of device.
That's not possible unless you keep track of the location history yourself.
I have a service which receives locations through registering a LocationManager.requestLocationUpdates.
But there have been some issues on some phones.
When battery runs low, the network location provider stops sending location fixes (this problem is addressed in this SO question). It's not a only a problem with my app but also the other apps just stop receiving locations.
Even when the phone is recharged the problem persists until the full reboot.
However, I found out (and someone also mentioned it in the SO question above) that Google Maps still keeps receiving location updates - when I open Google Maps app it shows the correct location and updates.
So I was thinking about a workaround of using locations from Google Maps API. I have absolutely no experience with the Maps API, but it seems that it needs a proper GUI (Activity) application to be used with. Or am I wrong? Is there a possibility to use Google Maps API to receive locations even within the Service?
Given some extensive testing from a reliable source, I believe that you might want to consider using the FusedLocationProvider supplied with Google Play Services. It seems to take the headache out of choosing the appropriate power criteria and so on.
Be aware that this will require that the user must have Google Play installed on their device, so Kindles and the like will be out of the picture. It also requires a minimum of Android 2.2.
Some more information about the location services provided by Google Play Services can be found here.