How can i generate device specific unique number in Rhomobile - rhomobile

I need to send a unique number per device to server to trace the application install and create its specific device number.
When i use to generate the unique number by some logic, and make it to store in the local db, but on uninstalling and again installing the application, the generated number is different.
So i'm not able to get the data for that device been used previously.
Do we have some way to make/generate this unique number ?

You should be using the System property to get some unique number rather than generating unique number by some complex logic.
You can use the System.get_property() and get the phone_id which will be unique for all device even after uninstalling and reinstalling.
System.get_property("phone_id")
Check the whole list of properties here http://docs.rhomobile.com/rhodesapi/system-api#getproperty

Yes, the above methods will work only for android, In Recent iPhones (after 5.0) we cant acces s the device unique-id(uuid) through the program.

Related

Xamarin IOS identifying device

I'm writing an application which will be used in an enterprise, no outsiders.
This application should fetch data from API response and display it.
Each user has his own device, Ipad and should see only the data he is the owner of.
Problem i'm facing is identifying the device/user, so that API responds with only the information the user is supposed to see.
brief example of how it should work:
App is opened -> get unique id -> attach ID to API call -> receive appropiate response -> display data
As i imagine this ID should be static and not made upon installation of the app or generated.
I've tried getting UDID, Serial, MAC,- no luck, they're deprecated. Only managed to get .IdentifierForVendor, which is unique not in the way that i need.
So here is my question, are there any other options left?
Like fetching appleID name,email or should i make unique deployments for everyone separately?
Or a Log-in screen?
You could create a GUID for every App instance. However, apart from that you will have a hard time doing what you want.
These ways of identifying a device have been deprecated to ensure Advertisers and other malicious Apps cannot fingerprint a device easily.
If you don't want too much hassle authenticating everyone, you could apply a simpler scheme such as using a pin code, QR code, NFC tag or whatever you prefer.
However, if someone were to steal one of these enterprise devices and it would contain any secret information I would rather rely on something more secure as username and password, or even better something multi-factor.
Unique id's will have to be set by deploying the app from MDM. For example:
https://docs.jamf.com/9.9/casper-suite/administrator-guide/In-House_Apps.html
How should the application accept those variables, i dont know. Maybe it modifies .plist when deploying.
Solution i did was enforcing device name from MDM, so that users are unable to change it - and using that as the unique identifier.

Get Contacts out of Address Book who also use the application

I'm developing my first iPhone-application in Xcode and I was wondering if it is possible to get the contacts out of the Address Book of the iPhone who also use the application?
So what I need is a way to generate a unique ID based on the information in the Address Book, so that the ID that will be constructed for the same person will be the same on every iPhone where the application is used.
This way, I can use this ID as a primary key in the database I use to hold data that needs to be shared among users.
If I can construct this idea, I can also compute the ID for every Address Book member and check them against the ID's in my database to see who uses the app. But how can I construct such a unique ID?
I am not sure.. accessing phone number in iPhone allowed or not ... as far as I know its not possible .. but in your application you can ask user to enter the his mobile number and then you can make phone number as unique ID... whatsapp is using the same thing ...
For getting phone number check this ..
How can I get the phone number of my iPhone device?
Programmatically get own phone number in iOS
How to get the phone number programatically

How to get Unique ID of Windows Phone?

I want to get the IMEI number of my Windows Phone in my application. How can I programatically access it? If IMEI won't get in my application, then how to access MAC address of my phone. In my application, the administrator can block some devices from accessing the server resources using a unique ID. So I want to get the UniqueID programatically and manually from phone.
Now I can access a DeviceUniqueID from my app but don't show it in the phone.
I can access FirmwareVersion and HardwareVersion both programatically and manually. They are shown in phone as firmware revision number and hardware revision number. Are they unique?
You can get a device id via:
DeviceExtendedProperties.GetValue("DeviceUniqueId")
(In the Microsoft.Phone.Info namespace)
Bear in mind the warnign from the documentation:
A unique hash for the device. This value will be constant across all applications and will not change if the phone is updated with a new version of the operating system. Applications should not use this to identify users because the device ID will remain unchanged even if ownership of the device is transferred.
You will also need to declare in your manifest that you require capability ID_CAP_IDENTITY_DEVICE

iOS hardware parameters for unique id generation

Hi I would like to generate an unique id for an iOS device using any of the device hardware parameters. I do not want to use the MAC address because there is a chance that the MAC address can also be changed. So can you please let me know if there is any other unique hardware parameter with which I can generate an unique ID.
I believe something along the lines of this is the generally accepted replacement for UUID.
In short, you need to create a CFUUID, and then store it in the Keychain on the iOS device, which persists even if you uninstall the app. Having written my own implementation along those lines (not the one I've linked to, obviously), I've yet to come across any real problems with this. It can even be accessed in your other apps that you make, so long as you access it with the same security parameters in aloof your apps.

How to identify iOS device(instead of imei)

I want to uniquely identify devices of my app users. Since I can't have imei, what are other options?
We create our own UDID's based on a hash of the device MAC address and the bundle identifier. This ensures that we can uniquely identify our app on a specific device.
You could also create a hash based only on the MAC address if you need a unique ID across multiple apps.
I've actually written a blog post about how to do this and provided some sample code here:
https://radeeccles.com/blog/create-your-own-unique-device-identifier-udid
You might have a try with OpenUDID.

Resources