Jump to content
Eternal Lands Official Forums
vinoveritas

Mercators El Time Widget (for Android)

Recommended Posts

For those who are interested in Since the el Time Widget did not work for last couple of weeks i did now wrote a new one.

You can get it for now from this link.

As it is the first Release there might be some bugs. in which cases you should pm me in game write here in forum or contact me over mercator.

 

BTW the data for the applet are provided as json file through https://holy-eternalland.de/eldata.php

 

UPDATES:

New version in the link, now app has a background,

If you click on the app, time gets syncroized with mercator service manually. Otherwise it syncronizes every hour.

added bugfix in case device running whith no internet.

 

Changes system of Timecalculation from counting up an int, to a timestampbased calculation. this should be more efficient.

made Fonts smaller so Widget takes less space.

Edited by vinoveritas

Share this post


Link to post
Share on other sites

New version in the link, now app has a background,

If you click on the app, time gets syncroized with mercator service manually. Otherwise it syncronizes every hour.

added bugfix in case device running whith no internet.

Share this post


Link to post
Share on other sites

Updated it again. Will need to make new Icons and so on for it, as Google told me i cannot use the EL logo in the derivation i made as it does violates EL trademark.

New update schould make the app use less frequent update and save battery life on android devices.

Edited by vinoveritas

Share this post


Link to post
Share on other sites

My widget still isn't updating. It's stuck on Day of Schools 4:37 1 invasion mob left. This was from the day I installed it, Dec. 3. I do get updated notifications from it, however.

Share this post


Link to post
Share on other sites

I reinstalled the EL widget from google play store and it is working prefectly, as it use to. That being said, before i reinstalled it, it wasnt working for over 2 weeks.

Share this post


Link to post
Share on other sites

I'm updating my Unity/Gnome time indicator to use your time source which I assume is OK with you.  Looking at the json object, please could you explain the difference between the "Gametimestamp" and "Timestamp" values.  For Torg's original time source, the timestamp was the real-time that the last EL-time was read.  Thanks for generating the new time source.

Share this post


Link to post
Share on other sites

It is very ok with me and for everyone else who wants to use the json source.

When i did test the app i realized that the time was off a bit. so i did some testing  on how to make it more accurate.

As this json  http://new.holy-eternalland.de/eldata.php is designed to deliver more data then just time, it collects the data provided by mercator, and put them together with data from an sql database. this creates a time difference that i found noticable, and where the calculation GameSecond=GameSecond+((int)((timestamp-gametimestamp)/1000)%60); gave me a real time that removed this "lag"

But in reality it should be good enough if you take just the seconds and go for there as it does not really depends on seconds on the time indicators.

 

 

Share this post


Link to post
Share on other sites

gametimestamp is the real time timestamp from when the gameseconds where read. the timestamp is the timestamp that was last operation before php script send it out.

Reason to have both there, is that android timestamp where  not completly relyable for timedifferences

Share this post


Link to post
Share on other sites

Hi.  Did something change for the time data?  I'm getting values for "GameSecond" in the hundreds.

Edited by bluap

Share this post


Link to post
Share on other sites

Looks like if I divide the GameSecond value by 10, its about right.  The value gets to just over 600 then returns to 0.  If that's the way it works I can change my usage.

Share this post


Link to post
Share on other sites

@vinoveritas Hi, is your time source still working OK?  The URL has been down for me for a few days, its now back but I'm getting "Unexpected UTF-8 BOM" errors while trying to parse the JSON.  Has something changed or am I doing it wrong?

Also, https://holy-eternalland.de/eldata.php showing an error too:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Edited by bluap

Share this post


Link to post
Share on other sites

No you are completly right, i know there is the UTF-8 BOM errors on the json i have just a big problem to find in the source code where that problem comes in. all spaces where the output gets formed should be clean from those invisible chars. if I open the export of the file with my text editor and tell it to show invisible characters i do not find any. I can tell you it has to do with either the migration of mercator to java 11, or with the new mysql db migration. In any case the tricks i tried in the php file to correct for it did not get the expected result. I mean replacing the unicode string <feff> which is causing the trouble)

 

 

EDIT: no idea why, but after opening and closing all php files with vim, the error is gone. guess my Editor Kate that i worked with added to each file that BOM flag

Edited by vinoveritas

Share this post


Link to post
Share on other sites
On 5/7/2020 at 9:10 AM, vinoveritas said:

EDIT: no idea why, but after opening and closing all php files with vim, the error is gone. guess my Editor Kate that i worked with added to each file that BOM flag

The Kate editor has an option to Enable BOM; it's under Settings->Editor Component->Open/Save-> General.

Perhaps you have that one ticked?

 

If that's the problem, it's fairly normal you won't see it in the editor, as it's stripped off on loading : it's not part of the file contents

Edited by revi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×