I’m writing a mobile app and I need Android to store in a variable and send to a remote server the datetime when the user pressed the button to start tracking its location.
What I’m doing right now is String date = DateFormat.getDateFormat(this).toString().concat(DateFormat.getTimeFormat(this).toString()); but of course it doesn’t work, as it inserts this in the remote DB java.text.SimpleDateFormat@387875cajava.text.Simpl...
I’m doing the same thing for the calls and SMS data, but in this case I’m querying the content resolver and getting the date from there, but for the location I’m a little bit stuck..
Thanks a lot in advance for the replies.
Best,
Manuel.
Maybe you prefer working with UTC time converted to long.