Tuesday 16 April 2019

java - Is the call to AndroidThreeTen.init() mandatory?

The ThreeTenABP README instructs users to isert a call to AndroidThreeTen.init() into their application’s onCreate() method. And yes, that’s the (supposedly faster) Android adaptation of ThreeTenBP, not the original (fully portable) ThreeTenBP.



However, if I omit the call, my app seems to run fine and without any obvious errors. Is this method just there to speed up things, anticipating a possibly lengthy initialization so it won’t slow you down on first use (eager vs. lazy initialization)? Or do I risk getting incorrect results if I don’t initialize ThreeTenABP properly?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...