Here's the code it currently relies on for updates:
mLastUpdateTimeTextView.setText(String.format(Locale.ENGLISH, "%s: %s",
mLastUpdateTimeLabel, mLastUpdateTime));
I tried this:
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss", Locale.getDefault());
String currentDateandTime = sdf.format(new Date());
mLastUpdateTimeTextView.setText("Date/Time:"+ " " + currentDateandTime);
and that at least printed date and time. However, it doesn't update with coordinates. Any idea how to make it update with coordinates?
Got it.
changed
mLastUpdateTime = DateFormat.getTimeInstance().format(new Date());
to
mLastUpdateTime = DateFormat.getDateTimeInstance().format(new Date());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.