Sony Extends AOSP Project to the Xperia Z3

While most OEMs simply don’t care about the custom ROM community, others are doing an … more

How Open Source Can Help Your Project w/ Ethan Yonker – BABBQ2014

People have finally recovered from this years Big Android BBQ … more

Add Frequency Bands to Your Qualcomm Device

Those of you who travel quite a bit undoubtedly own more than one device due to frequency band … more

More Android 5.0 Details Revealed, Microsoft Band Fitness Tracker – XDA TV

Google talks more about Android 5.0 Lollipop! That and much … more
Post Reply

[XAP] NTP Time Synchronization for interopunlocked Samsung phones

OP dada.81

5th March 2014, 05:27 PM   |  #1  
OP Member
Thanks Meter: 9
 
53 posts
Join Date:Joined: Sep 2007
Because my GSM network's automatic time is somehow set wrong, the set automatic time+date doesn't work for me, so this is a quite useful app for me, it can get various NTP server times and synchronize the phone's time and date to it.
It can currently sync with multiple NTP servers, I tried to add as many as I could find, although the default Russian NTP server one works fine most of the time.
Since another person did most of the programming, and not me, it will be updated if needed, but that update might not be immediate...please add any comments bellow...second post is reserved for change log descriptions. Feel free to add your insight, along with any comments, they're all valuable.
TIA

p.s.
As of yet this can't be published to windows phone store because it uses INTEROPSERVICES capability (among other things), if anything about that changes you will be notified immediately with the store link, also you'll be notified if this ever starts working on other manufacturer's phones....until then please make sure your phone is developer unlocked to deploy/sideload it...and that it is interopunlocked to work.

p.p.s.
Last, but not least, thanks to GDTD and dimoniche.
Attached Files
File Type: xap Synchronize.xap - [Click for QR Code] (270.7 KB, 113 views)
Last edited by dada.81; 5th March 2014 at 08:39 PM.
The Following 6 Users Say Thank You to dada.81 For This Useful Post: [ View ]
5th March 2014, 05:27 PM   |  #2  
OP Member
Thanks Meter: 9
 
53 posts
Join Date:Joined: Sep 2007
post rsrvd
8th March 2014, 12:23 PM   |  #3  
Member
Flag Skien
Thanks Meter: 6
 
66 posts
Join Date:Joined: Mar 2012
Donate to Me
More
wow

I was somehow expecting some ugly but functional UI, but this certainly is awesome, and it works flawless!!

and the UI is well done!!
10th March 2014, 06:05 PM   |  #4  
Recognized Developer
Flag Seattle
Thanks Meter: 2,723
 
5,755 posts
Join Date:Joined: Jan 2011
More
Any chance you can post the source? There's a capability (not INTEROPSERVICES) that specifically enables setting the time; it might be better to use that instead.
10th March 2014, 06:16 PM   |  #5  
Recognized Developer
Flag Boston, MA
Thanks Meter: 426
 
1,493 posts
Join Date:Joined: Nov 2009
Donate to Me
More
Quote:
Originally Posted by GoodDayToDie

Any chance you can post the source? There's a capability (not INTEROPSERVICES) that specifically enables setting the time; it might be better to use that instead.

Could you please provide this capability (for setting time)? I've tried to use kernel's SetSystemTime (with GetProcAddress trick) but it always returns 0 (i.e. BOOL FALSE).
10th March 2014, 06:51 PM   |  #6  
Recognized Developer
Flag Seattle
Thanks Meter: 2,723
 
5,755 posts
Join Date:Joined: Jan 2011
More
You probably want ID_CAP_BUILTIN_SETTIME. Will probably require capability-unlock, but should let you use the Win32 APIs.

By the way, no need to mess with GetProcAddress. You can get the function prototype (from MSDN or from the header files) and link against the relevant library directly (may need to use DLL2LIB to extract the link library from the DLL).
10th March 2014, 07:09 PM   |  #7  
Recognized Developer
Flag Boston, MA
Thanks Meter: 426
 
1,493 posts
Join Date:Joined: Nov 2009
Donate to Me
More
Quote:
Originally Posted by GoodDayToDie

You probably want ID_CAP_BUILTIN_SETTIME. Will probably require capability-unlock, but should let you use the Win32 APIs.

I've got a build error: Error 1 The 'Name' attribute is invalid - The value 'ID_CAP_BUILTIN_SETTIME' is invalid according to its datatype 'String' - The Enumeration constraint failed.

Quote:
Originally Posted by GoodDayToDie

By the way, no need to mess with GetProcAddress. You can get the function prototype (from MSDN or from the header files) and link against the relevant library directly (may need to use DLL2LIB to extract the link library from the DLL).

App build by this way will never pass marketplace certification.
Last edited by sensboston; 10th March 2014 at 07:11 PM.
10th March 2014, 07:18 PM   |  #8  
Recognized Developer
Flag Seattle
Thanks Meter: 2,723
 
5,755 posts
Join Date:Joined: Jan 2011
More
Well, not any more than a third-party app using ID_CAP_INTEROPSERVICES (or, probably, ID_CAP_BUILTIN_SETTIME) would, no... Unless you have a reason to try and be sneaky about what the app is doing, I find my approach to be more readable and straightforward. However, it's true that if you're trying to pull a fast one, it probably won't work because the import will appear in the PE data and that's easy to find.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Windows Phone 8 Development and Hacking by ThreadRank