I am writing an application that run only that user's phone. If the phone is stolen, application will never work anytime. For this scenario, I must used IMEI and SIM number but I develop application on SDK 60 2nd edition. So getting these numbers is not easy.
I used Bluetooth ID instead of IMEI, but I could not found any specific ID instead of SIM number. If any suggestion have been, I' d be glad. Thanks...
There are some examples on how to accomplish this with the IMEI in different phone manufacturers:
http://mobilepit.com/10/how-to-get-imei-number-in-j2me-javame.html
Seems like there's no "universal" method for any of those. In S60 (I guess this is what you mean by 'SDK 60') the appropiate code is:
System.getProperty("phone.imei");
For IMSI I think you have to get the operators signing, but you could use:
System.getProperty("com.nokia.mid.imsi");
Related
Is it possible to search for all iBeacons which are nearby? I know it's possible to search iBeacons by UUID. But i want to find all iBeacons nearby.
An iBeacon is a region, and has as defining property the UUID. Therefore, you can only search for the ones matching a UUID.
After you find one or more with a specific UUID, you can figure out which is closest using the delegate callbacks, where the beacons are stored in an array ordered by distance.
There is great sample code on this and also a pretty detailed WWDC video session: "What's new in Core Location"
iBeacons are higher-level constructs than regular BLE peripherals. From what can be determined from the Apple docs, beacons are tied to their service UUID. i.e., a family of beacons is a "region" and a you go into and out of a region based on the range and visibility of a beacon to YOU, not the other way around. Unfortunately Apple has used the term region, which most of us probably associate with MapKit, so this is adding to the general confusion
Here's the bad news: You can only scan for ProximityUUIDs that you know, there is no "wildcard" proximityUUID. Additionally, CLBeacons don't expose the much in the way of lower level CoreBluetooth guts so if you want to find all beacons that happen to be near you, you'll have to use CoreBluetooth, scan for peripherals, then look though the returned peripheries and query each one them to find beacons. Of course Apple has neither registered (with the Bluetooth SIG) or (yet) published the iBeacon characteristics so, you'll need a BT sniffer to reverse engineer what constitutes an iBeacon from any other BLE device.
each APP would use it's own specific UUID, using the "major" and "minor" integer values to differentiate between beacons.
for example, the UUID would be associated with a chain of shops, major would identify the shop, and minor the aisle, or even a group of products.
scanning for unknown UUID's would not be very useful, as your app would not know what to do with the information.
the UUID is generated once and for all, using the "uuidgen" command in the terminal.
sadly there is no protocol to actually communicate with beacons, hence there is no standard to get the location of a beacon, or any other useful info.
it would have been so much better if we could open a connection to a beacon, usually the closest one, and obtain additional data from it, without having to be on the same WIFI network.
you either have to use bonjour to communicate with the device over WIFI, or use the major and minor id to obtain data from a webservice of some kind.
Unfortunately you cannot at this time search for an arbitrary iBeacon without first knowing the proximityUUID value. I've tried writing directly to COREBluetooth and, although you can discover and connect to transmitting beacons in your area, what you get back is jibberish with no relation to the BLE UUID. So you can't even confirm that the peripheral you have connected to is in fact an iBeacon.
This does not appear to be a limitation of the BLE spec, rather it is a limitation that has been imposed by Apple. It also appears that this limitation does not exist for the Android platform.
Until this gap is closed, Android will have a significant advantage over iOS in this area.
I disagree with previous comments that scanning for UUIDs would be useless. On the contrary, if you knew the beacon UUID, you could create a map of beacon/location/subject in the cloud and use it to navigate (assuming the beacon was fixed) using a web service. You could crowd-source the data so that eventually a very rich database of beacon UUID/location pairs would be available to all who wanted to write location apps. Perhaps this is why Apple is hiding the info; they may be holding this back for their own purposes.
According to Radius Networks (authors of the AltBeacon spec and the android-beacon-library it's not possible to identify a beacon using CoreBluetooth
I want a common(generic) code which gives cell ID of the mobile network.
For nokia it is:
System.getProperty("com.nokia.mid.cellid");
but I need code which gives cell ID irrespective of mobile vendors.
I used System.getProperty("Cell-ID"); but this is Giving null to me.
There is no standard way to get these values and different vendors have different System properties. You can see this at http://www.easywms.com/easywms/?q=en/node/3589
Similar question at How can one acquire position in Non-Gps devices using j2me coding
I am developing an application for Windows 8 and I am testing it on Microsoft's Surface. Does any one know how I can retrieve the unique device ID of Surface?
Just like we do for Windows Phone by retrieving its unique device id using Microsoft.Phone.Info namespace.
I use Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(null).Id converted to string, details at http://coding.kulman.sk/how-to-uniquely-identify-a-windows-8-device/
AFAIK, the closest thing you'll find (for Windows Store apps) is the ASHWID, which isn't device specific but rather app+device specific. There are a number of options you can provide in terms of weighting the different factors that comprise the ASHWID.
EasClientDeviceInformation esClientDeviceInformation=new EasClientDeviceInformation();
var localDeviceID= esClientDeviceInformation.Id;
Happy Coding:)
How do I get the IMEI number for Nokia phones? I tried
StringBulder imei = ...........
imei.append(System.getProperty("phone.imei"));
imei.append(System.getProperty("com.nokia.imei"));
imei.append(System.getProperty("com.nokia.mid.IMEI"));
All return null.
What could be the solution?
On Series 40 phones this requires that your MIDlet is signed to either an operator or manufacturer domain. Without a signed MIDlet you can't get the IMEI Number. See How to get IMEI in Java ME.
com.nokia.mid.imei is the correct one. On Symbian phones this is available on all security domains. On Series 40 phones it is available on only the manufacturer or operator security domains. This is likely to change to align with Symbian on the future Series 40 phones.
See the same discussion, How do I get the IMEI number with J2ME, on the Nokia forum.
I would like to add some kind of Registration Screen to my J2ME software in order to allow users to use my app for a trial period and only give them full access after registration.
I know how to get the IMEI etc. but I wonder if there is already code out there which handles the generation of a unique phone identifier and creation of some kind of "CD-Key" for J2ME...
What a lot of downloadsites use(handango etc), is the RPN registration method.
Given a unique ID (IMEI on phones, ownerid on PocketPC, etc) you do a calculation on it which is unique for your app (for instance: add all letters together and divide by 5). This number is your unlock code.
now the user who wants to register your app, gives it's imei number to the webstore,... they pay,... and the webstore does your unique calculation. It then return the unlock code to the customer.
The customer inputs the unlock code into your app, if it matches then they payed!
The way to store this unique calculation is by virtue of RPN (Reverse Polish Notation). This is a way like how HP calculators worked. Instead of typic 4*3 and getting the answer 12, you type: 4 3 *
here is an article on the PocketPC implementation of how to implement the RPN method yourself. Lot's of webshops have the RPN calculator in their webbackend so this way you become compatible with them.