Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
3 answers
118 views

Converting Date to epoch milliseconds

I have a Java Date (Fri Jun 28 10:00:01 GMT+01:00 2024) which I want to convert to Epoch millis to send to the backend. I have tried the following: typealias Dates = java.util.Date fun Dates....
BRDroid's user avatar
  • 4,258
0 votes
1 answer
35 views

Android date parse difference from unit test

I have an issue where the date parsed in unit test is different from running on real device. This is the time I need to parse and find the difference. val startStr = "2024-06-16T15:35:08.363341+...
Ultimo_m's user avatar
  • 4,857
-2 votes
1 answer
94 views

Subtract minutes from Date by using Calendar fails

I'm writing an app that must find some time for alarm (from Date object), and then should subtract several hours and minutes (by using Calendar object) selected by the user (interval, several hours ...
Binyamin Pekar's user avatar
0 votes
0 answers
12 views

Android date and time stuck on auto

Android os. It is stuck on auto date and time. When set to off, on reboot, it goes back to on. For auto date and time. I want it on manual. Is there someone who can go Into the code , or fix it in ...
Studio Studio's user avatar
1 vote
0 answers
54 views

How to resolve date in android kotlin

In my android app, I have a model with an attribut Date(). But when I create this model, the date is creating with -2 hours. I have tried to resolve this with a method to change the time zone to UTC. ...
Fateha's user avatar
  • 11
1 vote
1 answer
46 views

unable to resolve timestamp in android framestats data

does anyone has any idea about framestats https://developer.android.com/tools/dumpsys#ui Question - While running framestats command I am getting some wierd timestamps Example Flags,IntendedVsync,...
Sarthak Agarwal's user avatar
0 votes
0 answers
170 views

android material date picker is very slow

I am using material date picker in my app to pick two dates but when try to call this it open in many seconds also when try to select date they are also laggy and takes time. fun showDatePicker(...
Ayush's user avatar
  • 23
0 votes
2 answers
46 views

Material date picker not showing

I am using material date picker in my andorid project in fragment. On specific click, I want to show user the date dialog but on click nothing is showing. Here is my code: I am expecting that user ...
Ayush's user avatar
  • 23
-2 votes
1 answer
186 views

Convert a String to Date and compare it with LocalDateTime.now() in Java

The String data is in a file stored earlier in the format "Mon Jan 08 18:55:57 GMT+05:30 2024". I have used the following code to convert the String to get a value of "08 Jan 2024" ...
SNAD's user avatar
  • 33
-1 votes
2 answers
221 views

How do I sort an ArrayList by date and time in string format [duplicate]

I'm currently programming a small notes app and saving everything as strings in the sharedPrefs. I would now like to sort the overview of the note entries so that the most recent entries are always ...
amarradi's user avatar
  • 115
1 vote
3 answers
300 views

Parse string date to millis in kotlin

I am using SDF to parse a string date to millis with below code private fun dateToMilliseconds(dateValue: String): Long? { val sdf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS") val date: ...
WISHY's user avatar
  • 11.7k
0 votes
4 answers
266 views

How to convert the input format of date to a specific new format in android

How to convert the value in the below input to the format of 9:15 pm, 2nd May 2023 Input: 2023-11-20T17:09:08.000Z What I tried: I tried to use SimpleDateFormat, But I couldn't get the appropriate ...
Devrath's user avatar
  • 42.7k
0 votes
1 answer
123 views

Turn the long generated by MaterialDatePicker into year, month, and day varialbes

I am using the following code: MaterialDatePicker.Builder<Long> datePickerBuilder = MaterialDatePicker.Builder.datePicker(); MaterialDatePicker<Long> datePicker = datePickerBuilder.build();...
SE User's user avatar
  • 90
1 vote
1 answer
91 views

Trigger Day Change In Kotlin?

How can I detect a day change in Kotlin, even when my app is not running or is off, and how can I run a specific command when the day changes? (Im Using Android Studio) I'm Also Very New So take it ...
Maher Almously's user avatar
1 vote
1 answer
325 views

Correct current way on Android to get the current year in Thai digits?

I only have limited experience in Java libraries and in Android programming. In Thailand both western (Arabic) digits and Thai digits are used. 2023 = ๒๐๒๓ Thailand also uses both the western calendar ...
hippietrail's user avatar
  • 16.7k

15 30 50 per page
1
2 3 4 5
182