i'm developing a java desktop application for tracking device like PC,
My code is based on examples giving in https://www.teamdev.com/jxmaps#code
Please how can i get current position
thanks
Unfortunately, current version of JxMaps doesn't provide possibility to get current location. But you can use any third party solution to get coordinates of current position and pass them to LatLng objects.
Related
I want to implement a function that calculates locations' list (longitudes and latitudes) through a direction of my phone. The result can be a rectengular shape which is pointing the corners as locations.
First how can i find the device current direction which means which direction the back camera points ?
Then how can i obtain a list of location information through this direction ?
Thank you
From the documentation of Google Maps Android API, the location data available to an Android device includes the current location of the device pinpointed using a combination of technologies - the direction and method of movement, and whether the device has moved across a predefined geographical boundary, or geofence.
This is the 3 options that you can do with your app.
Using My Location layer that provides a simple way to display the device's location on the map. It does not provide data.
Using Google Play services Location API is
recommended for all programmatic requests for location data.
And using the LocationSource
interface allows you to provide a custom location provider.
By using this, you can also get the different information about the
coordinates that you get
For more information, check this tutorial:
Google Map Tutorial in Android Studio: How to get current location in Android Google Map
Google Map Tutorial in Android Studio
I am trying to develop an app for android which is a personal mobile search engine based on the user's history and their current location. To search for results I have used the Google search api.
Unfortunately it has a limitation of 100 searches per day. To overcome this I had planned on using multiple Google search api keys (using switch). The problem I'm facing is that whenever the resultactivity (the function in which search and results are gathered) is called the counter is reset. As a result my app is using only 1 of the keys rather than all 3. Is there any way I can rectify this problem?
I have attached the code here (but without the switch).
https://docs.google.com/file/d/0B6z6YZ5pqVLdRjhGNmRpTHQ1Rzg/edit?usp=sharing
Please help me its my final year engineering project.
You can change the location where you store the number of searches to the Application class.
and if you the user quits the application you could store it in the SharedPreferences as well.
But I think the problem you are going to face is bigger then this. I don't really sure that Google allow to produce several keys for the same SHA1 keystore and the same package name including your application name.
I'm writing a server side java application that takes location updates from an android device. The device is traveling along a route and I want to be able to determine if it had arrived at its location.
The obvious solution is to define a geo-fence...of the current location of the android device is within this fence then it has arrived at its location.
My question is whether this is possible to do in serverside java. I know there are probably ways to do it with google maps API on the client side but that's not possible for me.
Are there any libraries out there that will provide this functionality?
Thanks in advance
B
Actually, most of these answers don't solve the problem. A geofence is a regular n-gon and the original question isn't trying to determine the distance to a point within the fence (i.e. am I close to a lat/lon) but rather whether or not they are within a box of geometry.
For that, the best answer is to do the following:
http://www.codeproject.com/Articles/62482/A-Simple-Geo-Fencing-Using-Polygon-Method
Basically I am developing an app which can show both the users' current location and their interested locations on the map, I know there are MyLocationOverlay and ItemizedOverlay, but seems they can only show either current location or interested location.
Thank you so much
I used this tutorial and learned a lot http://mobile.tutsplus.com/tutorials/android/android-sdk-build-a-mall-finder-app-mapview-location/
I'm in the process of starting a new Android project that will:
Display a Google map
Track and record users movements
Display the route on the map
Show local points on interest on the map
My question is what extra tools will I need to accomplish this? I can already get a basic Google Map working with zoom controls and place overlays etc. but my main concern is how I will track the users movements. I was thinking there maybe some sort of fleet management API but I really have no idea.
A link to some sort of tutorial would be great or even just to possible tools.
Use the class http://developer.android.com/reference/android/location/LocationManager.html to obtain the device geographical location
A Caltrans planning grant went towards creating an Android app called CycleTracks that does all of your bulleted items except the last one about points of interest.
You can download the source code here: http://www.sfcta.org/downloads/cycletracks/CycleTracks-android.zip
I haven't looked at the license to see how free you are to use it as a starting point, but I have to imagine it might be helpful just to be able to look at it even if the license is restrictive.
You can read more about it at http://www.sfcta.org/content/view/666/375.
You don't need any extra tools. Use the GPS or radio cells to get the location of the phone. This thread explains how you can get the location:
How do I get the current GPS location programmatically in Android?
If you want to Track the users movement you'll need to run a webservice on a server and have the app report the location of a user at regular intervals.
Be careful though, if you don't tell the user this is what you are doing, and provide an opt out, you could be pulled from the market pretty quickly.
Be sure you aren't recording any sensitive information as well. Usually position, phone type and OS type is allowed but much more could get you in trouble.