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.
Related
I have very old Siemens CX70 in working state and just don't want to throw it out. My idea is to use its math power and peripherals (GSM module, USB, Camera and screen) to build some simple applications for home use (multichannel termometer, timer and cheap security system - for examples).
I know I should use Java ME and IDE (I love Netbeans, for example). Can you tell me what I need more to start developing? I know Java well, I just need to make an environment to developing, debug and deploy. Mobile library documentation will be very helpful too.
Thanks.
There are so many online tutorials about this topic that the only right thing to do is to refer you to google.com
Search after "getting started with j2me".
However, there's something else you should know upfront before getting too excited.
The security model in JavaME will prevent you from doing much useful stuff, in relation to some of the things you mention.
Every time you try to access certain things in the phone, like e.g. the camera, or send SMS, or read/write a file on SD card, etc etc - the phone will show a popup "This app is trying to access camera. Allow this?". And the app will only continue after a manual click on Yes.
As you can imagine, this of course renders a lot of ideas useless.
In order to prevent these popups, you can sign your app with a certificate you buy from Thawte or Verisign. But as that'll cost you $300 a year, it's not the way most sparetime hobby developers chooses.
Personally, I found another way, but it requires you to use a phone from Sony Ericsson.
Because the old Sony Ericsson phones can be patched in order to remove the Java security. After doing this on one of my old phones, I've been having fun making apps like the ones you mention. For example, an app that keeps an eye on my home when we're out, by taking a picture every second. If it detects a difference in the picture, it sends me an MMS with the picture. :-)
I have searched a long time for patching options for other brands, but I just can't find anything useful. Nokia should supposedly also be patchable, but I just can't find anything useful about it.
So in short: If you'd like to make some sparetime hobby apps on a phone like that, you should either find a Sony Ericsson phone and patch it - or go dig up an old used Android device.
Good luck.
Someone told me it was a good idea to use the Google Play API to handle location updates. I am needing to receive very frequent location updates in order to return the users distance.
If this is a good idea, does anyone know if it allows updates in the background? Meaning, when a user leaves the app? Is it even a good idea to use this API?
I couldn't find anything about this in its docs.
My problem is simple and I believe I am just missing something minor, but I can not figure out what it is.
I know how to use GraphicsEnvironment, GraphicsConfiguration, and GraphicsDevice. I know how to get all the showing devices etc., etc.. And I know how to display to a specific device.
The only thing I can't figure out is if the user's desktop is extended, duplicated, or showing to an individual monitor?
The GraphicsDevice is not necessarily equivalent to a hardware device, but to a 'display' that can be used by the Java application. So, when the user's desktop is duplicated or showing an individual monitor, even if there's a second monitor (hardware) connected or not, getScreenDevices (from GraphicsEnvironment) shows only one GraphicsDevice. Thus, I believe that you won't be able to identify these settings using this Java API.
Your solution probably will require JNI code. The project Lightweight Java Game Library has something like that, take a look at the Display class.
I am writing my dissertation this year in software engineering. I have a cool project in mind but wanted to ask if this was even possible first before I mention it to my tutor. If it is possible then it would be good if someone could point me in the right direction in achieving my goals.
My ideas is this. I want to make a Zombie survival game, generic and boring I know, but I want players to be able to run around in their own hometowns as if a zombie outbreak actually happened, the easiest way to do this would be to use the Google Maps API (I think) so maps are automatically created depending on a users home location.
And added feature would be to implement transport systems using local train stations so users can actually move to their friends areas in realtime on a multi-player platform.
So from what information I know already I would need these tutorials/resources.
The ability to import real time google maps into a Java environment
The ability to see where roads occur and where areas that can be walked on occur, maybe using the colour green as a basis for fields etc.. This is to ensure users can only walk within defined areas
The ability to generate surroundings (such as houses and fences) next to roads and walkable areas rather than have the user running around on a flat 3D environment
I already have some knowledge on creating 3D environments as it is using the JWJGL library. Each of the points stated above are dependent on the previous bulleted point. Any feedback or constructive criticism is greatly appreciated. Even just a "What the hell are you even talking about" would be helpful also.
Glad to see your replies.
It might be possible using the Google Earth API: https://developers.google.com/earth/
You would have to get a web view of some kind, basically integrating a JavaScript application into your Java application. I would be cognizant of the terms of service though.
I am planning to create an application which can track the location of a certain person using open street maps. But I don't know where to start.
Have a look at the sourcecode of osmdroid, an opensource reimplementation of google's maps app using openstreetmap. They even provide a jar you can use! Should get you up to speed in no time. And possibly the official documentation on Location & Maps...