I am developing a sencha based application for iPhone & Android. As a S/W requirement, i need to identify device (on the basis of IMEI or MAC address) accessing the service.
e.g. If a user of iPhone visits my sencha-web-app first time, he will need to register. And if he visits again, Application will detect and registration process will be skipped.
Q: How can i get IMEI or MAC of device using sencha, to identify it uniquely?
You will need to wrap your Sencha application in a native wrapper. I recommend using PhoneGap, they have a nice UUID property as documented here: http://docs.phonegap.com/en/1.3.0/phonegap_device_device.md.html#device.uuid
If this is a web app running in the browser there is no way to get that information. On iOS, the IMEI is actually restricted information that you can't access anyway. If you simply want to remember users, the standard way would be to just use a cookie. Is there a particular reason you want to tie this to a hardware identifier and not use a cookie?
Related
I have an app that has some unknown devices listed in the analytics portal I use.
I was wondering if Android and iOS have a method that I can call which tells me if the app has been downloaded and opened using an emulator?
I've thought of accessing the device's IMEI, but this is only for mobile phones and doesn't cover tablets. Any help would be greatly appreciated.
You can try filtering out the Connecting device's by their device's model number, name and id.
For that you first need your app to parse the data from the phone, and then send this data to your server while authentication.
The server checks the robots list and then authenticates the exceptions (genuine users).
NB: Nowadays emulators are updated, they are capable of spoofing a Device Name, Model and ID. So it's a hectic job to detect spoofer's.
Just a Mere Concept out of Thoughts, Might possibly work!
There are couple of methods out there. Android includes a built in method,but some of them can be maneuvered.
Android includes some system properties that keep such information. they can be accessed using the getprop utility and there are ways to get the problematically.
More specifically, the "ro.build.characteristics" will contain the word "emulator" when running on emulator.
Long story short: There are couple of libraries that are capable of doing this and are consider reliable.
Here is a good example:
https://github.com/framgia/android-emulator-detector
For iOS see this answer
As a side note. if you are concerned about having a safe environment to run your application, take a look at SafetyNet
I am new to android development so I need a little help.
In my app users can vote for posts but I don't want to make them register because app is very simple and that would be overkill. I want some another way to restrict users so they vote just once. If the method is not very accurate I don't care. In web development it's usually done using IP, is it the same for mobile apps?
Appreciate your help very much.
Every mobile device has a unique id which is called device id. you can use device id to restrict users or another option is to get the device MAC address of the device. MAC address is also unique so you can easily use it restrict users.
You can use an IP but for mobile users that won't work very well because their IP's are always changing. An easy way to do it would be to generate a guid in the app, and save it somewhere permanent (like the app settings). Then whenever you need to id the user just submit that guid to your webservice or whatever you are using. This is an anonymous id that you can then check against etc..
I would like to have a twitter connect on both my desktop and mobile applications. The problem is that for my desktop application I use the callback authentification. And for my mobile applications I use the Pin authentification. So when I connect my mobile app to twitter it is redirect to my website. Is it possible to use both of these options without creating two different applications?
Is anyone met this problem?
So basically you would like to use the same consumer keys in both of your application with different callbacks?
If so, in your desktop application set the callback URL (oauth_callback parameter) to your website and in the mobile application set it to oob. (You can set these parameters in your requests, don't have to rely on the callback URL you explicitly entered in your app settings. Take a look on this part of the API doc: https://dev.twitter.com/docs/auth/oauth#registering-an-app). If this won't work (for example because Twitter does a check on if your application is mobile or desktop) then you will have to register two apps for this. And why wouldn't you do that, if you have two applications.
Following is the scenario:
I have an web application accessible via mobile browser.
I need to detect a mobile device IMEI and sim IMSI whenever an user clicks on link in my app page accessible via web browser. This is to track the same device with same SIM and provide him/her next level of access. User cannot be tracked using loginid as there is no user login kind of option in my page.
The question is how to get unique device id/sim id via mobile browser for a specific mobile device.
For now I am focusing on android based mobile devices. But the target is to make it generic to devices.
Focus of most of the ideas is, what is the kind of access a browser has over the phone and its app?
From a browser link we can open a local app in the following way:
Get Details
here productcateory will uniquely identify a local app and invoke it. But its one way communication. How to get back some response from the point of invocation and populate some hidden form field dynamically.
Via webpage scripts we can store some data locally at client machine and retrieve it later. but the scope is limited and it is no way connected to IMEI or IMSI number.
Is there a way to get a hook to mobile browser app(remember it's like any other mobile application) from the webpage and get the id details via scripts in my page?
Is there any option that html5 provides in this regard? I know there is a localstorage tag in HTML5 and one can store an id in the client location and retrieve it later. But this is limited to the same device and same mobile browser and also this is a different solution to get the imei/imsi number
Let me know if there is any other option without asking user to installing a local app or browser plugin on the device?
~inkriti
For very good reasons it is impossible for the web browser to access the IMEI or IMSI numbers of a mobile phone, without some dastardly hacking that the dev teams hadn't expected.
Also the android browser doesn't support plugins.
Your only option is to create a native app. This answer has some info that will be useful to you: Programmatically obtain the phone number of the Android phone. Its not a perfect solution however.
I would also ask why you want access to the users phone number? If its just to track session just use javascript to generate a unique id and store it in a cookie.
The original issue is probably closed, however for future reference of anyone (like myself) that comes across this question would be something like 2-factor registration with confirmation via text. The closest to getting an IMEI (impossible without native apps) would be to get the user to register and include a text confirmation - the mobile phone number in most cases will be unique, only non-unique when changing devices, and some assumptions can be made from the client-side to guess what device they have, you could even go a step further and ask them to identify the make/os of their device if you were that concerned about unique-ness. However in most use-cases a mobile number confirmation will do the job
The only reliable way is to write an app and have it send a SMS and then track the number on that end; assuming the subscriber has SMS/text service enabled. This won't work on non-phones (tablets).
It is not important, nor is it necessary and it is probably illegal to track the device (IMEI); simply track the subscriber.
Been researching it for a couple of days, and it seems quite impossible (though highly desired).
I'm Looking for a way to anonymously identify users on our website as they later on run our mobile apps (both iphone and android, actually). At the very basic level, I'd simply generate a UID when someone visits our site, plant a cookie on their device, and then retrieve it later when our app is run. This simple implementation seems to be impossible, because the apps don't get access to the same cookie-base as the browsers (which makes sense, privacy-wise).
Also thought about using HTML5 for this purpose, which doesn't seem to provide any solution.
I Tried going the other way around and using the device id as identifier. However, seems like device id won't be available to the web server when someone visits our site.
There seems to be a perfect disconnect between data accessible from the browser, and accessible from the device itself in native apps.
Has anyone ever found a solution for this scenario?
As of my experience what you seek is almost impossible to achieve for a third party developer.
As you mention, the web browser - by default - doesn't have file-system access from the javascript context (which is where your web app will most likely run) and the cookies infrastructure isn't exposed to the application context.
What you could do is to write a plugin to the browser which might enable this one way or another. But then there is the technicality that the browsers on mobile devices usually don't support plugins and even if they did; you can't force your web app users to install the plugin :-(
Yet another, and if possible even more unlikely solution would be to try to influence the device browser project (WebKit or whatever project you wish to target) community to implement the functionality for you (good luck) :-)
A third solution and perhaps even the ethically more correct one would be to allow the user to identify him/her self optionally when using your device client application. Your client iPhone/Android application would then have a "Identify me as a client user"-button. This would of course require you to allow the user to choose a key (an e-mail address?) of his/her own when entering the web app. You'd likely need to store the key on the web server opposed to the client browser cookies.
Hope this gives you some further ideas.
Cheers
Here are some things I think would work (untested):
You can check if the user has a google account login in the browser and on the phone.
Another way would be to have them log in in both apps
Register a special url-handler which opens your android-app with an user-identifier which gets called by the webapp (see this question)
Edit: I over-read the IPhone part - #1 and #3 those answers are Android only (I think).