Windows Phone 7 C# Device and User Info - c#

Recently I was thinking of a way to confirm the user info inside an app.
Is the typed email, the windows phone live-id of the device?
Is the typed number, the windows phone card-number of the device?
All I know until now is that I can get some info from windows phone SDK.
For DeviceId (hash) I use DeviceEctendedProperties, based on device serial i suppose
For UserId (hash) I use UserExtendedProperties, based on user live id i suppose
And with that we can identify a user and a device.
To get the right info from user like email and phone number you must ask him.
So the question: Is there any way to validate the user entry?
For example:
App -> Form - > form_info(email, phone) -> Validate(form_info) -> Success OR Unsuccess
For Validate() i was thinking of something like:
form_info -> function_hasher() -> form_info_hash -> IF form_info_hash MATCHES with UserId (hash) and UserPhone (hash)
If there is a UserPhone hash to match the number of card!

I'm pretty sure there's no way to get this data or even verify that it's right, short of asking the user to email/SMS a particular address/phone number. If you want to go that route you can use a SmsComposeTask or an EmailComposeTask.

Related

How to replace phonenumber by name for incoming calls in xamarin?

I've saved contacts on a server in an uncommom format. These contacts are regularly evaluated and changed. Using a xamarin app on my android device I want to synchrously connect a phonenumber to a name.
Using a BroadcastReceiver that captures all incoming call I'm able to display a toast and a notification showing the name related to the number.
Because the toast disappear fast and the notification isn't easy available during ringing I search for another way to display the name connected to a number. The best way would be to replace the displayed number on the dialer.

Connecting to the device via zkemkeeper.dll WITH PASSWORD in C# .net

I have to implement a biometric system. Im using ZKTeco LP600 time attendance device and ZKTeco SDK (ZKemKeeper.dll) here its the situation:
When I try to connect to device with no security password(the one who configure in the device > menu > communication > security > 6 digit Password ) I achieve it without any trouble.
But when I put some password things go wrong...I recive the error -6
Im using: bool isConn= axCZKEM1.Connect_Net(devIP,4370);
This is the answer to my own question if someone need the info in the future. After checking the class dictionary (Which I found in a remote place in the zk page) there's a method call SetCommPassword(int password) which you must set before use the Connect_Net method. Theres many strange things in this dll and im still trying to understand some....

How to find mac user name and password

HI I want to create an ios application in visual studio using xamarin.
But After creating project it is asking us to connect to mac.
Which Credentials it is asking for and how to find it.
I think you are making use of Xamarin.VS Build Host Application
Refer :
https://developer.xamarin.com/guides/ios/getting_started/installation/windows/xamarin-mac-agent/#Windows_Setup
https://msdn.microsoft.com/en-us/library/mt299001.aspx?f=255&MSPPError=-2147217396#AddiOS
Are you tired of getting the below error on pairing to mac from a windows system
Invalid credentials. Please try again
Never thought that pairing to mac from a windows system would be this simple!
Username : Name displayed while you log-in to open your Mac system
Password : Password you enter to log-in for the above username displayed
Still not sure?
Choose System Preferences from the Apple menu, then click Users & Groups.
You can see user name as Current User Reference : https://support.apple.com/en-in/HT202860
To know the Mac IP address, check manually add a mac from https://learn.microsoft.com/en-gb/xamarin/ios/get-started/installation/windows/connecting-to-mac/#manually-add-a-mac
Detailed reference : https://learn.microsoft.com/en-gb/xamarin/ios/get-started/installation/windows/connecting-to-mac/

InputText from dialogue?

I have to make a phone application on 3 smartphones: Android, IOS and WinPhone.
This app must open the door of my school via a simple sms. But, for send this message, this app need the phone number of the school, so I have to add an option "Edit Number".
In android and in IOS, I can edit this number (String) via an inputText like an AlertDialogue in android.
I'm searching since two days and I found MessageBox and MessageDialogue but that don't perform like Android'AlertDialogue...
I just would like get string via a simple prompt in alert
Can help me please?

Get Unique Device ID (UDID) under Windows Phone 8

Is there any unique device ID (UDID) or any similar ID I can read out on Windows Phone 8 (WP8) that doesn't change with hardware changes, app-reinstallation etc.?
In older Windows Phone versions there were such IDs:
WP7: Device Status for Windows Phone
WP7.1: DeviceStatus Class
But they doesn't work anymore with SDK 8.0.
Why I ask:
The idea is that a user gets some free credits with the first start of the the app and I want to avoid that the user just re-installs the app for getting new free credits. A registration with email or phone number could solve this, but if I can, I don't want do bother users at the first start with a registration.
---///---SOLUTION----------
I can confirm that DeviceExtendedProperties.GetValue("DeviceUniqueId") still works in WP 8.0. Got a little bit confused when I read the following text:
In Windows Phone OS 7.0, this class was used to query device-specific
properties. In Windows Phone OS 7.1, most of the properties in
DeviceExtendedProperties were deprecated, and the new DeviceStatus
class should be used instead. However, where appropriate, you can
still use any of the below properties that are not deprecated.
MSDN:DeviceExtendedProperties Class
I can run the following code, delete the app and re-install it and get the same ID:
byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string DeviceIDAsString = Convert.ToBase64String(myDeviceID);
MessageBox.Show(DeviceIDAsString);
I haven't yet started to develop for Windows Phone 8, still on 7, but you still should be able to use the original DeviceExtendedProperties class to pull back the Device Unique ID.
DeviceExtendedProperties.GetValue("DeviceUniqueId")
I've had this issue with returning the null value. Then remembered that it needs to be switched on.
In WMAppManifest.xml -> Capabilities tab -> switch on ID_CAP_IDENTITY_DEVICE
There's a twist to this DeviceUniqueId - it is unique only for one publisher. So it is not really device-wide unique identifier but unique device id for one publisher. We have noticed when we worked on some customer project where we tried to identify the same phone from different accounts (customer publishes under two different accounts).
You can get your own wp8 device Id by DeviceExtendedProperties.GetValue("DeviceUniqueId")
Here is the simple way to get deviceId as a string
byte[] id = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string deviceID = Convert.ToBase64String(id);
By not providing DeviceUniqueId in Windows Phone 8 and Windows 8, Microsoft tried to avoid User Tracking but with increased pressure from Dev community, they are bringing it back again.
In Windows 8.1, Microsoft has introduced a new AdvertisingId API and may also bring similar Id to identify a unique user across apps in subsequent Windows Phone 8.1/9 versions.
I used this:
private static String getDeviceId()
{
byte[] id = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
return BitConverter.ToString(id).Replace("-", string.Empty);
}
But the key is to Check the ID_CAP_IDENTITY_DEVICE in WMAppManifest, or else it throws error.
I found this a new HostInformation.PublisherHostId property
More info at
http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.phone.system.analytics.hostinformation.publisherhostid.aspx..
string myDeviceID = (byte[])DeviceExtendedProperties.GetValue("DeviceUniqueId");
string DeviceIDAsString = Convert.ToBase64String(myDeviceID);
I have used this for windows phone unique device Id.
The answers above work for Windows Phone 7 and 8 Silverlight. However, they will not work for Windows Phone RT (Universal) or Store Apps since the SDK does not have this dll library (Microsoft.Phone).
This is how you get the device ID and Name (and possibly other info) on Windows Phone 8.1 RT (Universal/Store Apps).
private string GetHardwareId()
{
var token = HardwareIdentification.GetPackageSpecificToken(null);
var hardwareId = token.Id;
var dataReader = Windows.Storage.Streams.DataReader.FromBuffer(hardwareId);
byte[] bytes = new byte[hardwareId.Length];
dataReader.ReadBytes(bytes);
return BitConverter.ToString(bytes);
}
More details about reading the device info on Windows RT can be found here

Categories

Resources