How to get WP7-style ANID on Windows Phone 8? - c#

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!

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.

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)

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 :)

Related

Beacons in Windows Phone 8.1 - there are no possibilities?

First of all, yes, i have read all other similar questions.
Secondly, i am developing app (WP 8.1 WinRT), which must use Beacons. I read a lot about it, and i know, that generally connection with BLE device is not possible without pairing it first. But hope dies last, so i want to ask about any possibilities I have. It is possible to pair devices in code (according to articles I have read - its not, but maybe someone know the way)? Or just obtain nearby Beacons Id or Name, or ANY information about them? All posts i have found are outdated (from last year, maybe MS or somebody released some update/api?) I search for any kind of solution, api or just idea how to avoid pairing problem. Pairing it manually won't work - 1. not sure if it is possible to pair beacons, 2. its too many of them (beacons I need)
I look for anyway to communicate or even obtain beacons.
I would be grateful for any option or idea
While I have not tried it yet, there a developer has built an HCI layer to talk directly to bluetooth dongles on pre-Windows 10 machines. It is available here: WinBeacon
This will only work on desktop machines, and not with mobile phones. If you are interested in mobile phones with Windows 8.x, I do not believe there is any solution. I have spoken with Microsoft engineers who have confirmed this to me.
The fundamental problem with Windows 8.x on mobile devices is that any Bluetooth LE scan operation (which is what must be done to search for beacons) must be initiated by the operating system. There is no public API and no known private API that can be used to initiate a Bluetooth LE scan. Pairing with the device will not help -- it is the scan that is important and iBeacon and similar BLE beacon types do not use pairing at all for their primary proximity detection purpose.
Microsoft engineers have told me there are no plans to add this feature to 8.x, as they want to push folks to Windows 10.
While I know this does not help for Windows 8.x, I will note for the record that for the upcoming Windows 10 release, we are working on a port of the Android Beacon Library to Windows here.

Get Device Info using C# in Windows Universal App (Windows 10)

I was wondering how to get device-specific information programmatically using C# in the new Universal Windows app platform. This is to get a simplistic PC Toolbox I have from existing C# code for an old Windows Form project onto the UAP in Windows 10.
I'm looking to get total RAM installed (or available), CPU Architecture and ID/Name (such as 64-bit Intel Core i5-XXXX), Device manufacturer and model number (Dell XPS XXXX), and serial number/service tag.
It's a given that these apps will be using Windows 10 and this app will initially be geared for traditional PCs, but I'd like to expand to Windows Phone/Mobile with limited capabilities (not sure how/if some parts will work on ARM). How would I detect which edition of Windows 10, such as "Home", "Pro", "Enterprise", "Mobile", or "Mobile Enterprise", as well as 32/64 bit, and Language?
I have existing C# code that used a library that doesn't seem to work with Windows Store apps.
I'm pretty rusty with C#, but any help to any classes or references would be greatly appreciated. I realize that getting all the code to store all of these specifications may be a little much (if even possible ATM), but a pointer in the right direction would be very helpful.
You can tap into AnalyticsInfo and AnalyticsVersionInfo to get the information, as noted on the documentation page (https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.profile.analyticsinfo.aspx)
If you want to get the HardwareIdentification information however you will need to look somewhere else as it is not part of the Universal Device Family, it's part of the Desktop and Mobile family (device family specific).
To get this type of device-speficic info available, you have to add the references to the device specific extensions.
Anyways, The APIs that were used to gather these data have changed from 8.x to UWP. I have found one blog post <https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/> for someone who has created a helper class that retrieves the following properties for example from a Windows 10 UWP app
current OS family - phone/desktop/...
current OS build number - 10.0.10240.16413
current OS architecture - x86/x64/ARM
current App Display Name
current App Version - 3.0.2.0
current Device manufacturer - Nokia
current Device model - Lumia 1520
In his post he shows how to get basic data about current device, operating system and application. hope it helps!
Take a look here:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.profile.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.profile.systemmanufacturers.aspx
These will at least give you the SM Bios Serial Number and possible information about the hardware.

How to get started with Windows Phone database programming

I am really new to Windows Phone ( and Windows) development, and C#.I have done my first program as a unit convertor for Window Phone 8.1 using C# and Silverlight, run it on emulator and Phone both.
Now I want to build an application that can store data (e.g. a diary, that I can store plain text in it daily), something like usage of database, but I really have no idea how to do it and whether I need some sort of database, like SQLite, or there is some built in solution to store custom data in Windows Phone itself.
Can you please tell me how to and where to start?
In Windows Phone Silverlight apps, you have the option of using a SQLCE database with the LINQ-to-SQL framework on top of it (see docs here). If you're considering building a universal app that will run on both Windows and Windows Phone, however, your only database option is SQLite (see here for more details).
That said - unless you need to perform queries across a large amount of structured data, a database is probably overkill for your app. You may want to consider simply using flat files (docs here) to start and only upgrading to a database if the amount of metadata for the diary entries grows beyond what you'd want to keep in memory.

Accessing WiFi information from Windows Phone 7

I am currently trying to extract WiFi information such as signal strength and MAC address from my windows phone 7.5 for an accurate location app I am working on. The OpenNETCF.Net framework has all the functionality I require (and is even described my MSDN: http://msdn.microsoft.com/en-us/library/aa446491.aspx) however I cannot seem to be able to import the namespace into my project using visual studio. It complains that the framework was not designed for windows phone projects. Is there any way around this? Or does there exist and equivalent framework which would work on WP7?
Thank you
Windows Phone 7 is only distantly related to Windows Mobile & Windows CE (for which that library is for).
There are a few how-tos for dealing with network information on MSDN, although I don't believe that WiFi signal strength is made available to apps at this point in time.
It is worth noting that there is a specific how-to for accessing location information, where the operating system can use Wi-Fi signal information to help triangulate location, where GPS is not working.
I'm afraid that it is impossible on Windows Phone current version

how to make call from pc using local landline phone services

I have a desktop application of address diary, developed in C# .Net.
I want to make call from software throw land line phone service,
in my office we have 8 phone lines, so i want to select line before call,
i want to use headphone and mic in place of phone instrument.
how to connect phone lines to pc. i have more then 8 phone lines
is it possible ? if yes then how and which hardware i need for this.
Have you thought of the Skype API: http://developer.skype.com/public/skypekit
or
http://www.twilio.com
Get rid of the landlines and use a service. Much easier in my opinion. Then it would be far more scalable as well.
If you want to go down the telephony services path check out this library: https://github.com/markjulmar/atapi.net/
Hardware for landlines would just include 8 modems and selecting which one to use, before making a call.
I would assume that the atapi library contains functions to select the audio input and output. If not there are plenty of c# libraries for recording audio, in which you could pass the stream through to the library.
I wasn't going to point you down this direction but as per #Saif Khan comment you can use Asterix.
Using Asterix
Step 1 - Get a server install Asterix on it. http://www.asterisk.org. It's open source.
Step 2 - Get supported hardware e.g. http://www.asterisk.org/hardware
Step 3 - Communicate to it with http://sourceforge.net/projects/asterisk-dotnet/ (open source c# to asterisk library.
This maybe overkill for you, I don't know. I suppose I shouldn't assume :)
Since Google Voice is still free in United States and Canada. You can use this Google Voice API in C#.
http://sourceforge.net/projects/gvoicedotnet/
Doesn't want to sound like a noob, but did you try out Windows Dialer? You will need x number of 56k dialup voice modem depending on the no. of connections you have and you want to use.
It should work just fine. Test it out, and if it works well, you can get your app synced with your existing software to export the number to the dialer upon calling. (There is no such functions on the dialer app yet.)

Categories

Resources