java - Google Maps Engine API guide? -



java - Google Maps Engine API guide? -

just beginner here bare me! :)

i trying build android app stores users' locations online , shares using app. have managed piece next code:

bundle com.example.test; import java.util.list; import com.google.android.gms.maps.*; import com.google.android.gms.maps.model.*; import android.app.activity; import android.content.context; import android.location.location; import android.location.locationmanager; import android.os.bundle; import android.widget.edittext; public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { locationmanager lm = (locationmanager) this.getsystemservice(context.location_service); list<string> providers = lm.getproviders(true); location l = null; (int = providers.size() - 1; >= 0; i--) { l = lm.getlastknownlocation(providers.get(i)); if (l != null) break; } super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); googlemap map = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map)).getmap(); latlng mapcenter = new latlng(l.getlatitude(),l.getlongitude()); float heading = l.getbearing(); float speed = l.getspeed(); edittext et= (edittext) findviewbyid(r.id.edittext1) ; et.settext(heading + " " + speed); map.movecamera(cameraupdatefactory.newlatlngzoom(mapcenter, 13)); map.addmarker(new markeroptions() .icon(bitmapdescriptorfactory.fromresource(r.drawable.ic_launcher)) .position(mapcenter) .flat(true) .rotation(245)); } }

this works here, gets current location, bearing, speed, , plots me on map on android phone. need send info somewhere, , other users there... i've been reading on net on how this, not coming step step examples.... :( have read on: google datastore api google cloud store api google maps engine api

all 3 should able in form or other, don't have plenty pieces of code set together...

i'd rather not have http , java part of above code...

any help appreciated! give thanks you.

there isn't going sort of solution doesn't involve server , http. if sending straight between 2 phones, you'd need server intermediary. want updating database online (sending http posts asynctask) , requesting locations server (either service polls or setting websocket - no guides yet latter). reason you'd want server in between anyway take care of authentication, no 1 can reverse engineer way request or intercept location info user shouldn't have access to.

java android google-maps google-app-engine

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -