Android app submit button not working on sending gps data to mysql server

I’m trying to create a simple app that submits GPS data to a website MySql server but when I added the code for getting the GPS location the submit button stopped working Any help would be greatly appreciated public class MainActivity extends AppCompatActivity { EditText inputName; String currentTimeDate; TextView timeView, latView, lonView; double longitude, latitude; … Continue reading “Android app submit button not working on sending gps data to mysql server”

How can I drag and drop a marker in a limited area?

How can I drag and drop a marker in a limited area? For instance, a circle has 20 meters radius. User can only drag and drop inside the circle. Here is the code I’ve tried. map.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(LatLng latLng) { mymarker.setPosition(latLng); mGoogleMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); map.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() { @Override public void onMarkerDragStart(Marker … Continue reading “How can I drag and drop a marker in a limited area?”

OpenGTS Integration in Eclipse

OpenGTS Integration in Eclipse *Imported whole opengts code in to the eclispse workspace. *Created the four environment variables like GTS_HOME,CATALINA_HOME,ANT_HOME,JAVA_HOME as system variables. *In the next step am trying to configure the database for the opengts as they mentioned in the document. *Refer the link below “http://opengts.sourceforge.net/OpenGTS_Config.pdf“. Taking reference of above link Am trying to … Continue reading “OpenGTS Integration in Eclipse”

How to send UID value from GPS service to next class public void onLocationChanged Android

We are working on logistics app on Android. App will start independent GPS service that is sending location on change to web server (Apache). GPS service starts with UID and Android Studio log shows that GPS service has this UID working. The problem is that lat and long values are coming to server corretly but … Continue reading “How to send UID value from GPS service to next class public void onLocationChanged Android”

How to start service again when App Restarts and User already Granted Location access

I am able to implement a simple gpsTracker using a service that runs on background like this: public class MyService extends Service { private static final String TAG = “BOOMBOOMTESTGPS”; private LocationManager mLocationManager = null; private static final int LOCATION_INTERVAL = 1000; private static final float LOCATION_DISTANCE = 10f; private final IBinder mBinder = new … Continue reading “How to start service again when App Restarts and User already Granted Location access”

Raspberry pi (3) shell script does not properly work when started by cron

I’ve created a simple shell script which basically just starts an “.jar” file. this script contains the following now=$(date +”%s”) sudo java -jar /home/pi/Desktop/test.jar > /home/pi/Desktop/output_$now.txt I added the script to the crontask with @reboot sudo bash /home/pi/Desktop/testmygps.sh My application is going to be a “GPS controller” which is used for dropping baits for foxes … Continue reading “Raspberry pi (3) shell script does not properly work when started by cron”

Android GPS_PROVIDER always returns null

I’m developing an app and when I try to get the location of Android, I always get null. I try this with a real device, running API 19 and with the GPS enabled This is my code: double latitud, longitud; Location location; LocationManager mlocManager; LocationListener locationListener; String provider; final boolean gpsEnabled = mlocManager.isProviderEnabled(LocationManager.GPS_PROVIDER); if (!gpsEnabled) … Continue reading “Android GPS_PROVIDER always returns null”

Can't get android to output Lat & Lng consistently to Textview

I have made it so it does output the Lat & Lng when I fresh install the APK on my phone but it writes it 5 times but after that, it doesn’t work… How do I get it to work? In the logs, it outputs that I’m pressing the button but doesn’t seem to do … Continue reading “Can't get android to output Lat & Lng consistently to Textview”