3
votes

I have a Windows Phone 7 app which relies on ANID to store user data on remote server. Now I'm preparing Windows Phone 8 version of it. When user will download this update previous WP7 app version will be replaced by this new WP8 version.

But there is a huge problem: in WP8 there is ANID2 instead of ANID. I know how to translate ANID to ANID2 (Windows Phone ANID to ANID2 conversion on C#?). But I need the whole ANID for this. In WP7 ANID looks like: "A=2E23ACF364795673CD7EBB58FFFFFFFF&E=f48&W=3". I extract 32-character value (2E23ACF364795673CD7EBB58FFFFFFFF) and use it as UID (I heard that remaining portion may be changed, but 32 id will always be the same).

So I might convert ANID from WP7 version to ANID2 on-the-fly on remote server, but I don't have all 44 letters - only 32 of them.

I might update WP7 version with another WP7 version which sends the whole ANID to server, but I can't rely on the fact that all people will update their apps, save their data to server and then again update their apps when wp8 version will be available.

So my questions are:

  • is there any way to get WP7-style ANID value in WP8 app (maybe via reflection or c++)?

  • it is possible convert ANID to ANID2 having only its 32-character uid portion?

  • is there any way to find out whether particular ANID2 corresponds to existing 32-character ANID portion?

  • how can I reverse convert ANID2 to ANID if we know developer GUID?

  • can user select the version to install (if WP7 and WP8 versions available)?


Update

So far my workaround is to give users of wp8 version wp7 utility tool which generates ANID2 from ANID and stores this pair to remote database. Then user who gets wp8 version update can continue using his wp7 app profile. Though I'm still looking for the better solution.

Btw, I've just realized: while we're trying to follow MSFT "One Screen" ideology and trying to provide our users access to their data on all MSFT devices at once, it's really stupid that MSFT makes us hold and somehow synchronize three (!!!) different ids for one user who log into his wp7, wp8 and windows 8 devices with the same live id! MSFT don't want us to see this live id so much that gives us its three different anonimized representations. Ridiculous, folks!

3

3 Answers

1
votes

The only way is descrtibed in the question: publishing hidden utility with a link to it in wp8 version of main app. Utility itself is a wp7 binary which can access ANID and using dev GUID can generate ANID2. It sends both values to the server, and whn user comes with ANID2 server check dictionary and found corresponding ANID. Not that simple but quite easy. Hope it helps someone.

0
votes

I would use a GUID i create the first time you startup the application, store that in isolated storage and use that. It won't cover the uninstall/reinstall scenario but that's a real small percentage anyway.

btw, the user will only get the latest version from the store so he/she cannot choose an older version (WP7 phones will only get the wp7 version ofcourse but wp8 users will always get the latest version from the store)

0
votes

This might sound a bit naive and probably you would have already thought about it, and yes this is only an answer to your core issue, Is it possible for the windows phone 8 apps alone to point to the ANID2 implementation, maybe another remote end point, for some time till MS themselves kill the earlier(WP7) platform :)