
I got an error : Cannot resolve symbol for the SetTextSize, SetText and addView. ViewGroup layout = (ViewGroup) findViewById(R.id.activity_display_message) String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE) I think I followed everything like explained but got a still a few errors. On this page is explained to 'Create a second activity'. isProviderEnabled(LocationManager.GPS_PROVIDER) ĪlertDialog.Builder adb = new AlertDialog.Builder(m圜ontext) Īdb.setMessage("Enable GPS to get full function from the app.") Īdb.setPositiveButton("Yes", new DialogInterface.I followed the tutorial from Android Studio to make my first App. LM.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1, 1f, m圜ontext) Gather GPS data at a certain time interval.

LocationManager LM = (LocationManager) getSystemService(LOCATION_SERVICE) Shift the following code inside oncreate(): /* Use the LocationManager class to obtain GPS locations */ RequestLocationUpdates(String provider, long minTime, float minDistance, PendingIntent intent)

RequestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener, Looper looper) RequestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) RequestLocationUpdates(long minTime, float minDistance, Criteria criteria, LocationListener listener, Looper looper) Following are the allowed parameters for requestLocationUpdates() function: requestLocationUpdates(long minTime, float minDistance, Criteria criteria, PendingIntent intent) There is no requestLocationUpdates() function which takes Context as input.
