Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Creation Date in android

Creation Date in android

Put your problem here if it does not fit any of the other categories.

Creation Date in android

Postby silentkratos » Wed Feb 29, 2012 6:38 am

Hey guys,

I have done many work on this previously, like googling and all...

But, I need to get a file's creation date in android file system....

I used jdk version1.7 too(latest). It contains classes to get a file's creation date through java....

I could get a file's creation date on Windows File system but couldn't use the same code on android emulator...I use android version 2.2 ....

I saw on a android phone, too, in a file browser (built-in) while reading information of a file we get creation date too.....

Kindly, help.. thanks in advance....
silentkratos
Freshman
Freshman
 
Posts: 4
Joined: Tue Aug 02, 2011 6:20 pm

Top

Re: Creation Date in android

Postby Phyll » Wed Feb 29, 2012 12:24 pm

Hi silentkratos,

As you probably found out in all your searching on the web. Linux doesn't store the file creation date. I couldn't tell you what these file managers (especially built-in apps) say they can do. An app that is part of the OS might well have more information than you can get at without making your own rom.

The short answer is, the File class returns the last modified date and time. If the file has not been modified since it was made, it will be the created date and time.

If these are your files that we are talking about, you could always keep your own "directory" so to speak and store that information yourself. But I don't think the OS is going to do it for you.

Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Creation Date in android

Postby silentkratos » Wed Feb 29, 2012 3:30 pm

Well, speaking about linux, it does as you say so...

But Microsoft Windows facilitates creation date...

Considering this, Java 1.7 consists of a new "java.nio" package which contains class "BasicFileAttrbiutes" and "FileSystems".....using these I could get the creation date on my computer... but for android it didn't work. I tried to add/include jre7 in project(android).... still it doesn't work...

Hope, now Someone could help me....
silentkratos
Freshman
Freshman
 
Posts: 4
Joined: Tue Aug 02, 2011 6:20 pm

Re: Creation Date in android

Postby Phyll » Wed Feb 29, 2012 6:35 pm

Hi silentkratos,

Android is Linux.

Good luck.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Creation Date in android

Postby silentkratos » Thu Mar 01, 2012 5:55 pm

Yeah, my friend, but I guess they added the new classes in Java to facilitate it on all OSes....But I think they didn't consider Android...
Cause while programming, when I printed the content of the FileSystems Object. it gave as WindowsFileSystem...Whoknows....there isn't a proper manual yet available...
silentkratos
Freshman
Freshman
 
Posts: 4
Joined: Tue Aug 02, 2011 6:20 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests